// JavaScript Document
/***********************************************
* 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 futureStudents=new Array()
futureStudents[0]='<a href="http://www.marshall.edu/admissions">Admissions</a>'
futureStudents[1]='<a href="http://www.marshall.edu/admissions/apply.asp">Apply Now</a>'
futureStudents[2]='<a href="http://www.marshall.edu/academic-affairs/catalogs.asp">Catalogs</a>'
futureStudents[3]='<a href="http://www.marshall.edu/recruitment/events/openhouse/">Campus Visit Programs</a>'
futureStudents[4]='<a href="http://www.marshall.edu/dining-services/mealplan.html">Dining Information</a>'
futureStudents[5]='<a href="http://fye.marshall.edu">First Year Experience</a>'
futureStudents[6]='<a href="http://www.marshall.edu/residence-services/">Housing Information</a>'
futureStudents[7]='<a href="http://www.marshall.edu/www/international.asp">International Programs</a>'
futureStudents[8]='<a href="http://fye.marshall.edu/pages/orientation.aspx">Orientation</a>'
futureStudents[9]='<a href="http://www.marshall.edu/recruitment">Request Information</a>'
futureStudents[10]='<a href="http://www.marshall.edu/futurestudents/" style="color:#18481d">More Links</a>'

var currentStudents=new Array()
currentStudents[5]='<a href="http://mymu.marshall.edu">myMU</a>'
currentStudents[4]='<a href="http://muonline.marshall.edu">MU Online</a>'
currentStudents[1]='<a href="http://www.marshall.edu/career-services/">Career Services</a>'
currentStudents[2]='<a href="http://www.greaterhuntington.com/">Community Links</a>'
currentStudents[3]='<a href="http://www.new.facebook.com/pages/Huntington-WV/Marshall-University/12244926481?ref=mf">Marshall Facebook</a>'
currentStudents[6]='<a href="https://epay.marshall.edu/secure/cgi/eparking.cgi">Parking Payment Center</a>'
currentStudents[0]='<a href="http://www.marshall.edu/bursar/">Bursar</a>'
currentStudents[7]='<a href="http://www.marshall.edu/registrar/">Registrar</a>'
currentStudents[8]='<a href="http://www.marshall.edu/milo/milocou.asp">Schedule of Courses</a>'
currentStudents[9]='<a href="http://www.marshall.edu/student-affairs/">Student Affairs</a>'
currentStudents[10]='<a href="http://www.marshall.edu/sga/">Student Government</a>'
currentStudents[11]='<a href="http://www.marshall.edu/www/student.asp" style="color:#18481d">All Student Links</a>'

var alumniFriends=new Array()
alumniFriends[0]='<a href="http://www.marshall.edu/alumni">Alumni Association</a>'
alumniFriends[1]='<a href="http://www.marshall.edu/blackalumni">Black Alumni Inc.</a>'
alumniFriends[2]='<a href="http://www.marshall.edu/career-services/">Career Services</a>'
alumniFriends[3]='<a href="http://www.marshalluniversityfoundation.com">MU Foundation</a>'
alumniFriends[4]='<a href="https://secure.groundspring.org/dn/index.php?aid=3210">Make a gift online</a>'
alumniFriends[5]='<a href="http://www.marshall.edu/muartser">Marshall Artists Series</a>'
alumniFriends[6]='<a href="http://www.herdzone.com">Marshall Athletics</a>'
alumniFriends[7]='<a href="http://www.marshall.edu/ucomm/mmag.html">Marshall Magazine</a>'
alumniFriends[8]='<a href="http://musom.marshall.edu/alumni/">School of Medicine Alumni</a>'
alumniFriends[9]='<a href="http://www.marshall.edu/www/alumni.asp" style="color:#18481d">All Alumni Links</a>'

var facStaff=new Array()
facStaff[2]='<a href="http://www.marshall.edu/ucs/">Computing Services</a>'
facStaff[8]='<a href="http://www.marshall.edu/academic-affairs/greenbook.asp">Greenbook</a>'
facStaff[7]='<a href="http://www.marshall.edu/graduate-council/">Graduate Council</a>'
facStaff[0]='<a href="http://www.marshall.edu/catl/">Ctr. For Adv. Of Teaching & Learning</a>'
facStaff[5]='<a href="http://www.marshall.edu/academic-affairs/facultyresources.htm">Faculty Resources</a>'
facStaff[9]='<a href="http://www.marshall.edu/human-resources/">Human Resources</a>'
facStaff[3]='<a href="http://www.marshall.edu/www/phonebook.asp">Directory</a>'
facStaff[4]='<a href="http://www.marshall.edu/senate/achieve/">Faculty Achievement Database</a>'
facStaff[1]='<a href="http://www.marshall.edu/staff-council/">Classified Staff Council</a>'
facStaff[6]='<a href="http://www.marshall.edu/senate/">Faculty Senate</a>'
facStaff[10]='<a href="http://www.marshall.edu/www/facultystaff.asp" style="color:#18481d">All Employee Links</a>'

var academics=new Array()
academics[0]='<a href="http://www.marshall.edu/academic-affairs/">Academic Affairs</a>'
academics[2]='<a href="http://www.marshall.edu/academic-affairs/degreeprograms.asp">Academic Programs</a>'
academics[3]='<a href="http://www.marshall.edu/www/administration.asp">Administration</a>'
academics[4]='<a href="http://www.marshall.edu/cae/">Ctr. For Acad Excellence/Honors</a>'
academics[5]='<a href="http://www.studymarshall.com/index.asp">Ctr. For Intl. Programs</a>'
academics[6]='<a href="http://www.marshall.edu/academic-affairs/collegesschools.htm">Colleges and Schools</a>'
academics[7]='<a href="http://www.marshall.edu/library/">Libraries</a>'
academics[8]='<a href="http://www.marshall.edu/www/student.asp?SubID=52">Student Resources</a>'
academics[1]='<a href="http://www.marshall.edu/calendar/academic/">Academic Calendar</a>'
academics[9]='<a href="http://www.marshall.edu/www/academics.asp" style="color:#18481d">All Academics Links</a>'

var research=new Array()
research[2]='<a href="http://www.marshall.edu/research/ori/">Office of Research Integrity</a>'
research[7]='<a href="http://www.marshall.edu/research/">VP of Research</a>'
research[3]='<a href="http://www.marshall.edu/research/centers.htm">Research Centers</a>'
research[1]='<a href="http://www.marshall.edu/murc/">MU Research Corporation</a>'
research[0]='<a href="http://www.marshall.edu/mu-advance/default.asp">MU Advance</a>'
research[5]='<a href="http://www.marshall.edu/sure/">SURE</a>'
research[4]='<a href="http://www.marshall.edu/urdc/">Research Day at the Capitol</a>'
research[6]='<a href="http://www.marshall.edu/mu-advance/WVGrants.asp">Undergraduate Research Funding</a>'
research[8]='<a href="http://www.marshall.edu/www/research.asp" style="color:#18481d">All Research Links</a>'

var athletics=new Array()
athletics[0]='<a href="http://herdzone.cstv.com">Athletics Main Site</a>'
athletics[1]='<a href="http://herdzone.cstv.com/big-green/">Big Green</a>'
athletics[2]='<a href="http://herdzone.cstv.com/sports/c-cheer/mars-c-cheer-body.html">Cheerleaders</a>'
athletics[3]='<a href="http://www.marshall.edu/cofa/music/band/">Marching Thunder</a>'
athletics[4]='<a href="http://www.marshall.edu/recsport/">Recreational Sports</a>'
athletics[5]='<a href="http://herdzone.cstv.com/calendar/events/">Schedules</a>'
athletics[6]='<a href="http://herdzone.cstv.com/tickets/mars-tickets.html">Ticket Office</a>'
athletics[7]='<a href="http://herdzone.cstv.com/s-finder/mars-s-finder.html">Varsity Sports</a>'
athletics[8]='<a href="http://www.marshall.edu/www/athletics.asp" style="color:#18481d">All Athletics Links</a>'

var menuwidth='225px' //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="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
