//Contents for menu 1 side drop down
var menu1=new Array()
//menu1[0]='<a class=topmenuLink  href="">Menu Item 1</a>'
//menu1[1]='<a class=menuLink href="">Menu Item 2</a>'
//menu1[2]='<a class=menuLink href="">Menu Item 3</a>'
//menu1[3]='<a class=menuLink href="">Menu Item 4</a>'

//Contents for menu "About Us"
var menu2=new Array()
menu2[0]='<a class=topmenuLink  href="gateway.html">School History</a>'
menu2[1]='<a class=menuLink href="./admin.html">Administrative Staff</a>'
menu2[2]='<a class=menuLink href="http://www.thezonelive.com/zone/02_SchoolStructure/IL_RichEastHS/Handbook.pdf" target=_blank>Rules and Regulations</a>'
menu2[3]='<a class=menuLink href="RICHEAST.pdf">2009 School Report Card</a>'
//menu2[4]='<a class=menuLink href="http://www.rich227.org/alumni/index.asp">Alumni Online</a>'
//menu2[5]='<a class=menuLink href="http://www.richeast.org/htwmgateway.html">HTWM Website</a>'

//Contents for menu "For Students"
var menu3=new Array()
menu3[0]='<a class=topmenuLink href="http://www.thezonelive.com/zone/02_SchoolStructure/IL_RichEastHS/Handbook.pdf" target=_blank>Student-Parent Handbook</a>'
menu3[1]='<a class=menuLink href="media.html">Media Center</a>'
menu3[2]='<a class=menuLink href="athletics_gateway.html">Athletics and Activities</a>'
menu3[3]='<a class=menuLink href="students.html">Course Information</a>'
menu3[4]='<a class=menuLink href="http://www.richeast.org/RE-Sept09.pdf">Food Services</a>'
menu3[5]='<a class=menuLink href="http://www.richeast.org/use.pdf">Technology Acceptable Use Policy</a>'
//menu3[6]='<a class=menuLink href="http://www.richeast.org/htwmgateway.html">HTWM Website</a>'
menu3[7]='<a class=menuLink href="PPSEast.html">Guidance and Student Services</a>'
menu3[8]='<a class=menuLink href="http://www.rich227.org/powerschool-login.html">PowerSchool Login</a>'
menu3[9]='<a class=menuLink href="http://www.richeast.org/CurriculumHandbook2010-11.pdf">Curriculum Handbook</a>'

//menu3[2]='<a class=menuLink href="">Alumni Information</a>'

//Contents for menu "For Parents"
var menu4=new Array()
menu4[0]='<a class=topmenuLink href="http://www.thezonelive.com/zone/02_SchoolStructure/IL_RichEastHS/Handbook.pdf" target=_blank>Student-Parent Handbook</a>'
//menu4[1]='<a class=menuLink href="http://www.richeast.org/announce.html">Announcements</a>'
menu4[2]='<a class=menuLink href="http://www.richeast.org/athletics_gateway.html">Athletics and Activities</a>'
menu4[3]='<a class=menuLink href="http://www.thezonelive.com/zone/public/schoolHome.asp?CID=644" target=_blank>Calendar of Events</a>'
menu4[4]='<a class=menuLink href="http://www.richeast.org/RE-Sept09.pdf">Food Services</a>'
menu4[5]='<a class=menuLink href="http://www.richeast.org/use.pdf">Technology Acceptable Use Policy</a>'
menu4[6]='<a class=menuLink href="PPSEast.html">Guidance and Student Services</a>'
menu4[7]='<a class=menuLink href="http://www.rich227.org/powerschool-login.html">PowerSchool Login</a>'
menu4[8]='<a class=menuLink href="http://www.richeast.org/CurriculumHandbook2010-11.pdf">Curriculum Handbook</a>'

//Contents for menu "For Staff"
var menu5=new Array()
menu5[0]='<a class=topmenuLink href="https://mail.rich227.org/">Staff E-mail</a>'
menu5[1]='<a class=menuLink href="http://www.generalasp.com/Rich227/onlineapp/" target=_blank>Employment Opportunities</a>'
menu5[2]='<a class=menuLink href="http://www.rich227.org/pdf/owa.pdf" target=_blank>Outlook Web Access Manual</a>'
menu5[3]='<a class=menuLink href="http://www.richeast.org/use.pdf">Technology Acceptable Use Policy</a>'
menu5[4]='<a class=menuLink href="http://www.bcbsil.com/">Blue Cross Illinois</a>'
menu5[5]='<a class=menuLink href="http://www.rich227.org/powerschool-login.html">PowerSchool Login</a>'
menu5[6]='<a class=menuLink href="http://www.richeast.org/Discipline_Referral.doc">Discipline Referral Form</a>'
menu5[7]='<a class=menuLink href="http://www.richeast.org/CurriculumHandbook2010-11.pdf">Curriculum Handbook</a>'

//Contents for menu "Communities"
var menu6=new Array()
menu6[0]='<a class=topmenuLink href="http://www.olympia-fields.com" target=_blank>Olympia Fields</a>'
menu6[1]='<a class=menuLink href="http://www.villageofparkforest.com/index.php?src=" target=_blank>Park Forest</a>'
menu6[2]='<a class=menuLink href="http://www.richtonpark.org" target=_blank>Richton Park</a>'
menu6[3]='<a class=menuLink href="http://www.vil.matteson.il.us" target=_blank>Matteson</a>'


var menuwidth='165px' //default menu width
var menubgcolor='#FFBE00'  //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=-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 windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
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")+obj.offsetWidth+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"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
