var base="http://www.resstpaul.org/"

/***********************************************
* 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 menu 1
var menu1=new Array()
menu1[0]='<a href="'+ base +'about/blueribbon.php" >Blue Ribbon School</a>'
menu1[1]='<a href="'+ base +'about/stem.php">STEM</a>'
menu1[2]='<a href="'+ base +'about/fastfacts.php" >Fast Facts</a>'
menu1[3]='<a href="'+ base +'about/values.php" >Values</a>'

menu1[4]='<a href="'+ base +'about/awards.php" >Awards/Scholarships</a>'
menu1[5]='<a href="'+ base +'about/facility.php" >Facility</a>'
menu1[6]='<a href="'+ base +'about/beforeaftercare.php" >Before/After Care</a>'
menu1[7]='<a href="'+ base +'about/schoolboard.php" >School Board</a>'
menu1[8]='<a href="'+ base +'about/homeschoolassoc.php" >Home School Assoc.</a>'
menu1[9]='<a href="'+ base +'about/faq.php" >FAQ</a>'
menu1[10]='<a href="'+ base +'about/location.php" >Location</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="'+ base +'admissions/requirements.php" >Requirements</a>'
menu2[1]='<a href="'+ base +'admissions/applications.php" >Applications</a>'
menu2[2]='<a href="'+ base +'admissions/openhouses.php" >Open House Info.</a>'
menu2[3]=' <a href="'+ base +'admissions/tuition.php">Tuition</a> '
menu2[4]=' <a href="'+ base +'admissions/financialaid.php" >Financial Aid</a> '


var menu3=new Array()
menu3[0]='<a href="'+ base +'academics/curriculum.php">Curriculum</a>'
menu3[1]='<a href="'+ base +'academics/assessment.php" >Assessment</a>'
//menu3[2]='<a href="../academics/leap.php" title="LEAP">LEAP</a>'
menu3[2]='<a href="'+ base +'academics/testscores.php" >Test Scores</a>'
menu3[3]='<a href="'+ base +'academics/textbooks.php" >Text Books</a>'
menu3[4]='<a href="'+ base +'academics/beyondgraduation.php" >Beyond Graduation</a>'

var menu4=new Array()
menu4[0]='<a href="'+ base +'families/newsletter.php" >News &amp; Notes</a>'

menu4[1]='<a href="'+ base +'calendar/index.php" >School Calendar</a>'
menu4[2]='<a href="'+ base +'families/healthroom.php" >Health Room Notes</a>'
menu4[3]='<a href="'+ base +'families/hotlunch.php" >Hot Lunch</a>'
menu4[4]='<a href="'+ base +'families/schedule.php">Class Schedules</a>'
menu4[5]='<a href="'+ base +'families/activities.php" >Student Activities</a>'
menu4[6]='<a href="'+ base +'families/busing.php">Busing</a>'
menu4[7]='<a href="'+ base +'families/stand.php" >STAND Certification</a>' 
//menu4[8]='<a href="../families/emailsignup.php" title="Email Alerts">Email Alerts Sign Up</a>' 
menu4[8]='<a href="'+ base +'families/forms.php" >Forms</a>' 



var menu5=new Array()
menu5[0]='<a href="'+ base +'giving/annualfund.php" >Annual Fund</a>'
menu5[1]='<a href="'+ base +'giving/corpgifts.php" >Corporate Matching</a>'
menu5[2]='<a href="'+ base +'giving/fundraising.php" >Fundraising Activities</a>'		
menu5[3]='<a href="'+ base +'giving/loyaltyprograms.php" >Loyalty Programs</a>'
menu5[4]='<a href="'+ base +'giving/volunteeropp.php">Volunteer</a>'
menu5[5]='<a href="'+ base +'giving/outreach.php" >RSPS Outreach</a>'
menu5[6]='<a href="'+ base +'events/index.php" >Events</a>'


 




//var menu6=new Array()
//menu6[0]='<a href="../contact/staff.php" title="Staff">Staff</a>' 
//menu6[1]='<a href="../contact/summercontacts.php" title="Summer Contacts">Summer Contacts</a>' 


    



var menuwidth='135px' //default menu width
var menubgcolor='#8E1814;'  //menu bgcolor
var disappeardelay=400  //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


