var tabdropdown={disappeardelay:200,disablemenuclick:false,enableiframeshim:1,dropmenuobj:null,ie:document.all,firefox:document.getElementById&&!document.all,previousmenuitem:null,currentpageurl:window.location.href.replace("http://"+window.location.hostname,"").replace(/^\//,""),getposOffset:function(a,c){for(var b=c=="left"?a.offsetLeft:a.offsetTop,d=a.offsetParent;d!=null;)b=c=="left"?b+d.offsetLeft:b+d.offsetTop,d=d.offsetParent;return b},showhide:function(a,c,b){if(this.ie||this.firefox)this.dropmenuobj.style.left=
this.dropmenuobj.style.top="-500px";if(c.type=="click"&&a.visibility==hidden||c.type=="mouseover"){if(b.parentNode.className.indexOf("default")==-1)b.parentNode.className="selected";a.visibility="visible"}else if(c.type=="click")a.visibility="hidden"},iecompattest:function(){return document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body},clearbrowseredge:function(a,c){var b=0;if(c=="rightedge"){var d=this.ie&&!window.opera?this.standardbody.scrollLeft+this.standardbody.clientWidth-
15:window.pageXOffset+window.innerWidth-15;this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth;d-this.dropmenuobj.x<this.dropmenuobj.contentmeasure&&(b=this.dropmenuobj.contentmeasure-a.offsetWidth)}else{var e=this.ie&&!window.opera?this.standardbody.scrollTop:window.pageYOffset,d=this.ie&&!window.opera?this.standardbody.scrollTop+this.standardbody.clientHeight-15:window.pageYOffset+window.innerHeight-18;this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight;d-this.dropmenuobj.y<this.dropmenuobj.contentmeasure&&
(b=this.dropmenuobj.contentmeasure+a.offsetHeight,this.dropmenuobj.y-e<this.dropmenuobj.contentmeasure&&(b=this.dropmenuobj.y+a.offsetHeight-e));this.dropmenuobj.firstlink.style.borderTopWidth=b==0?0:"1px"}return b},dropit:function(a,c,b){if(this.dropmenuobj!=null&&(this.dropmenuobj.style.visibility="hidden",this.previousmenuitem!=null&&this.previousmenuitem!=a&&this.previousmenuitem.parentNode.className.indexOf("default")==-1))this.previousmenuitem.parentNode.className="";this.clearhidemenu();if(this.ie||
this.firefox)a.onmouseout=function(){tabdropdown.delayhidemenu(a)},a.onclick=function(){return!tabdropdown.disablemenuclick},this.dropmenuobj=document.getElementById(b),this.dropmenuobj.onmouseover=function(){tabdropdown.clearhidemenu()},this.dropmenuobj.onmouseout=function(b){tabdropdown.dynamichide(b,a)},this.dropmenuobj.onclick=function(){tabdropdown.delayhidemenu(a)},this.showhide(this.dropmenuobj.style,c,a),this.dropmenuobj.x=this.getposOffset(a,"left"),this.dropmenuobj.y=this.getposOffset(a,
"top"),this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(a,"rightedge")+"px",this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(a,"bottomedge")+a.offsetHeight+1+"px",this.previousmenuitem=a,this.positionshim()},contains_firefox:function(a,c){for(;c.parentNode;)if((c=c.parentNode)==a)return true;return false},dynamichide:function(a,c){var b=window.event?window.event:a;this.ie&&!this.dropmenuobj.contains(b.toElement)?this.delayhidemenu(c):this.firefox&&a.currentTarget!=
b.relatedTarget&&!this.contains_firefox(b.currentTarget,b.relatedTarget)&&this.delayhidemenu(c)},delayhidemenu:function(a){this.delayhide=setTimeout(function(){tabdropdown.dropmenuobj.style.visibility="hidden";if(a.parentNode.className.indexOf("default")==-1)a.parentNode.className=""},this.disappeardelay)},clearhidemenu:function(){this.delayhide!="undefined"&&clearTimeout(this.delayhide)},positionshim:function(){if(this.enableiframeshim&&typeof this.shimobject!="undefined"){if(this.dropmenuobj.style.visibility==
"visible")this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px",this.shimobject.style.height=this.dropmenuobj.offsetHeight+"px",this.shimobject.style.left=this.dropmenuobj.style.left,this.shimobject.style.top=this.dropmenuobj.style.top;this.shimobject.style.display=this.dropmenuobj.style.visibility=="visible"?"block":"none"}},hideshim:function(){if(this.enableiframeshim&&typeof this.shimobject!="undefined")this.shimobject.style.display="none"},isSelected:function(a){a=a.replace("http://"+
a.hostname,"").replace(/^\//,"");return tabdropdown.currentpageurl==a},init:function(a,c){this.standardbody=document.compatMode=="CSS1Compat"?document.documentElement:document.body;for(var b=document.getElementById(a).getElementsByTagName("a"),d=0;d<b.length;d++){if(b[d].getAttribute("rel")){var e=b[d].getAttribute("rel");document.getElementById(e).firstlink=document.getElementById(e).getElementsByTagName("a")[0];b[d].onmouseover=function(a){tabdropdown.dropit(this,typeof a!="undefined"?a:window.event,
this.getAttribute("rel"))}}if(c=="auto"&&typeof f=="undefined"&&this.isSelected(b[d].href)){b[d].parentNode.className+=" selected default";var f=true}else parseInt(c)==d&&(b[d].parentNode.className+=" selected default")}}};
