function _getBoundingClientRect(c){var b=[];b.left=0;b.right=0;b.top=0;b.bottom=0;var a=c;while(a!==null){b.left+=a.offsetLeft;b.top+=a.offsetTop;a=a.offsetParent}b.bottom+=b.top+c.offsetHeight;b.right+=b.left+c.offsetWidth;return b}function PopupController(b,a){this.JSName=b;this.popupMenuArray=[];this.activeMenu=-1;this.timer=null;this.locked=0;this.onClickOpen=false;this.onClickLocked=false}PopupController.prototype.setOnClickOpen=function(){this.onClickLocked=true;this.onClickOpen=true};PopupController.prototype.activateOnClick=function(){this.onClickLocked=false};PopupController.prototype.deactivateOnClick=function(){if(this.onClickOpen){this.onClickLocked=true}};PopupController.prototype.hideAll=function(b){if(b||(this.activeMenu==-1&&this.locked===0)){this.activeMenu=-1;this.deactivateOnClick();for(var a=0;a<this.popupMenuArray.length;a++){this.popupMenuArray[a].hidePopup()}}};PopupController.prototype.hideAllNoForce=function(){mainPopupController.hideAll(0)};PopupController.prototype.fingerMenu=function(a){this.activeMenu=a};PopupController.prototype.unFingerMenu=function(a){if(this.timer){window.clearTimeout(this.timer)}this.timer=setTimeout(this.hideAllNoForce,1500);this.activeMenu=-1};PopupController.prototype.lock=function(){this.locked=this.locked+1};PopupController.prototype.unlock=function(){this.locked=this.locked-1;if(this.timer){window.clearTimeout(this.timer)}this.timer=setTimeout(this.hideAllNoForce,1500)};PopupController.prototype.appear=function(a){this.popupMenuArray[a].appear()};PopupController.prototype.AddMenu=function(g,j,h,k,d,e,b,f,c){var a=new PopupMenu(this.JSName,this.popupMenuArray.length,g,j,h,k,this,d,e,b,f);this.popupMenuArray.push(a);return(a)};PopupController.prototype.openPopup=function(b,c){for(var a=0;a<this.popupMenuArray.length;a++){if(a!=b){this.popupMenuArray[a].hidePopup()}}this.popupMenuArray[b].changeClasses();if(this.onClickLocked){return}this.popupMenuArray[b].openPopup(c)};function PopupMenu(g,f,h,k,j,m,a,c,d,b,e){this.menuNumber=f;this.PopupControllerName=g;this.popupController=a;this.title=h;this.classChanger=[];this.alignment=1;this.alignToElement=f+"MainA";this.description=k;this.appearing=0;this.isPopup=0;document.write('<table cellpadding="0" cellspacing="0" border="0" style="z-index : 1000; position : absolute; visibility : hidden;opacity : 0; filter: alpha(opacity=0);" id="MenuTable'+f+'" class="MainTable"><tr><td class="MainTableTopLeft"></td><td class="MainTableTopMiddle"></td><td class="MainTableTopRight"></td></tr><tr><td class="MainTableMiddleLeft"></td><td class="MainTableMiddleMiddle"><div id="MenuDiv'+f+'"></div></td><td class="MainTableMiddleRight"></td></tr><tr><td class="MainTableBottomLeft"></td><td class="MainTableBottomMiddle"></td><td class="MainTableBottomRight"></td></tr></table>');this.oPopup=document.getElementById("MenuTable"+f);this.oPopBody=document.getElementById("MenuDiv"+f);var l;if(c===null){if(d===null){l="default";d=""}else{l="pointer"}c="#"}else{l="pointer"}if(this.popupController.onClickOpen){l="pointer";onclickJS=' onclick="'+this.PopupControllerName+".activateOnClick();"+this.PopupControllerName+".openPopup("+this.menuNumber+");"+d+'"'}else{onclickJS=' onclick="'+d+'"'}if(j){this.images=1;document.write("<a"+onclickJS+' id="'+f+'MainA" href="'+c+'" style="cursor : '+l+'" onmouseover="'+this.PopupControllerName+'.lock();" onmouseout="'+this.PopupControllerName+'.unlock();"><img border="0" id="'+f+'Main" src="'+j+'" style="cursor : '+l+'" onmouseover="'+this.PopupControllerName+".openPopup("+this.menuNumber+');">');document.write('<img border="0" id="'+f+'rollOver" src="'+m+'" style="display : none; visibility : hidden;"></a>');this.mainImage=document.getElementById(f+"Main");this.rollOverImage=document.getElementById(f+"rollOver")}else{this.images=0;document.write("<a"+onclickJS+' id="'+f+'MainA" href="'+c+'" style="cursor : '+l+'" onmouseover="'+this.PopupControllerName+'.lock();" onmouseout="'+this.PopupControllerName+'.unlock();" class="'+e+'"><span id="'+f+'Main" style="cursor : '+l+'" onmouseover="'+this.PopupControllerName+".openPopup("+this.menuNumber+');">'+b+"</span>");document.write("</a>")}}PopupMenu.prototype.openPopup=function(){var d=0;var a=0;this.popupController.activateOnClick();var b=document.getElementById(this.alignToElement);var c=_getBoundingClientRect(b);if(this.oPopBody.innerHTML.length){while(b.offsetParent){d+=b.offsetTop;a+=b.offsetLeft;b=b.offsetParent}this.oPopup.style.top=d+(c.bottom-c.top)+"px";if(this.alignment==1){this.oPopup.style.left=a-this.oPopup.offsetWidth/2+(c.right-c.left)/2+"px"}else{this.oPopup.style.left=a+"px"}this.oPopup.onmouseover=new Function("mainPopupController.fingerMenu('"+this.menuNumber+"')");this.oPopup.onmouseout=new Function("mainPopupController.unFingerMenu('"+this.menuNumber+"')");this.oPopup.style.visibility="visible";this.appearing=1;this.appear();if(this.popupController.timer){window.clearTimeout(this.popupController.timer)}this.popupController.timer=setTimeout(this.popupController.hideAllNoForce,2000)}if(this.images){this.mainImage.style.display="none";this.mainImage.style.visibility="hidden";this.rollOverImage.style.display="inline";this.rollOverImage.style.visibility="visible"}this.changeClasses()};PopupMenu.prototype.changeClasses=function(){for(i=0;i<this.classChanger.length;i++){document.getElementById(this.classChanger[i].idOfElement).className=this.classChanger[i].activeClass}};PopupMenu.prototype.resetClasses=function(){for(i=0;i<this.classChanger.length;i++){document.getElementById(this.classChanger[i].idOfElement).className=this.classChanger[i].normalClass}};PopupMenu.prototype.appear=function(){if(this.appearing){this.oPopup.style.filter="alpha(opacity="+this.oPopup.style.opacity*100+")";this.oPopup.style.opacity=parseFloat(this.oPopup.style.opacity)+0.05;if(parseFloat(this.oPopup.style.opacity)<1){setTimeout("mainPopupController.appear('"+this.menuNumber+"');",10)}}};PopupMenu.prototype.hidePopup=function(){this.appearing=0;this.oPopup.style.visibility="hidden";this.oPopup.style.opacity=0;if(this.images){this.rollOverImage.style.display="none";this.rollOverImage.style.visibility="hidden";this.mainImage.style.display="inline";this.mainImage.style.visibility="visible"}this.resetClasses()};PopupMenu.prototype.addMenuTitle=function(a){this.oPopBody.innerHTML+="<div unselectable='on' class='MenuTitle' align='center'><nobr>"+a+"</nobr></div>"};PopupMenu.prototype.addMenuLine=function(){this.oPopBody.innerHTML+="<div unselectable='on' class='MenuHRLine' align='center'></div>"};PopupMenu.prototype.addMenuItem=function(c,f,d,a,e){var b;if(a===null){b='onclick="'+e+";"+this.PopupControllerName+'.hideAll(1);"'}else{b="onclick=\"window.location.href = '"+a+"';"+this.PopupControllerName+'.hideAll(1);"'}var g="<div onmouseover='this.className = \"MenuLineRollOver\"' onmouseout='this.className = \"MenuLine\"' unselectable='on' class='MenuLine' style='cursor : pointer;' "+b+" title='"+d+"'><nobr>";if(f!==null){g+="<img style='cursor : pointer;' unselectable='on' align='bottom' border='0' src='"+f+"'>"}this.oPopBody.innerHTML+=g+c+"</nobr></div>"};PopupMenu.prototype.addMenuItemDisabled=function(c,f,d,a,e){var b;if(e!==null){b='onclick="'+e+";"+this.PopupControllerName+'.hideAll(1);"'}else{if(a!==null){b="onclick=\"window.location.href = '"+a+"';"+this.PopupControllerName+'.hideAll(1);"'}else{}}var g="<div onmouseover='this.className = \"MenuLineDisabledRollOver\"' onmouseout='this.className = \"MenuLineDisabled\"' unselectable='on' class='MenuLineDisabled' style='cursor : pointer;' "+b+" title='"+d+"'><nobr>";if(f!==null){g+="<img style='cursor : pointer;' unselectable='on' align='bottom' border='0' src='"+f+"'>"}this.oPopBody.innerHTML+=g+c+"</nobr></div>"};PopupMenu.prototype.addClassChanger=function(d,a,b){var c=[];c.normalClass=a;c.activeClass=b;c.idOfElement=d;this.classChanger.push(c)};PopupMenu.prototype.addOpener=function(a){if(document.getElementById(a).addEventListener){document.getElementById(a).addEventListener("mouseover",new Function("event","if(window.event) event = window.event;"+this.PopupControllerName+".openPopup("+this.menuNumber+", event);"+this.PopupControllerName+".lock();"),false);document.getElementById(a).addEventListener("mouseout",new Function(this.PopupControllerName+".unlock();"),false)}else{document.getElementById(a).attachEvent("onmouseover",new Function("event","if(window.event) event = window.event;"+this.PopupControllerName+".openPopup("+this.menuNumber+", event);"+this.PopupControllerName+".lock();"));document.getElementById(a).attachEvent("onmouseout",new Function(this.PopupControllerName+".unlock();"))}};PopupMenu.prototype.setPopupAlignment=function(a,b){this.alignment=b;this.alignToElement=a};if(!mainPopupController){var mainPopupController=new PopupController("mainPopupController","/")};

