var dropdowncontent={disableanchorlink:false,hidedivmouseout:[true,70],ajaxloadingmsg:"Loading content. Please wait...",ajaxbustcache:true,getposOffset:function(b,a){return(b.offsetParent)?b[a]+this.getposOffset(b.offsetParent,a):b[a]},isContained:function(a,b){var b=window.event||b;var d=b.relatedTarget||((b.type=="mouseover")?b.fromElement:b.toElement);while(d&&d!=a){try{d=d.parentNode}catch(b){d=a}}if(d==a){return true}else{return false}},show:function(b,d,f){if(!this.isContained(b,f)||(f&&f.type=="click")){var f=window.event||f;if(f.type=="click"&&d.style.visibility=="visible"){d.style.visibility="hidden";return}var c=(d.dropposition[0]=="left")?-(d.offsetWidth-b.offsetWidth):0;var a=(d.dropposition[1]=="top")?-d.offsetHeight:b.offsetHeight;d.style.left=this.getposOffset(b,"offsetLeft")+c+"px";d.style.top=this.getposOffset(b,"offsetTop")+a+"px";d.style.clip=(d.dropposition[1]=="top")?"rect(auto auto auto 0)":"rect(0 auto 0 0)";d.style.visibility="visible";d.startTime=new Date().getTime();d.contentheight=parseInt(d.offsetHeight);if(typeof window["hidetimer_"+d.id]!="undefined"){clearTimeout(window["hidetimer_"+d.id])}this.slideengine(d,(d.dropposition[1]=="top")?"up":"down")}},curveincrement:function(a){return(1-Math.cos(a*Math.PI))/2},slideengine:function(e,d){var b=new Date().getTime()-e.startTime;if(b<e.glidetime){var a=(d=="down")?this.curveincrement(b/e.glidetime):1-this.curveincrement(b/e.glidetime);var c=(a*e.contentheight)+"px";e.style.clip=(d=="down")?"rect(0 auto "+c+" 0)":"rect("+c+" auto auto 0)";window["glidetimer_"+e.id]=setTimeout(function(){dropdowncontent.slideengine(e,d)},10)}else{e.style.clip="rect(0 auto auto 0)"}},hide:function(b,a,c){if(!dropdowncontent.isContained(b,c)){window["hidetimer_"+a.id]=setTimeout(function(){a.style.visibility="hidden";a.style.left=a.style.top=0;clearTimeout(window["glidetimer_"+a.id])},dropdowncontent.hidedivmouseout[1])}},hidediv:function(a){document.getElementById(a).style.visibility="hidden"},init:function(a,g,f,e){var c=document.getElementById(a);var d=document.getElementById("event_"+a);var b=c.getAttribute("rev");if(b!=null&&b!=""){this.ajaxconnect(b,c.getAttribute("rel"))}d.dropposition=g.split("-");d.glidetime=f||1000;d.style.left=d.style.top=0;if(typeof e=="undefined"||e=="mouseover"){c.onmouseover=function(h){dropdowncontent.show(this,d,h)};c.onmouseout=function(h){dropdowncontent.hide(d,d,h)};if(this.disableanchorlink){c.onclick=function(){return false}}}else{c.onclick=function(h){dropdowncontent.show(this,d,h);return false}}if(this.hidedivmouseout[0]==true){d.onmouseout=function(h){dropdowncontent.hide(this,d,h)}}}};
