
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(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"},ajaxconnect:function(a,b){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(b).innerHTML=this.ajaxloadingmsg;f.onreadystatechange=function(){dropdowncontent.loadpage(f,b)};if(this.ajaxbustcache){d=(a.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime()}f.open("GET",a+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(a,g,f,e){var c=document.getElementById(a);var d=document.getElementById(c.getAttribute("rel"));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)}}}};function getCookie(a){var b=new RegExp(a+"=[^;]+","i");if(document.cookie.match(b)){return document.cookie.match(b)[0].split("=")[1]}return null}function setCookie(b,c,e){var a=new Date();var d=(typeof e!="undefined")?a.setDate(a.getDate()+parseInt(e)):a.setDate(a.getDate()-5);document.cookie=b+"="+c+"; expires="+a.toGMTString()+"; path=/"}function deleteCookie(a){setCookie(a,"moot")}function setStylesheet(c){var a,b;for(a=0;(b=document.getElementsByTagName("link")[a]);a++){if(b.getAttribute("rel").indexOf("style")!=-1&&b.getAttribute("title")){b.disabled=true;if(b.getAttribute("title")==c){b.disabled=false}}}}function chooseStyle(a,b){if(document.getElementById){setStylesheet(a);setCookie("mysheet",a,b)}}function indicateSelected(b){var a;if(selectedtitle!=null&&(b.type==undefined||b.type=="select-one")){var b=(b.type=="select-one")?b.options:b;for(a=0;a<b.length;a++){if(b[a].value==selectedtitle){if(b[a].tagName=="OPTION"){b[a].selected=true}else{b[a].checked=true}break}}}}var selectedtitle=getCookie("mysheet");if(document.getElementById&&selectedtitle!=null){setStylesheet(selectedtitle)};