

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

//Contents for about us
var aboutus=new Array()
aboutus[0]='<a href="http://www.straymond.org/aboutus/contact">Contact Us</a>'
aboutus[1]='<a href="http://www.straymond.org/aboutus/directory">Faculty/Staff Directory</a>'
aboutus[2]='<a href="http://www.straymond.org/aboutus/news">SRS in the news</a>'
aboutus[3]='<a href="http://www.straymondsparish.org/">St. Raymond Church</a>'

//Contents for academics
var academics=new Array()
academics[0]='<a href="http://www.straymond.org/aboutus/directory">Faculty/Staff Directory</a>'
academics[1]='<a href="http://www.straymond.org/academics/kinder/">Kindergarten</a>'
academics[2]='<a href="http://www.straymond.org/academics/1st/">First</a>'
academics[3]='<a href="http://www.straymond.org/academics/2nd/">Second</a>'
academics[4]='<a href="http://www.straymond.org/academics/3rd/">Third</a>'
academics[5]='<a href="http://www.straymond.org/academics/4th/">Fourth</a>'
academics[6]='<a href="http://www.straymond.org/academics/5th/">Fifth</a>'
academics[7]='<a href="http://www.straymond.org/academics/6th/">Sixth</a>'
academics[8]='<a href="http://www.straymond.org/academics/7th/">Seventh</a>'
academics[9]='<a href="http://www.straymond.org/academics/8th/">Eighth</a>'
academics[10]='<a href="http://www.straymond.org/academics/pim/">Mr. Pim</a>'
academics[11]='<a href="http://www.straymond.org/academics/sullivan/">Mr. Sullivan</a>'
academics[12]='<a href="http://www.straymond.org/academics/computer/">Computers</a>'
academics[13]='<a href="http://www.straymond.org/academics/art/">Fine Arts</a>'
academics[14]='<a href="http://www.straymond.org/academics/garden/">Garden Program</a>'
academics[15]='<a href="http://www.straymond.org/academics/learning.expect.php">Learning Expectations</a>'
academics[16]='<a href="http://powerschoolsmsc.org/public/">PowerSchool Login</a>'

//Contents for parents
var parents=new Array()
parents[0]='<a href="http://www.straymond.org/bulletins/">Weekly Bulletin</a>'
parents[1]='<a href="http://www.straymond.org/parents/moms/">Mothers\' Club</a>'
parents[2]='<a href="http://www.straymond.org/parents/men/">Men\'s Club</a>'
parents[3]='<a href="http://www.straymond.org/parents/scrip/">SCRIP</a>'
parents[4]='<a href="http://www.straymond.org/parents/moms/index.php?id=forms">Forms</a>'
parents[5]='<a href="http://www.straymond.org/parents/lunch/">Hot Lunch</a>'
parents[6]='<a href="http://www.straymond.org/parents/auction">Auction 2009</a>'
parents[7]='<a href="http://straymond.smugmug.com">Photo Gallery</a>'
parents[8]='<a href="http://www.shieldthevulnerable.org/">Shield the Vulnerable</a>'

//Contents for students
var students=new Array()
students[0]='<a href="http://powerschoolsmsc.org/public/">PowerSchool Login</a>'
students[1]='<a href="http://www.straymond.org/students/council/">Student Council</a>'
students[2]='<a href="http://www.straymond.org/students/decathlon/">Academic Decathlon</a>'
students[3]='<a href="http://www.straymond.org/students/trivia/">Trivia Contest</a>'

//Contents for athletics
var athletics=new Array()
athletics[0]='<a href="http://www.straymond.org/athletics/">Main Page</a>'
athletics[1]='<a href="http://www.straymond.org/athletics/baseball/">Baseball</a>'
athletics[2]='<a href="http://www.straymond.org/athletics/basketball/">Basketball</a>'
athletics[3]='<a href="http://www.straymond.org/athletics/volleyball/">Volleyball</a>'
athletics[4]='<a href="http://www.straymond.org/athletics/track/">Track & Field</a>'
athletics[5]='<a href="http://www.straymond.org/athletics/boosters/">Boosters</a>'
athletics[6]='<a href="http://maps.google.com/maps/ms?ie=UTF8&hl=en&t=h&om=1&msa=0&msid=105860239094517962620.000437cb6574feb3b02dc&ll=37.565807,-122.315598&spn=0.33146,0.792389&z=11">Directions</a>'
athletics[7]='<a href="http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=105860239094517962620.000437ccca29dda1118de&ll=37.518205,-122.312351&spn=0.336574,0.593262&t=h&z=11&om=1">Baseball Fields</a>'

//Contents for bulletins
var bulletins=new Array()
bulletins[0]='<a href="http://www.straymond.org/bulletins/">2008 - 2009</a>'


//Contents for calendar
var calendar=new Array()
calendar[0]='<a href="http://www.straymond.org/calendar/">2008 - 2009</a>'
		
//Contents for admissions
var admissions=new Array()
bulletins[0]='<a href="http://www.straymond.org/admissions/">Admissions</a>'

var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //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="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="-500px"
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)

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")+"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
