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(_1,_2){
var _3=(_2=="left")?_1.offsetLeft:_1.offsetTop;
var _4=_1.offsetParent;
while(_4!=null){
_3=(_2=="left")?_3+_4.offsetLeft:_3+_4.offsetTop;
_4=_4.offsetParent;
}
return _3;
},showhide:function(_5,e,_7){
if(this.ie||this.firefox){
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px";
}
if(e.type=="click"&&_5.visibility==hidden||e.type=="mouseover"){
if(_7.parentNode.className.indexOf("default")==-1){
_7.parentNode.className="selected";
}
_5.visibility="visible";
}else{
if(e.type=="click"){
_5.visibility="hidden";
}
}
},iecompattest:function(){
return (document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;
},clearbrowseredge:function(_8,_9){
var _a=0;
if(_9=="rightedge"){
var _b=this.ie&&!window.opera?this.standardbody.scrollLeft+this.standardbody.clientWidth-15:window.pageXOffset+window.innerWidth-15;
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth;
if(_b-this.dropmenuobj.x<this.dropmenuobj.contentmeasure){
_a=this.dropmenuobj.contentmeasure-_8.offsetWidth;
}
}else{
var _c=this.ie&&!window.opera?this.standardbody.scrollTop:window.pageYOffset;
var _b=this.ie&&!window.opera?this.standardbody.scrollTop+this.standardbody.clientHeight-15:window.pageYOffset+window.innerHeight-18;
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight;
if(_b-this.dropmenuobj.y<this.dropmenuobj.contentmeasure){
_a=this.dropmenuobj.contentmeasure+_8.offsetHeight;
if((this.dropmenuobj.y-_c)<this.dropmenuobj.contentmeasure){
_a=this.dropmenuobj.y+_8.offsetHeight-_c;
}
}
this.dropmenuobj.firstlink.style.borderTopWidth=(_a==0)?0:"1px";
}
return _a;
},dropit:function(_d,e,_f){
if(this.dropmenuobj!=null){
this.dropmenuobj.style.visibility="hidden";
if(this.previousmenuitem!=null&&this.previousmenuitem!=_d){
if(this.previousmenuitem.parentNode.className.indexOf("default")==-1){
this.previousmenuitem.parentNode.className="";
}
}
}
this.clearhidemenu();
if(this.ie||this.firefox){
_d.onmouseout=function(){
tabdropdown.delayhidemenu(_d);
};
_d.onclick=function(){
return !tabdropdown.disablemenuclick;
};
this.dropmenuobj=document.getElementById(_f);
this.dropmenuobj.onmouseover=function(){
tabdropdown.clearhidemenu();
};
this.dropmenuobj.onmouseout=function(e){
tabdropdown.dynamichide(e,_d);
};
this.dropmenuobj.onclick=function(){
tabdropdown.delayhidemenu(_d);
};
this.showhide(this.dropmenuobj.style,e,_d);
this.dropmenuobj.x=this.getposOffset(_d,"left");
this.dropmenuobj.y=this.getposOffset(_d,"top");
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(_d,"rightedge")+"px";
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(_d,"bottomedge")+_d.offsetHeight+1+"px";
this.previousmenuitem=_d;
this.positionshim();
}
},contains_firefox:function(a,b){
while(b.parentNode){
if((b=b.parentNode)==a){
return true;
}
}
return false;
},dynamichide:function(e,_14){
var _15=window.event?window.event:e;
if(this.ie&&!this.dropmenuobj.contains(_15.toElement)){
this.delayhidemenu(_14);
}else{
if(this.firefox&&e.currentTarget!=_15.relatedTarget&&!this.contains_firefox(_15.currentTarget,_15.relatedTarget)){
this.delayhidemenu(_14);
}
}
},delayhidemenu:function(_16){
this.delayhide=setTimeout(function(){
tabdropdown.dropmenuobj.style.visibility="hidden";
if(_16.parentNode.className.indexOf("default")==-1){
_16.parentNode.className="";
}
},this.disappeardelay);
},clearhidemenu:function(){
if(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(_17){
var _17=_17.replace("http://"+_17.hostname,"").replace(/^\//,"");
return (tabdropdown.currentpageurl==_17);
},init:function(_18,_19){
this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;
var _1a=document.getElementById(_18).getElementsByTagName("a");
for(var i=0;i<_1a.length;i++){
if(_1a[i].getAttribute("rel")){
var _1c=_1a[i].getAttribute("rel");
document.getElementById(_1c).firstlink=document.getElementById(_1c).getElementsByTagName("a")[0];
_1a[i].onmouseover=function(e){
var _1e=typeof e!="undefined"?e:window.event;
tabdropdown.dropit(this,_1e,this.getAttribute("rel"));
};
}
if(_19=="auto"&&typeof _1f=="undefined"&&this.isSelected(_1a[i].href)){
_1a[i].parentNode.className+=" selected default";
var _1f=true;
}else{
if(parseInt(_19)==i){
_1a[i].parentNode.className+=" selected default";
}
}
}
}};


