var cssdropdown={disappeardelay:250,disablemenuclick:true,enableswipe:1,dropmenuobj:null,ie:document.all,firefox:document.getElementById&&!document.all,swipetimer:undefined,bottomclip:0,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 0;
},swipeeffect:function(){
if(this.bottomclip<parseInt(this.dropmenuobj.offsetHeight)){
this.bottomclip+=10+(this.bottomclip/10);
this.dropmenuobj.style.clip="rect(0 auto "+this.bottomclip+"px 0)";
}else{
return;
}
this.swipetimer=setTimeout("cssdropdown.swipeeffect()",10);
},showhide:function(_5,e){
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(this.enableswipe==1){
if(typeof this.swipetimer!="undefined"){
clearTimeout(this.swipetimer);
}
_5.clip="rect(0 auto 0 0)";
this.bottomclip=0;
this.swipeeffect();
}
_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(_7,_8){
var _9=0;
if(_8=="rightedge"){
var _a=this.ie&&!window.opera?this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15:window.pageXOffset+window.innerWidth-15;
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth;
if(_a-this.dropmenuobj.x<this.dropmenuobj.contentmeasure){
_9=this.dropmenuobj.contentmeasure-_7.offsetWidth;
}
}else{
var _b=this.ie&&!window.opera?this.iecompattest().scrollTop:window.pageYOffset;
var _a=this.ie&&!window.opera?this.iecompattest().scrollTop+this.iecompattest().clientHeight-15:window.pageYOffset+window.innerHeight-18;
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight;
if(_a-this.dropmenuobj.y<this.dropmenuobj.contentmeasure){
_9=this.dropmenuobj.contentmeasure+_7.offsetHeight;
if((this.dropmenuobj.y-_b)<this.dropmenuobj.contentmeasure){
_9=this.dropmenuobj.y+_7.offsetHeight-_b;
}
}
}
return _9;
},dropit:function(_c,e,_e){
if(this.dropmenuobj!=null){
this.dropmenuobj.style.visibility="hidden";
}
this.clearhidemenu();
if(this.ie||this.firefox){
_c.onmouseout=function(){
cssdropdown.delayhidemenu();
};
_c.onclick=function(){
return !cssdropdown.disablemenuclick;
};
this.dropmenuobj=document.getElementById(_e);
this.dropmenuobj.onmouseover=function(){
cssdropdown.clearhidemenu();
};
this.dropmenuobj.onmouseout=function(){
cssdropdown.dynamichide(e);
};
this.dropmenuobj.onclick=function(){
cssdropdown.delayhidemenu();
};
this.showhide(this.dropmenuobj.style,e);
this.dropmenuobj.x=this.getposOffset(_c,"left");
this.dropmenuobj.y=this.getposOffset(_c,"top");
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(_c,"rightedge")+"px";
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(_c,"bottomedge")+_c.offsetHeight+1+"px";
}
},contains_firefox:function(a,b){
while(b.parentNode){
if((b=b.parentNode)==a){
return true;
}
}
return false;
},dynamichide:function(e){
var _12=window.event?window.event:e;
if(this.ie&&!this.dropmenuobj.contains(_12.toElement)){
this.delayhidemenu();
}else{
if(this.firefox&&e.currentTarget!=_12.relatedTarget&&!this.contains_firefox(_12.currentTarget,_12.relatedTarget)){
this.delayhidemenu();
}
}
},delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'",this.disappeardelay);
},clearhidemenu:function(){
if(this.delayhide!="undefined"){
clearTimeout(this.delayhide);
}
},startchrome:function(){
for(var ids=0;ids<arguments.length;ids++){
var _14=document.getElementById(arguments[ids]).getElementsByTagName("a");
for(var i=0;i<_14.length;i++){
if(_14[i].getAttribute("rel")){
var _16=_14[i].getAttribute("rel");
_14[i].onmouseover=function(e){
var _18=typeof e!="undefined"?e:window.event;
cssdropdown.dropit(this,_18,this.getAttribute("rel"));
};
}
}
}
}};
