
/***********************************************
* 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
***********************************************/

var menu1=new Array()
menu1[0]='<a href="/senate/about.php">About the Senate</a>'
menu1[1]='<a href="/senate/welcome.php">President\'s Welcome</a>'
menu1[2]='<a href="/senate/seal/index.php">Senate Seal</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="/senate/meetings.php">Minutes and Agendas</a>'
menu2[1]='<a href="/senate/meetings_all.php">Committee Meetings</a>'
menu2[2]='<a href="/senate/attendance.php">Attendance</a>'
menu2[3]='<a href="/senate/voting.php">Voting Records</a>'
		
var menu3=new Array()
menu3[0]='<a href="/senate/bills.php">Legislation</a>'
menu3[1]='<a href="/senate/reports.php">Committee Reports</a>'
menu3[2]='<a href="/senate/SBD/index.php"><i>Student Body Documents</i></a>'
		
var menu4=new Array()
menu4[0]='<a href="/academics/index.php">Academics</a>'
menu4[1]='<a href="/campus_community/index.php">Campus Community</a>'
menu4[2]='<a href="/finance/index.php">Finance</a>'
menu4[3]='<a href="/government_operations/index.php">Government Operations</a>'
menu4[4]='<a href="/public_affairs/index.php">Public Affairs</a>'
menu4[5]='<a href="/tuition_and_fees/index.php">Tuition &amp; Fees</a>'
menu4[6]='<a href="http://students.ncsu.edu/home/group.php?grpid=515">Leadership Development</a>'
menu4[7]='<a href="/university_affairs/index.php">University Affairs</a>'
menu4[8]='<a href="/senate/appropriations.php">Appropriations</a>'
	
var menu5=new Array()
menu5[0]='<a href="/senate/directory.php">Senate Directory List</a>'
menu5[1]='<a href="/senate/directory.php?mode=directory_photos"><b>Senator Photos</b></a>'
menu5[2]='<a href="/senate/officers.php">Senate Officers</a>'	

var menu6=new Array()
menu6[0]='<a href="/senate/delegation.php?grp=del_cals">CALS</a>'
menu6[1]='<a href="/senate/delegation.php?grp=del_chass">CHASS</a>'
menu6[2]='<a href="/senate/delegation.php?grp=del_design">Design</a>'
menu6[3]='<a href="/senate/delegation.php?grp=del_edu">Education</a>'
menu6[4]='<a href="/senate/delegation.php?grp=del_engr">Engineering</a>'
menu6[5]='<a href="/senate/delegation.php?grp=del_fyc">First-Year College</a>'
menu6[6]='<a href="/senate/delegation.php?grp=del_grad">Graduate School</a>'
menu6[7]='<a href="/senate/delegation.php?grp=del_lle">Life-Long Education</a>'
menu6[8]='<a href="/senate/delegation.php?grp=del_com">Management</a>'
menu6[9]='<a href="/senate/delegation.php?grp=del_cnr">Natural Resources</a>'
menu6[10]='<a href="/senate/delegation.php?grp=del_pams">PAMS</a>'
menu6[11]='<a href="/senate/delegation.php?grp=del_tx">Textiles</a>'
menu6[12]='<a href="/senate/delegation.php?grp=del_vet">Veterinary Medicine</a>'
		
var menuexec=new Array()
menuexec[0]='<a href="/exec/index.php">Main Page</a>'
menuexec[1]='<a href="/treasury/index.php">Treasury</a>'
menuexec[2]='<a href="/wsi/index.php">Wolfpack Student Initiative</a>'
menuexec[3]='<a href="/wolfaides/index.php">Wolf Aides Program</a>'	
menuexec[4]='<a href="/vote/index.php">Board of Elections</a>'	

var menudt1=new Array()
menudt1[0]='<a href="/treasury/reimburse.php">Procedures</a>'
menudt1[1]='<a href="/treasury/forms/dtform_expense_auth.pdf">Authorization Form</a>'
menudt1[2]='<a href="/treasury/forms/dtform_reimbursement.pdf">Reimbursement Form</a>'
		
var menudt2=new Array()
menudt2[0]='<a href="/finance/index.php">Finance</a>'
menudt2[1]='<a href="/senate/appropriations.php">Appropriations</a>'
menudt2[2]='<a href="/senate/budget.php">Budget</a>'				
menudt2[3]='<a href="/tuition_and_fees/index.php">Tuition &amp; Fees</a>'

var menudt3=new Array()
menudt3[0]='<a href="/treasury/treasury_policy_checks.html">Check Policy</a>'
menudt3[1]='<a href="/treasury/treasury_policy_payroll.html">Payroll Policy</a>'
menudt3[2]='<a href="/senate/SBD/C-PDF/ch5.pdf">Financial Statutes</a>'

var menudt4=new Array()
menudt4[0]='<a href="/treasury/blog.php">Treasury Blog</a>'
menudt4[1]='<a href="/treasury/directory.php">Directory</a>'

var menuexec1=new Array()
menuexec1[0]='<a href="/treasury/index.php">Dept. of the Treasury</a>'
menuexec1[1]='<a href="/government_relations/index.php">Dept. of Government Relations</a>'
menuexec1[2]='<a href="/community_service/index.php">Dept. of Community Outreach</a>'
menuexec1[3]='<a href="/web/index.php">Div. of Web Development</a>'
menuexec1[4]='<a href="/executive_management/index.php">Div. of Executive Management</a>'
menuexec1[5]='<a href="/wsi/index.php">Wolfpack Student Initiative</a>'
menuexec1[6]='<a href="/wolfaides/index.php">Wolf Aides Program</a>'	
menuexec1[7]='<a href="/vote/index.php">Board of Elections</a>'	

var menuexec2=new Array()
menuexec2[0]='<a href="/diversity/index.php">Diversity Commission</a>'
menuexec2[1]='<a href="/exec/traditions.php">Traditions Commission</a>'
menuexec2[2]='<a href="/exec/hillsborough.php">Hillsborough St. Commission</a>'
menuexec2[3]='<a href="/community_service/nightwalk.php">Nightwalk Commission</a>'
menuexec2[4]='<a href="/exec/publicity/">Publicity Commission</a>'
menuexec2[5]='<a href="/exec/sustainability/">Sustainability Commission</a>'

var menuexec3=new Array()
menuexec3[0]='<a href="/exec/cabinet.php">Presidential Cabinet</a>'
menuexec3[1]='<a href="/exec/staff.php">President\'s Staff</a>'
menuexec3[2]='<a href="/exec/eo-ssp.php">Senate President\'s Staff</a>'
menuexec3[3]='<a href="/exec/eo-sbt.php">Treasurer\'s Staff</a>'
menuexec3[4]='<a href="/exec/tuition/index.php>Tuition &amp; Fees</a>'

var menuexec4=new Array()
menuexec4[0]='<a href="/exec/directory.php">Directory List</a>'
menuexec4[1]='<a href="/exec/officers.php">Officers</a>'

var menuhome1=new Array()	// info
menuhome1[0]='<a href="/home/overview.php">SG Overview</a>'
menuhome1[1]='<a href="/home/howl.php">Announcement Listserv</a>'
menuhome1[2]='<a href="/senate/SBD/index.php"><i>Student Body Documents</i></a>'
menuhome1[3]='<a href="/home/logos.php">SG Logos</a>'
menuhome1[4]='<a href="/home/moresg.php">More Student Governance</a>'
var menuhome2=new Array()	// calendar
menuhome2[0]='<a href="/home/meetings.php">SG Meeting Documents</a>'
menuhome2[1]='<a href="/home/calendar.php">Overall Calendar</a>'
menuhome2[2]='<a href="/senate/meetings.php">Senate Meetings</a>'
var menuhome3=new Array()	// directory
menuhome3[0]='<a href="/home/directory.php">SG Directory List</a>'
menuhome3[1]='<a href="/home/directory_search.php">Search SG Directory</a>'
menuhome3[2]='<a href="/home/officers.php">SG Officers</a>'
menuhome3[3]='<a href="/senate/directory.php">Senate Directory</a>'
menuhome3[4]='<a href="/exec/directory.php">Executive Directory</a>'
menuhome3[5]='<a href="/judicial/directory.php">Judicial Directory</a>'
var menuhome4=new Array()	// join
menuhome4[0]='<a href="/home/get_involved.php">Getting Involved</a>'
menuhome4[1]='<a href="/vote/index.php">Spring &amp; Fall Elections</a>'
menuhome4[2]='<a href="/exec/apply.php">Executive Appointments</a>'
menuhome4[3]='<a href="/wolfaides/index.php">Wolf Aides Program</a>'

var menuwidth='165px' //default menu width
var menubgcolor='white'  //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>')

if (ie4||ns6)
document.write('<div id="dropmenudivtop" 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 dropdownmenutop(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudivtop") : dropmenudivtop
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

