var dropdowncontent={disableanchorlink:true,hidedivmouseout:[true,200],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(c,b,f){if(!this.isContained(c,f)){var f=window.event||f;if(f.type=="click"&&b.style.visibility=="visible"){b.style.visibility="hidden";return}var a=(b.dropposition[0]=="left")?-(b.offsetWidth-c.offsetWidth):0;var d=(b.dropposition[1]=="top")?-b.offsetHeight:c.offsetHeight;b.style.left=this.getposOffset(c,"offsetLeft")+a+"px";b.style.top=this.getposOffset(c,"offsetTop")+d+"px";b.style.clip=(b.dropposition[1]=="top")?"rect(auto auto auto 0)":"rect(0 auto 0 0)";b.style.visibility="visible";b.startTime=new Date().getTime();b.contentheight=parseInt(b.offsetHeight);if(typeof window["hidetimer_"+b.id]!="undefined"){clearTimeout(window["hidetimer_"+b.id])}this.slideengine(b,(b.dropposition[1]=="top")?"up":"down")}},curveincrement:function(a){return(1-Math.cos(a*Math.PI))/2},slideengine:function(d,e){var a=new Date().getTime()-d.startTime;if(a<d.glidetime){var c=(e=="down")?this.curveincrement(a/d.glidetime):1-this.curveincrement(a/d.glidetime);var b=(c*d.contentheight)+"px";d.style.clip=(e=="down")?"rect(0 auto "+b+" 0)":"rect("+b+" auto auto 0)";window["glidetimer_"+d.id]=setTimeout(function(){dropdowncontent.slideengine(d,e)},10)}else{d.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"},ajaxconnect:function(b,a){var f=false;var d="";if(window.XMLHttpRequest){f=new XMLHttpRequest()}else{if(window.ActiveXObject){try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}}else{return false}}document.getElementById(a).innerHTML=this.ajaxloadingmsg;f.onreadystatechange=function(){dropdowncontent.loadpage(f,a)};if(this.ajaxbustcache){d=(b.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime()}f.open("GET",b+d,true);f.send(null)},loadpage:function(b,a){if(b.readyState==4&&(b.status==200||window.location.href.indexOf("http")==-1)){document.getElementById(a).innerHTML=b.responseText}},init:function(e,g,f,d){var b=document.getElementById(e);var a=document.getElementById(b.getAttribute("rel"));var c=b.getAttribute("rev");if(c!=null&&c!=""){this.ajaxconnect(c,b.getAttribute("rel"))}a.dropposition=g.split("-");a.glidetime=f||1000;a.style.left=a.style.top=0;if(typeof d=="undefined"||d=="mouseover"){b.onmouseover=function(h){dropdowncontent.show(this,a,h)};b.onmouseout=function(h){dropdowncontent.hide(a,a,h)}}else{if(d=="focus"){b.onfocus=function(h){dropdowncontent.show(this,a,h)};b.onblur=function(h){dropdowncontent.hide(a,a,h)}}else{b.onclick=function(h){dropdowncontent.show(this,a,h);return false}}}if(this.hidedivmouseout[0]==true){a.onmouseout=function(h){dropdowncontent.hide(this,a,h)}}}};