/***********************************************
* AnyLink Vertical 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 Sustainablity 
var menup1=new Array()
menup1[0]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/academics.html">Academics</a>'
menup1[1]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/diningservices.html">Dining Services</a>'
menup1[2]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/facilitiesservices.html">Facilities Services</a>'
menup1[3]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/horticulture.html">Horticulture</a>'
menup1[4]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/parkinggarage.html">Parking Garage</a>'
menup1[5]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/perduebuilding.html">Perdue Building</a>'
menup1[6]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/physicalplant.html">Physical Plant</a>'
menup1[7]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/reshall.html">Resident Hall Renovations</a>'
menup1[8]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/studentinitiatives.html">Student Initiatives</a>'
menup1[9]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/tetc.html">Teacher Education and Technology Center</a>'
menup1[10]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/ward.html">Ward Museum of Wildfowl Art</a>'
menup1[11]='<a href="http://www.salisbury.edu/president/sustainabilityinitiatives/otherinitiatives.html">Other Initiatives</a>'

//Contents for menup 2  Incoming Student
/*
var menup2=new Array()
menup2[0]='<a href="/perdueadvising/New_Students">Incoming Students Home</a>'
menup2[1]='<a href="/perdueadvising/New_Students/napscores.html">AP Scores</a>'
menup2[2]='<a href="/perdueadvising/New_Students/transfer.html">MD Community College Transfer</a>'
menup2[3]='<a href="/perdueadvising/New_students/preview.html">Preview Information</a>'
*/
//Contents for menup 3 Faculty and Staff
/*
var menup3=new Array()
menup3[0]='<a href="/perdueadvising/faculty/">Faculty & Staff Home</a>'
menup3[1]='<a href="/perdueadvising/faculty/advisinginfo.html">Advising Information</a>'
menup3[2]='<a href="/perdueadvising/faculty/contactsresources.html">Contacts & Resources</a>'
*/
//Contents for menup 4 Parents
/*
var menup4=new Array()
menup4[0]='<a href="/perdueadvising/parents/">Parents Home</a>'
//menup4[1]='<a href="/perdueadvising/parents/F06%20Fact%20Sheet.doc">Perdue Facts</a>'
menup4[2]='<a href="/perdueadvising/parents/keystohelp.html">Keys to Help Your Student</a>'
menup4[3]='<a href="/perdueadvising/parents/parentnewsletter.html">Parent Newsletter</a>'
*/
		
var disappeardelay=500  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=2 //horizontal offset of menu from default location. (0-5 is a good value)

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv1" style="visibility:hidden;width: 160px" onMouseover="clearhidemenuvp()" onMouseout="dynamichidevp(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 showhidevp(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj1.style.left=dropmenuobj1.style.top=-500
dropmenuobj1.widthobj=dropmenuobj1.style
dropmenuobj1.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
dropmenuobj1.contentmeasure=dropmenuobj1.offsetWidth
if (windowedge-dropmenuobj1.x-obj.offsetWidth < dropmenuobj1.contentmeasure)
edgeoffset=dropmenuobj1.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
dropmenuobj1.contentmeasure=dropmenuobj1.offsetHeight
if (windowedge-dropmenuobj1.y < dropmenuobj1.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj1.contentmeasure-obj.offsetHeight
if ((dropmenuobj1.y-topedge)<dropmenuobj1.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj1.y
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj1.innerHTML=what.join("")
}


function dropdownmenu1(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenuvp()
dropmenuobj1=document.getElementById? document.getElementById("dropmenudiv1") : dropmenudiv1
populatemenu(menucontents)

if (ie4||ns6){
showhidevp(dropmenuobj1.style, e, "visible", "hidden", menuwidth)
dropmenuobj1.x=getposOffset(obj, "left")
dropmenuobj1.y=getposOffset(obj, "top")
dropmenuobj1.style.left=dropmenuobj1.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj1.style.top=dropmenuobj1.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 dynamichidevp(e){
if (ie4&&!dropmenuobj1.contains(e.toElement))
delayhidemenuvp()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenuvp()
}

function hidemenu(e){
if (typeof dropmenuobj1!="undefined"){
if (ie4||ns6)
dropmenuobj1.style.visibility="hidden"
}
}

function delayhidemenuvp(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenuvp(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}