var cssdropdown={disappeardelay:190,dropdownindicator:"",enablereveal:[true,5],enableiframeshim:1,dropmenuobj:null,asscmenuitem:null,domsupport:document.all||document.getElementById,standardbody:null,iframeshimadded:false,revealtimers:{},getposOffset:function(e,f){var g=(f=="left")?e.offsetLeft:e.offsetTop;var h=e.offsetParent;while(h!=null){g=(f=="left")?g+h.offsetLeft:g+h.offsetTop;h=h.offsetParent}return g},css:function(g,h,f){var e=new RegExp("(^|\\s+)"+h+"($|\\s+)","ig");if(f=="check"){return e.test(g.className)}else{if(f=="remove"){g.className=g.className.replace(e,"")}else{if(f=="add"&&!e.test(g.className)){g.className+=" "+h}}}},showmenu:function(c,d){if(this.enablereveal[0]){if(!c._trueheight||c._trueheight<10){c._trueheight=c.offsetHeight}clearTimeout(this.revealtimers[c.id]);c.style.height=c._curheight=0;c.style.overflow="hidden";c.style.visibility="visible";this.revealtimers[c.id]=setInterval(function(){cssdropdown.revealmenu(c)},10)}else{c.style.visibility="visible"}this.css(this.asscmenuitem,"selected","add")},revealmenu:function(i,k){var j=i._curheight,g=i._trueheight,h=this.enablereveal[1];if(j<g){var l=Math.min(j,g);i.style.height=l+"px";i._curheight=l+Math.round((g-l)/h)+1}else{i.style.height="auto";i.style.overflow="hidden";clearInterval(this.revealtimers[i.id])}},clearbrowseredge:function(m,h){var i=0;if(h=="rightedge"){var n=document.all&&!window.opera?this.standardbody.scrollLeft+this.standardbody.clientWidth-15:window.pageXOffset+window.innerWidth-15;var j=this.dropmenuobj.offsetWidth;if(n-this.dropmenuobj.x<j){i=j-m.offsetWidth}}else{var k=document.all&&!window.opera?this.standardbody.scrollTop:window.pageYOffset;var n=document.all&&!window.opera?this.standardbody.scrollTop+this.standardbody.clientHeight-15:window.pageYOffset+window.innerHeight-18;var l=this.dropmenuobj._trueheight;if(n-this.dropmenuobj.y<l){i=l+m.offsetHeight;if((this.dropmenuobj.y-k)<l){i=this.dropmenuobj.y+m.offsetHeight-k}}}return i},dropit:function(f,d,e){if(this.dropmenuobj!=null){this.hidemenu()}this.clearhidemenu();this.dropmenuobj=document.getElementById(e);this.asscmenuitem=f;this.showmenu(this.dropmenuobj,d);this.dropmenuobj.x=this.getposOffset(f,"left");this.dropmenuobj.y=this.getposOffset(f,"top");this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(f,"rightedge")+"px";this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(f,"bottomedge")+f.offsetHeight+"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(e,c){var c=window.event||c;var f=c.relatedTarget||((c.type=="mouseover")?c.fromElement:c.toElement);while(f&&f!=e){try{f=f.parentNode}catch(c){f=e}}if(f==e){return true}else{return false}},dynamichide:function(d,c){if(!this.isContained(d,c)){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(){if(this.delayhide!="undefined"){clearTimeout(this.delayhide)}},addEvent:function(d,f,e){if(d.addEventListener){d.addEventListener(e,f,false)}else{if(d.attachEvent){d.attachEvent("on"+e,function(){return f.call(d,window.event)})}}},startchrome:function(){if(!this.domsupport){return}this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;for(var k=0;k<arguments.length;k++){var i=document.getElementById(arguments[k]).getElementsByTagName("a");for(var e=0;e<i.length;e++){if(i[e].getAttribute("rel")){var h=i[e].getAttribute("rel");var l=document.getElementById(h);this.addEvent(l,function(){cssdropdown.clearhidemenu()},"mouseover");this.addEvent(l,function(a){cssdropdown.dynamichide(this,a)},"mouseout");this.addEvent(l,function(){cssdropdown.delayhidemenu()},"click");try{i[e].innerHTML=i[e].innerHTML+" "+this.dropdownindicator}catch(j){}this.addEvent(i[e],function(a){if(!cssdropdown.isContained(this,a)){var b=window.event||a;cssdropdown.dropit(this,b,this.getAttribute("rel"))}},"mouseover");this.addEvent(i[e],function(a){cssdropdown.dynamichide(this,a)},"mouseout");this.addEvent(i[e],function(){cssdropdown.delayhidemenu()},"click")}}}if(this.enableiframeshim&&document.all&&!window.XDomainRequest&&!this.iframeshimadded){document.write('<IFRAME id="iframeshim" src="about:blank" 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}}};
