var branch;function dropdownMenu(_1){var _2=typeof window.opera!="undefined";var _3=typeof document.all!="undefined"&&!_2&&navigator.vendor!="KDE";var _4=navigator.vendor=="Apple Computer, Inc.";if(typeof document.getElementById=="undefined"||(_4&&typeof window.XMLHttpRequest=="undefined")||(_3&&typeof document.uniqueID=="undefined")){return;}var _5=document.getElementById(_1);if(_5){var _6=_5.className.indexOf("horizontal")!=-1;branch=_5;var _7=_5.getElementsByTagName("li");for(var i=0;i<_7.length;i++){dropdownTrigger(_5,_7[i],_1,_3,_6);}if(!_2){cleanUselessWhitespace(_5);var _9=_4||_3?"keydown":"keypress";attachEventListener(document,_9,function(e){var _b=typeof e.target!="undefined"?e.target:e.srcElement;if(_5.contains(_b)&&_b.getAttribute("href")){if(/^(37|38|39|40)$/.test(e.keyCode.toString())){arrowKeyNavigation(_5,_b,e.keyCode,_6);if(typeof e.preventDefault!="undefined"){e.preventDefault();}return false;}}return true;},false);}var _c=typeof document.all!="undefined"?document.all:document.getElementsByTagName("*");for(i=0;i<_c.length;i++){attachEventListener(_c[i],"focus",function(e){var _e=typeof e.target!="undefined"?e.target:e.srcElement;if(!_5.contains(_e)){resetSiblingBranches(_7[0]);}},false);}if(!_3){_5.contains=function(_f){if(_f==null){return false;}if(_f==this){return true;}else{return this.contains(_f.parentNode);}};}}}function dropdownTrigger(_10,li,_12,_13,_14){var _15,closetime;var a=li.getElementsByTagName("a")[0];var _17=li.getElementsByTagName("ul").length>0?li.getElementsByTagName("ul")[0]:null;var _18=li.parentNode.id==_12;if(_17){li.className+=(li.className==""?"":" ")+"hasmenu";}attachEventListener(a,"focus",function(e){clearTimeout(closetime);a.className+=(a.className==""?"":" ")+"rollover";resetSiblingBranches(li);if(_17){showMenu(_17,_14,_18,li,a,_13);}var _1a=li.parentNode;if(_1a!=_10){if(_1a.style.left==""||_1a.style.left=="-100em"){showAncestors(_10,_1a,_14,_18,_13);}if(toggleSelects("visible")&&_10.contains(e.srcElement)){toggleSelects("hidden");}}},false);attachEventListener(li,"mouseover",function(e){if(unwantedTextEvent()){return;}clearTimeout(closetime);if(branch==li){branch=null;}a.className+=(a.className==""?"":" ")+"rollover";var _1c=typeof e.target!="undefined"?e.target:window.event.srcElement;while(_1c.nodeName.toUpperCase()!="LI"){_1c=_1c.parentNode;}if(_1c!=li){return;}if(_17){_15=window.setTimeout(function(){if(branch){clearMenus(branch);branch=null;}resetSiblingBranches(li);showMenu(_17,_14,_18,li,a,_13);},0);}},false);attachEventListener(li,"mouseout",function(e){if(unwantedTextEvent()){return;}var _1e=typeof e.relatedTarget!="undefined"?e.relatedTarget:window.event.toElement;if(!li.contains(_1e)){clearTimeout(_15);branch=li;a.className=a.className.replace(/ ?rollover/g,"");if(_17){closetime=window.setTimeout(function(){_17.style.left="-200em";if(toggleSelects("visible")&&_10.contains(_1e)){toggleSelects("hidden");}else{removeIframeLayer(_17);}},600);}}},false);if(!_13){li.contains=function(_1f){if(_1f==null){return false;}if(_1f==this){return true;}else{return this.contains(_1f.parentNode);}};}}function showMenu(_20,_21,_22,li,a,_25){_20.style.left=_21?(_25?li.offsetLeft+"px":"auto"):"0";repositionMenu(_20);if(typeof document.uniqueID!="undefined"){createIframeLayer(_20);}}function showAncestors(_26,_27,_28,_29,_2a){clearMenus(_26);while(_27.id!=_26.id){var li=_27.parentNode;var a=li.getElementsByTagName("a")[0];showMenu(_27,_28,_29,li,a,_2a);_27=li.parentNode;}}function resetSiblingBranches(_2d){clearMenus(_2d.parentNode);var _2e=_2d.parentNode.getElementsByTagName("a");for(var i=0;i<_2e.length;i++){_2e[i].className=_2e[i].className.replace(/ ?rollover/g,"");}}function cleanUselessWhitespace(_30){for(var x=0;x<_30.childNodes.length;x++){var _32=_30.childNodes[x];if(_32.nodeType==3&&!/\S/.test(_32.nodeValue)){_30.removeChild(_30.childNodes[x]);x--;}if(_32.nodeType==1){cleanUselessWhitespace(_32);}}}function mapKeyCode(_33,_34){switch(_34){case 0:if(_33==37){_33=39;}else{if(_33==39){_33=37;}}break;case 1:if(_33%2){_33++;}else{_33--;}break;case 2:if(_33==38){_33=37;}break;}return _33;}function arrowKeyNavigation(_35,_36,_37,_38){var li=_36.parentNode;var _3a=li.getElementsByTagName("ul").length>0?li.getElementsByTagName("ul")[0]:null;var _3b=li.parentNode;if(_3a){if(getRoughPosition(_3a,"x")<getRoughPosition(li.parentNode,"x")){_37=mapKeyCode(_37,0);}}else{if(_3b!=_35){if(getRoughPosition(_3b.parentNode.parentNode,"x")>getRoughPosition(_3b,"x")){_37=mapKeyCode(_37,0);}}}if(_38){if(_3b==_35){_37=mapKeyCode(_37,1);}else{if(_3b.parentNode.parentNode==_35&&li==li.parentNode.firstChild){_37=mapKeyCode(_37,2);}}}switch(_37){case 37:_3b=_3b.parentNode;if(_35.parentNode==_3b){_3b=null;}if(_3b){_3b.firstChild.focus();}break;case 38:var _3c=li.previousSibling;if(!_3c){_3c=li.parentNode.childNodes[li.parentNode.childNodes.length-1];}_3c.firstChild.focus();break;case 39:if(_3a){_3a.firstChild.firstChild.focus();}break;case 40:var _3d=li.nextSibling;if(!_3d){_3d=li.parentNode.childNodes[0];}_3d.firstChild.focus();break;}}function clearMenus(_3e){var _3f=_3e.getElementsByTagName("ul");for(var i=0;i<_3f.length;i++){_3f[i].style.left="-200em";removeIframeLayer(_3f[i]);}}function unwantedTextEvent(){return (navigator.vendor=="Apple Computer, Inc."&&(event.target==event.relatedTarget.parentNode||(event.eventPhase==3&&event.target.parentNode==event.relatedTarget)));}function getRoughPosition(ele,dir){var pos=dir=="x"?ele.offsetLeft:ele.offsetTop;var tmp=ele.offsetParent;while(tmp!=null){pos+=dir=="x"?tmp.offsetLeft:tmp.offsetTop;tmp=tmp.offsetParent;}return pos;}function getViewportSize(){var _45=[0,0];if(typeof window.innerWidth!="undefined"){_45=[window.innerWidth,window.innerHeight];}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){_45=[document.documentElement.clientWidth,document.documentElement.clientHeight];}else{_45=[document.getElementsByTagName("body")[0].clientWidth,document.getElementsByTagName("body")[0].clientHeight];}}return _45;}function repositionMenu(_46){var _47=[getRoughPosition(_46,"x")+_46.offsetWidth+25,getRoughPosition(_46,"y")+_46.offsetHeight+25];var _48=getViewportSize();if(_47[0]>(_48[0]+200)){var _49=_46.offsetWidth+_46.parentNode.parentNode.offsetWidth;var _4a=_46.parentNode.offsetWidth-_46.offsetLeft;_46.style.left=(0-_49+(_4a*2))+"px";}if(_47[1]>_48[1]){var _4b=parseInt(_46.style.top,10);var _4c=_47[1]-_48[1];_46.style.top=(_4b-_4c)+"px";}}function createIframeLayer(_4d){if(!toggleSelects("hidden")){var _4e=document.createElement("iframe");_4e.tabIndex="-1";_4e.src="javascript:false;";_4d.parentNode.appendChild(_4e);_4e.style.left=_4d.offsetLeft+"px";_4e.style.top=_4d.offsetTop+"px";_4e.style.width=_4d.offsetWidth+"px";_4e.style.height=_4d.offsetHeight+"px";}}function removeIframeLayer(_4f){if(!toggleSelects("visible")){var _50=_4f.parentNode.getElementsByTagName("iframe");while(_50.length>0){_50[0].parentNode.removeChild(_50[0]);}}}function toggleSelects(vis){if(typeof document.uniqueID!="undefined"&&typeof document.body.style.scrollbarTrackColor=="undefined"){var _52=document.getElementsByTagName("select");for(var i=0;i<_52.length;i++){_52[i].style.visibility=vis;}return true;}return false;}function attachEventListener(_54,_55,_56,_57){if(typeof _54.addEventListener!="undefined"){_54.addEventListener(_55,_56,_57);}else{if(typeof _54.attachEvent!="undefined"){_54.attachEvent("on"+_55,_56);}else{_55="on"+_55;if(typeof _54[_55]=="function"){var _58=_54[_55];_54[_55]=function(){_58();return _56();};}else{_54[_55]=_56;}}}return true;}function addLoadListener(fn){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",fn,false);}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",fn,false);}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",fn);}else{var _5a=window.onload;if(typeof window.onload!="function"){window.onload=fn;}else{window.onload=function(){_5a();fn();};}}}}}addLoadListener(function(){dropdownMenu("topMenu");});