// * ************************************************* *
// *                                                   *
// * JavaScript file that writes the navigation column *
// *                                                   *
// * ************************************************* *


// * ************************************************* *
// * Specify the submenu contents and links            *
// * ************************************************* *

//Contents for News and Events submenu
var menuNewSPUMC=new Array()
menuNewSPUMC[0]='<a href="NewMembers.htm">Welcome - Who Can I Ask?</a>'
menuNewSPUMC[1]='<a href="ContactUs.htm">Contact Us</a>'
menuNewSPUMC[2]='<a href="Directions.htm">Directions</a>'
menuNewSPUMC[3]='<a href="Pastor.htm">Pastor\'s Message</a>'
menuNewSPUMC[4]='<a href="Staff.htm">Staff</a>'

var menuNewsEvents=new Array()
menuNewsEvents[0]='<a href="Calendar.htm">Calendar</a>'
menuNewsEvents[1]='<a href="Campanile.htm">Campanile - Newsletter</a>'
menuNewsEvents[2]='<a href="Sermons.htm">Sermons</a>'
menuNewsEvents[3]='<a href="News-KeyAppointments.htm">Bishop Announcement</a>'

//Contents for Worship submenu
var menuWorship=new Array()
menuWorship[0]='<a href="Pastor.htm">Pastor\'s Message</a>'
menuWorship[1]='<a href="Sermons.htm">Sermons</a>'
menuWorship[2]='<a href="Worship-Contemporary.htm">Contemporary Service (8:45 AM)</a>'
menuWorship[3]='<a href="Worship-Traditional.htm">Traditional Service (11:00 AM)</a>'
menuWorship[4]='<a href="ChildrenSermon.htm">Children\'s Sermon</a>'

//Contents for Education submenu
var menuEducation=new Array()
menuEducation[0]='<a href="Discovery.htm">Day School</a>'
menuEducation[1]='<a href="BibleStudy.htm">Bible Study</a>'
menuEducation[2]='<a href="ESL.htm">ESL Classes</a>'
menuEducation[3]='<a href="Scholarship.htm">Scholarship Program</a>'
menuEducation[4]='<a href="SundaySchool.htm">Sunday School</a>'
menuEducation[5]='<a href="VBS.htm">Vacation Bible School</a>'

//Contents for Programs submenu
var menuPrograms=new Array()
menuPrograms[0]='<a href="Service.htm">Community Service</a>'
menuPrograms[1]='<a href="SpecialEvents.htm">Fellowship Events</a>'
menuPrograms[2]='<a href="MissionTrips.htm">Mission Trips</a>'
menuPrograms[3]='<a href="Music.htm">Music</a>'
menuPrograms[4]='<a href="Donations.htm">Opportunities to Give</a>'
menuPrograms[5]='<a href="YoungAdults.htm">Young Adults</a>'
menuPrograms[6]='<a href="Youth.htm">Youth</a>'
menuPrograms[7]='<a href="Children.htm">Children</a>'

//Contents for Opportunities submenu
var menuOpportunities=new Array()
menuOpportunities[0]='<a href="Donations.htm">Gifts & Services</a>'

//Contents for Organizations submenu
var menuOrganizations=new Array()
menuOrganizations[0]='<a href="Scouting.htm#BoyScouts">Boy Scouts</a>'
menuOrganizations[1]='<a href="Scouting.htm#GirlScouts">Girl Scouts</a>'
menuOrganizations[2]='<a href="UMM.htm">UMM - United Methodist Men</a>'
menuOrganizations[3]='<a href="UMW.htm">UMW - United Methodist Women</a>'
menuOrganizations[4]='<a href="YoungAdults.htm">Young Adults</a>'
menuOrganizations[5]='<a href="Youth.htm">Youth</a>'
menuOrganizations[6]='<a href="Children.htm">Children</a>'
menuOrganizations[7]='<a href="ResourceList.htm">Links to Christian Resources</a>'

//Contents for About SPUMC submenu
var menuAbout=new Array()
menuAbout[0]='<a href="Committees.htm">Committees</a>'
menuAbout[1]='<a href="ContactUs.htm">Contact Us</a>'
menuAbout[2]='<a href="Directions.htm">Directions</a>'
menuAbout[3]='<a href="History.htm">History</a>'
menuAbout[4]='<a href="Jobs.htm">Job Opportunities</a>'
menuAbout[5]='<a href="Mission.htm">Mission</a>'
menuAbout[6]='<a href="Pastor.htm">Pastor\'s Message</a>'
menuAbout[7]='<a href="Prayer.htm">Prayer</a>'
menuAbout[8]='<a href="Staff.htm">Staff</a>'
	


// * ************************************************* *
// * ************************************************* *
// * The following code is used to provide sub menus   *
// *         DO NOT MODIFY THIS COPIED CODE            *
// * ************************************************* *
// * ************************************************* *


/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

// Default variable values used in submenu code
var menuwidth='250px' //default menu width
var menubgcolor='56124B'  //menu bgcolor
var disappeardelay=300  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

// Display functions for submenus - DO NOT EDIT
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

// Adjusted x offset to move DIV to right in Nav list
if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")+80
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

// **************************************************
// **************************************************
// * The end of the submenu display code            *
// * The rest of this file defines the contents of  *
// *    the navigation column.                      *
// **************************************************
// **************************************************


//  Divider along top of navigation column
document.write("<IMG SRC=\"Images/Nav-Divide.jpg\" ALIGN=\"top\" WIDTH=\"201\" HEIGHT=\"3\" ALT=\"\" BORDER=\"0\">");

//  Spacer under the Divider along top of navigation column
document.write("<div class=\"Nav\">&nbsp;</div>");


//  Navigation links start here
document.write("<a href=\"index.htm\" class=\"White\"><div class=\"Nav\" ");
document.write("onmouseover='this.style.cursor=\"hand\";'>");
document.write("<img src=\"Images/Bullet-nav.gif\" border=\"0\">Home Page</div></A>");

document.write("<A onmouseover=\"dropdownmenu(this, event, menuNewSPUMC, '250px')\" ");
document.write("onclick=\"return clickreturnvalue()\" onmouseout=delayhidemenu() ");
document.write("href=\"index.htm\" class=\"White\"><div class=\"Nav\">");
document.write("<img src=\"Images/Bullet-nav.gif\" border=\"0\">New to St. Philip's?</div></A>");

document.write("<A onmouseover=\"dropdownmenu(this, event, menuNewsEvents, '250px')\" ");
document.write("onclick=\"return clickreturnvalue()\" onmouseout=delayhidemenu() ");
document.write("href=\"index.htm\" class=\"White\"><div class=\"Nav\">");
document.write("<img src=\"Images/Bullet-nav.gif\" border=\"0\">News and Events</div></A>");

document.write("<A onmouseover=\"dropdownmenu(this, event, menuWorship, '300px')\" ");
document.write("onclick=\"return clickreturnvalue()\" onmouseout=delayhidemenu() ");
document.write("href=\"index.htm\" class=\"White\"><div class=\"Nav\">");
document.write("<img src=\"Images/Bullet-nav.gif\" border=\"0\">Worship</div></A>");

document.write("<A onmouseover=\"dropdownmenu(this, event, menuEducation, '250px')\" ");
document.write("onclick=\"return clickreturnvalue()\" onmouseout=delayhidemenu() ");
document.write("href=\"index.htm\" class=\"White\"><div class=\"Nav\">");
document.write("<img src=\"Images/Bullet-nav.gif\" border=\"0\">Education</div></A>");

document.write("<A onmouseover=\"dropdownmenu(this, event, menuPrograms, '250px')\" ");
document.write("onclick=\"return clickreturnvalue()\" onmouseout=delayhidemenu() ");
document.write("href=\"index.htm\" class=\"White\"><div class=\"Nav\">");
document.write("<img src=\"Images/Bullet-nav.gif\" border=\"0\">Ministries</div></A>");

document.write("<A onmouseover=\"dropdownmenu(this, event, menuOpportunities, '250px')\" ");
document.write("onclick=\"return clickreturnvalue()\" onmouseout=delayhidemenu() ");
document.write("href=\"index.htm\" class=\"White\"><div class=\"Nav\">");
document.write("<img src=\"Images/Bullet-nav.gif\" border=\"0\">Opportunities To Give</div></A>");


document.write("<A onmouseover=\"dropdownmenu(this, event, menuOrganizations, '300px')\" ");
document.write("onclick=\"return clickreturnvalue()\" onmouseout=delayhidemenu() ");
document.write("href=\"index.htm\" class=\"White\"><div class=\"Nav\">");
document.write("<img src=\"Images/Bullet-nav.gif\" border=\"0\">Organizations</div></A>");

document.write("<A onmouseover=\"dropdownmenu(this, event, menuAbout, '250px')\" ");
document.write("onclick=\"return clickreturnvalue()\" onmouseout=delayhidemenu() ");
document.write("href=\"index.htm\" class=\"White\"><div class=\"Nav\">");
document.write("<img src=\"Images/Bullet-nav.gif\" border=\"0\">About St. Philip's</div></A>");



//  Spacer under last link in the navigation column
document.write("<BR>&nbsp;");

