/***********************************************
* 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]='Information Desk'
menu1[1]='Building Hours'
menu1[2]='Building Info.'
menu1[3]='Maps of the Union & Handicap Access'
menu1[4]='Lost and Found'
//menu1[3]='Union Renovation Information - B.U.M.P.'
//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='Art & Learning Center'
menu2[1]='Campus Calendar of Events'
menu2[2]='Union Gallery'
menu2[3]='TerpZone - Bowling/Billiards/Arcade'
menu2[4]='Student Entertainment Events - SEE'
menu2[5]='Ticket Office'
menu2[6]='Weekends at Maryland'
menu2[7]='The Hoff Theater'
var menu3=new Array()
menu3[0]='Information Desk'
//menu3[1]='Commuter Affairs & Community'
menu3[1]='Chevy Chase Bank'
menu3[2]='Mail Boxes, Etc.'
//menu3[3]='STAR center'
menu3[3]='State Employees Credit Union - SECU'
menu3[4]='Undergraduate Student Legal Aid'
menu3[5]='Graduate Student Legal Aid'
menu3[6]='Ticket Office'
menu3[7]='Union Shop'
menu3[8]='University Book Center'
menu3[9]='Design & Copy Services'
menu3[10]='Campus Reservation and Event Planning'
menu3[11]='Catering'
menu3[12]='Audio Visual Services'
menu3[13]='Locker Rentals'
menu3[14]='Student Organization Resource'
var menu4=new Array()
menu4[0]='General Information'
menu4[1]='Alphabetical Listing of Student Groups'
menu4[2]='Fraternities & Sororities'
//menu4[3]='Sports & Hobbies'
menu4[3]='Multicultural Involvement and Community Advocacy'
menu4[4]='Community Service Learning'
menu4[5]='Office of Campus Programs'
menu4[6]='Maryland Leadership Development Program'
menu4[7]='Off-Campus Housing Services'
menu4[8]='Graduate Student Life'
menu4[9]='Graduate Student Handbook'
menu4[10]='Commuter Student Involvement'
menu4[11]='Union Photo Archive'
var menu5=new Array()
menu5[0]='Office of Campus Reservations'
menu5[1]='Off-Campus Housing Services'
menu5[2]='Multicultural Involvement and Community Advocacy'
menu5[3]='Office of Fraternity & Sorority Life'
menu5[4]='Maryland Leadership Development Program'
menu5[5]='Office of Campus Programs'
menu5[6]='University Book Center'
menu5[7]='National Clearinghouse for Commuter Programs'
menu5[8]='National Clearinghouse for Leadership Programs'
menu5[9]='Office of Community Service-Learning'
menu5[10]='Human Resources'
menu5[11]='Main Administrative Office'
menu5[12]='The Memorial Chapel'
menu5[13]='Commuter Student Involvement'
//menu5[7]='Orientation Office'
//menu5[8]='Administrative Offices'
//menu5[9]='Stamp Student Union Program & Service Units'
var menuwidth='165px' //default menu width
var menubgcolor='#EFECEA' //menu bgcolor
var disappeardelay=1000 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
var delayhide;
/////No further editting needed
var ie4=document.all
var ns6=document.getElementById&&!document.all
if (ie4||ns6)
document.write('
')
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=obj.offsetParent.offsetLeft
}
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=obj.offsetParent.offsetTop
}
return edgeoffset
}
/* Original populate menu by Dynamic Drive
function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}
*/
function menu_move_in(menu){
eval(menu).style.background='#FFFF99';
}
function menu_move_out(menu){
eval(menu).style.background='#EFECEA';
}
function menu_go(link){
location.href=link;
}
function populatemenu(what){
if (ie4||ns6){
rows = what.length<5? what.length:5; // number of rows in one column
columns=Math.ceil(what.length/rows); // number of columns needed; it depends on the size of the menu and the number of rows
// content = "";
menu_bar_content = "";
menu_bar_content1 = "";
for(i=0;i";
for(j=0;j"));
if (i == 0){
if (j == 0)
menu_bar_content = menu_bar_content + " | ";
else if(j < columns - 1)
menu_bar_content = menu_bar_content + " | ";
else
menu_bar_content1 = menu_bar_content1 + " | ";
}else{
if (j == 0)
menu_bar_content = menu_bar_content + " | ";
else if(j < columns - 1)
menu_bar_content = menu_bar_content + " | ";
else
menu_bar_content1 = menu_bar_content1 + " | ";
}
}
}
menu_bar_content = menu_bar_content + "";
}
// dropmenuobj.innerHTML= content + " | ";
dropmenuobj.innerHTML= "" + menu_bar_content1 + " | |
";
}
return eval(columns * 151);
}
/* Original dropdownmenu by Dynamic Drive
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 dropdownmenu(obj, e, menucontents){
/*
d = new Date() //today's date
while (1)
{
mill=new Date() // Date Now
diff = mill-d //difference in milliseconds
if( diff > 500 ) {break;}
}
*/
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
table_w = populatemenu(menucontents)
if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", table_w);
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
function resize_table(){
if(ns6)
document.getElementById('page_table').style.width=self.innerWidth - 50;
else
page_table.style.width = document.body.clientWidth - 50;
}