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


/********************************************
*  Format for menu items:
*  var variableName=new Array()
*  press[0]='<a href="location">name</a>'
*  press[x]='<a href="location">name</a>'
********************************************/


var press=new Array()
press[0]='<a href="'+r+'press/publications.php"><img src="'+r+'images/bar.gif"> Publications</a>'
press[1]='<a href="'+r+'press/teamsakura.php"><img src="'+r+'images/bar.gif"> Team Sakura</a>'
press[2]='<a href="'+r+'press/photos.php"><img src="'+r+'images/bar.gif"> Photos</a>'
press[3]='<a href="'+r+'press/flyers.php"><img src="'+r+'images/bar.gif"> Flyers</a>'
//press[4]='<a href="'+r+'press/application.php"><img src="'+r+'images/bar.gif"> Press Application</a>'
//press[5]='<a href="'+r+'sponsors/application.php"><img src="'+r+'images/bar.gif"> Industry Application</a>'
//press[4]='<a href="'+r+'press/survey/index.php"><img src="'+r+'images/bar.gif"> Survey</a>'


var programming=new Array()
//programming[0]='<a href="'+r+'programming/events.php"><img src="'+r+'images/bar.gif"> Events</a>'
programming[0]='<a href="'+r+'programming/contests.php"><img src="'+r+'images/bar.gif"> Contests</a>'
//programming[2]='<a href="'+r+'programming/amv/"><img src="'+r+'images/bar.gif"> AMV</a>'
//programming[3]='<a href="'+r+'programming/cosplay.php"><img src="'+r+'images/bar.gif"> Cosplay</a>'
//programming[4]='<a href="'+r+'programming/gaming.php"><img src="'+r+'images/bar.gif"> Gaming</a>'
programming[1]='<a href="'+r+'programming/panels.php"><img src="'+r+'images/bar.gif"> Panels</a>'
programming[2]='<a href="'+r+'programming/dances.php"><img src="'+r+'images/bar.gif"> Dances</a>'
programming[3]='<a href="'+r+'programming/schedule.php"><img src="'+r+'images/bar.gif"> Schedule</a>'
programming[4]='<a href="'+r+'programming/charity_auction.php"><img src="'+r+'images/bar.gif"> Charity Auction</a>'


var hotels=new Array()
/*
hotels[0]='<a href="'+r+'hotels/renaissance.php"><img src="'+r+'images/bar.gif"> Renaissance</a>'
hotels[1]='<a href="'+r+'hotels/crowne_plaza.php"><img src="'+r+'images/bar.gif"> Crowne Plaza</a>'
hotels[2]='<a href="'+r+'hotels/red_lion.php"><img src="'+r+'images/bar.gif"> Red Lion</a>'
hotels[3]='<a href="'+r+'hotels/sheraton.php"><img src="'+r+'images/bar.gif"> Sheraton</a>'
hotels[4]='<a href="'+r+'hotels/paramount.php"><img src="'+r+'images/bar.gif"> Paramount</a>'
hotels[5]='<a href="'+r+'hotels/roosevelt.php"><img src="'+r+'images/bar.gif"> Roosevelt</a>'
hotels[6]='<a href="'+r+'hotels/hilton.php"><img src="'+r+'images/bar.gif"> Hilton</a>'
hotels[7]='<a href="'+r+'hotels/grand_hyatt.php"><img src="'+r+'images/bar.gif"> Grand Hyatt</a>'
hotels[8]='<a href="'+r+'hotels/homewood_suites.php"><img src="'+r+'images/bar.gif"> Homewood Suites</a>'
*/

var volunteering=new Array()
volunteering[0]='<a href="'+r+'volunteering/volunteer_faq.php"><img src="'+r+'images/bar.gif"> Volunteering FAQ</a>'
volunteering[1]='<a href="'+r+'volunteering/jobs.php"><img src="'+r+'images/bar.gif"> Staff Openings</a>'
volunteering[2]='<a href="'+r+'aboutus/meetings.php"><img src="'+r+'images/bar.gif"> General Meetings</a>'
volunteering[3]='<a href="'+rs+'staff/index.php"><img src="'+r+'images/bar.gif"> Staff Login/Home</a>'


var aboutus=new Array()
aboutus[0]='<a href="http://www.ancea.org"><img src="'+r+'images/bar.gif"> ANCEA</a>'
aboutus[1]='<a href="'+r+'aboutus/history.php"><img src="'+r+'images/bar.gif"> History</a>'
aboutus[2]='<a href="'+r+'location/index.php"><img src="'+r+'images/bar.gif"> Location</a>'
aboutus[3]='<a href="'+r+'aboutus/faq.php"><img src="'+r+'images/bar.gif"> FAQ</a>'
aboutus[4]='<a href="'+r+'aboutus/contactus.php"><img src="'+r+'images/bar.gif"> Contact Us</a>'
aboutus[5]='<a href="'+r+'aboutus/meetings.php"><img src="'+r+'images/bar.gif"> General Meetings</a>'
aboutus[6]='<a href="'+r+'aboutus/policies.php"><img src="'+r+'images/bar.gif"> Policies</a>'
aboutus[7]='<a href="'+r+'documents/anceabylaws.pdf" target="_blank"><img src="'+r+'images/bar.gif"> Bylaws</a>'



var menuwidth='100px' //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
/////No further editting needed
/////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
}

function fullpage(){
var footer = document.getElementById("disclaimer")
var pageheight = getposOffset(document.getElementById("disclaimer"), "top")
if(getposOffset(document.getElementById("disclaimer"), "top") < screen.availHeight-159){
footer.style.height = screen.availHeight-getposOffset(document.getElementById("disclaimer"), "top")-159
}
}
