var cssdropdown={disappeardelay:250,dropdownindicator:"",enablereveal:[true,5],enableiframeshim:1,dropmenuobj:null,asscmenuitem:null,domsupport:document.all||document.getElementById,standardbody:null,iframeshimadded:false,revealtimers:{},getposOffset:function(a,b){var c=b=="left"?a.offsetLeft:a.offsetTop;for(a=a.offsetParent;a!=null;){c=b=="left"?c+a.offsetLeft:c+a.offsetTop;a=a.offsetParent}return c},css:function(a,b,c){var d=new RegExp("(^|\\s+)"+b+"($|\\s+)","ig");if(c=="check")return d.test(a.className);
else if(c=="remove")a.className=a.className.replace(d,"");else if(c=="add"&&!d.test(a.className))a.className+=" "+b},showmenu:function(a){if(this.enablereveal[0]){if(!a._trueheight||a._trueheight<10)a._trueheight=a.offsetHeight;clearTimeout(this.revealtimers[a.id]);a.style.height=a._curheight=0;a.style.overflow="hidden";a.style.visibility="visible";this.revealtimers[a.id]=setInterval(function(){cssdropdown.revealmenu(a)},10)}else a.style.visibility="visible";this.css(this.asscmenuitem,"selected",
"add")},revealmenu:function(a){var b=a._curheight,c=a._trueheight,d=this.enablereveal[1];if(b<c){b=Math.min(b,c);a.style.height=b+"px";a._curheight=b+Math.round((c-b)/d)+1}else{a.style.height="auto";a.style.overflow="hidden";clearInterval(this.revealtimers[a.id])}},clearbrowseredge:function(a,b){var c=0;if(b=="rightedge"){b=document.all&&!window.opera?this.standardbody.scrollLeft+this.standardbody.clientWidth-15:window.pageXOffset+window.innerWidth-15;var d=this.dropmenuobj.offsetWidth;if(b-this.dropmenuobj.x<
d)c=d-a.offsetWidth}else{d=document.all&&!window.opera?this.standardbody.scrollTop:window.pageYOffset;b=document.all&&!window.opera?this.standardbody.scrollTop+this.standardbody.clientHeight-15:window.pageYOffset+window.innerHeight-18;var f=this.dropmenuobj._trueheight;if(b-this.dropmenuobj.y<f){c=f+a.offsetHeight;if(this.dropmenuobj.y-d<f)c=this.dropmenuobj.y+a.offsetHeight-d}}return c},dropit:function(a,b,c){this.dropmenuobj!=null&&this.hidemenu();this.clearhidemenu();this.dropmenuobj=document.getElementById(c);
this.asscmenuitem=a;this.showmenu(this.dropmenuobj,b);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.positionshim()},positionshim:function(){if(this.iframeshimadded)if(this.dropmenuobj.style.visibility=="visible"){this.shimobject.style.width=this.dropmenuobj.offsetWidth+
"px";this.shimobject.style.height=this.dropmenuobj._trueheight+"px";this.shimobject.style.left=parseInt(this.dropmenuobj.style.left)+"px";this.shimobject.style.top=parseInt(this.dropmenuobj.style.top)+"px";this.shimobject.style.display="block"}},hideshim:function(){if(this.iframeshimadded)this.shimobject.style.display="none"},isContained:function(a,b){b=window.event||b;for(b=b.relatedTarget||(b.type=="mouseover"?b.fromElement:b.toElement);b&&b!=a;)try{b=b.parentNode}catch(c){b=a}return b==a?true:
false},dynamichide:function(a,b){this.isContained(a,b)||this.delayhidemenu()},delayhidemenu:function(){this.delayhide=setTimeout("cssdropdown.hidemenu()",this.disappeardelay)},hidemenu:function(){this.css(this.asscmenuitem,"selected","remove");this.dropmenuobj.style.visibility="hidden";this.dropmenuobj.style.left=this.dropmenuobj.style.top="-1000px";this.hideshim()},clearhidemenu:function(){this.delayhide!="undefined"&&clearTimeout(this.delayhide)},addEvent:function(a,b,c){if(a.addEventListener)a.addEventListener(c,
b,false);else a.attachEvent&&a.attachEvent("on"+c,function(){return b.call(a,window.event)})},startchrome:function(){if(this.domsupport){this.standardbody=document.compatMode=="CSS1Compat"?document.documentElement:document.body;for(var a=0;a<arguments.length;a++)for(var b=document.getElementById(arguments[a]).getElementsByTagName("a"),c=0;c<b.length;c++)if(b[c].getAttribute("rel")){var d=b[c].getAttribute("rel");d=document.getElementById(d);this.addEvent(d,function(){cssdropdown.clearhidemenu()},
"mouseover");this.addEvent(d,function(e){cssdropdown.dynamichide(this,e)},"mouseout");this.addEvent(d,function(){cssdropdown.delayhidemenu()},"click");try{b[c].innerHTML=b[c].innerHTML+" "+this.dropdownindicator}catch(f){}this.addEvent(b[c],function(e){cssdropdown.isContained(this,e)||cssdropdown.dropit(this,window.event||e,this.getAttribute("rel"))},"mouseover");this.addEvent(b[c],function(e){cssdropdown.dynamichide(this,e)},"mouseout");this.addEvent(b[c],function(){cssdropdown.delayhidemenu()},
"click")}if(this.enableiframeshim&&document.all&&!window.XDomainRequest&&!this.iframeshimadded){document.write('<IFRAME id="iframeshim" src="javascript:false;" frameBorder="0" scrolling="no" style="left:0; top:0; position:absolute; display:none;z-index:90; background: transparent;"></IFRAME>');this.shimobject=document.getElementById("iframeshim");this.shimobject.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";this.iframeshimadded=true}}}};
