/***********************************************
* 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
***********************************************/

//July 14th, 08": Custom mod. Adds fade in/out effect using jQuery 1.2.x
var fadespeed=300 //fade speed in milliseconds

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="/westcampus/academics/coursedescriptions.pdf">Course Descriptions</a>'
menu1[1]='<a href="/westcampus/academics/finearts.html">Fine Arts</a>'
menu1[2]='<a href="/westcampus/academics/technology.html">Technology</a>'
menu1[3]='<a href="/westcampus/academics/spanish.html">Spanish</a>'
menu1[4]='<a href="/westcampus/academics/yearbook.html">Yearbook</a>'
menu1[5]='<a href="/westcampus/academics/tutoring.html">Tutoring</a>'

var menu2=new Array()
menu2[0]='<a href="/westcampus/athletics/index.html">Overview</a>'
menu2[1]='<a href="/westcampus/athletics/sportscalendar.html">Sports Calendar</a>'
menu2[2]='<a href="/westcampus/athletics/baseball.html">Baseball</a>'
menu2[3]='<a href="/westcampus/athletics/basketball.html">Basketball</a>'
menu2[4]='<a href="/westcampus/athletics/cheer.html">Cheerleading</a>'
menu2[5]='<a href="/westcampus/athletics/cc.html">Cross Country</a>'
menu2[6]='<a href="/westcampus/athletics/football.html">Football</a>'
menu2[7]='<a href="/westcampus/athletics/golf.html">Golf</a>'
menu2[8]='<a href="/westcampus/athletics/soccer.html">Soccer</a>'
menu2[9]='<a href="/westcampus/athletics/softball.html">Softball</a>'
menu2[10]='<a href="/westcampus/athletics/tennis.html">Tennis</a>'
menu2[11]='<a href="/westcampus/athletics/track.html">Track and Field</a>'
menu2[12]='<a href="/westcampus/athletics/volleyball.html">Volleyball</a>'
menu2[13]='<a href="/westcampus/athletics/warriorclub.html">Warrior Club </a>'
menu2[14]='<a href="http://98.192.152.235:80/warriorlive">Warrior Web Cast</a>'

var menu3=new Array()
menu3[0]='<a href="/westcampus/orgs/index.html">Overview</a>'
menu3[1]='<a href="/westcampus/orgs/index.html#artleague">Art League</a>'
menu3[2]='<a href="/westcampus/orgs/fca.html">FCA</a>'
menu3[3]='<a href="/westcampus/orgs/index.html#mathteam">Math Team</a>'
menu3[4]='<a href="/westcampus/orgs/index.html#mualphatheta">Mu Alpha Theta</a>'
menu3[5]='<a href="/westcampus/orgs/index.html#nhs">Natl Honor Society</a>'
menu3[6]='<a href="/westcampus/orgs/index.html#scholarsbowl">Scholars Bowl</a>'
menu3[7]='<a href="/westcampus/orgs/index.html#spanishclub">Spanish</a>'
menu3[8]='<a href="/westcampus/orgs/index.html#sga">SGA</a>'


var menu4=new Array()
menu4[0]='<a href="/westcampus/life/bellschedule.html">Bell Schedule</a>'
menu4[1]='<a href="/westcampus/life/chapel.html">Chapel Schedule</a>'
menu4[2]='<a href="/westcampus/life/photos.html">School Photos</a>'

var menu7=new Array()
menu7[0]='<a href="/churchcampus/academics/index.html">Overview</a>'
menu7[1]='<a href="/churchcampus/academics/preschool/index.html">Preschool</a>'
menu7[2]='<a href="/churchcampus/academics/elementary/index.html">Elementary</a>'
menu7[3]='<a href="/churchcampus/academics/middle/index.html">Middle School</a>'
menu7[4]='<a href="/churchcampus/academics/finearts/index.html">Fine Arts</a>'
menu7[5]='<a href="/churchcampus/academics/technology/index.html">Technology</a>'
menu7[6]='<a href="/churchcampus/academics/library/index.html">Library</a>'
menu7[7]='<a href="/churchcampus/academics/spanish/index.html">Spanish</a>'
menu7[8]='<a href="/churchcampus/academics/enrichment/index.html">Enrichment</a>'

var menu8=new Array()
menu8[0]='<a href="/churchcampus/athletics/index.html">Overview</a>'
menu8[1]='<a href="/churchcampus/athletics/sportscalendar.html">Sports Calendar</a>'
menu8[2]='<a href="/churchcampus/athletics/baseball.html">Baseball</a>'
menu8[3]='<a href="/churchcampus/athletics/basketball.html">Basketball</a>'
menu8[4]='<a href="/churchcampus/athletics/cheer.html">Cheerleading</a>'
menu8[5]='<a href="/churchcampus/athletics/football.html">Football</a>'
menu8[6]='<a href="/churchcampus/athletics/runningclub.html">Running Club</a>'
menu8[7]='<a href="/churchcampus/athletics/softball.html">Softball</a>'
menu8[8]='<a href="/churchcampus/athletics/volleyball.html">Volleyball</a>'


var menu9=new Array()
menu9[0]='<a href="/churchcampus/orgs/index.html">Overview</a>'
menu9[1]='<a href="/churchcampus/orgs/robotics.html">Robotics</a>'
menu9[2]='<a href="/churchcampus/orgs/science.html">Science Olympiad</a>'
menu9[3]='<a href="/churchcampus/orgs/scholarsbowl.html">Scholars Bowl</a>'
menu9[4]='<a href="/churchcampus/orgs/mathteam.html">Math Team</a>'
menu9[5]='<a href="/churchcampus/orgs/council.html">Student Council</a>'
menu9[6]='<a href="/churchcampus/orgs/buildersclub.html">Builders Club</a>'
menu9[7]='<a href="/churchcampus/orgs/soundteam.html">Sound Team</a>'
menu9[8]='<a href="/churchcampus/orgs/techteam.html">Tech Team</a>'
menu9[9]='<a href="/churchcampus/orgs/buddies.html">Big Buddies</a>'
menu9[10]='<a href="/churchcampus/orgs/spellingbee.html">Spelling Bee</a>'
menu9[11]='<a href="/churchcampus/orgs/geographybee.html">Geography Bee</a>'
menu9[12]='<a href="/churchcampus/orgs/discgolf.html">Disc Golf</a>'

var menu10=new Array()
menu10[0]='<a href="/churchcampus/life/chapel.html">Chapel Schedule</a>'
menu10[1]='<a href="/churchcampus/life/schedule.html">School Schedule</a>'
menu10[2]='<a href="/churchcampus/life/photos.html">School Photos</a>'
menu10[3]='<a href="/churchcampus/life/BeforeAfterCare.html">Before/After School</a>'



var menuwidth='770px' //default menu width
var menubgcolor='ffffff'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="drophmenudiv" 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="0"
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("drophmenudiv") : drophmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+100+"px"
dropmenuobj.style.top=dropmenuobj.y+obj.offsetHeight-19+"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

