﻿var MENUITEMHOVERCLASS=" HoverItem";function MenuItemOver(el){if(el.className.indexOf(MENUITEMHOVERCLASS)<0){el.className=[el.className,MENUITEMHOVERCLASS].join("");}};function MenuItemOut(el){if(el.className.indexOf(MENUITEMHOVERCLASS)> -1){el.className=el.className.replace(MENUITEMHOVERCLASS,"");}};function OnLoad(){var el;if(!(IsIE6||IsIE7)){document.documentElement.style.overflowY="scroll";}if(IsIE6){el=document.getElementById("DivBottomFloatStopper");if(el&&(typeof(EmptyImgUrl)=="string")){el.innerHTML=["<img src='",EmptyImgUrl,"' height=1 width=990 alt='' />"].join("");}}AttachSubMenuOverHandlers();AdjustHeight();if(typeof(CustomOnLoad)=="function"){CustomOnLoad();}};function AdjustHeight(){var firstEl;var secondEl;var calculatedHeight;firstEl=document.getElementById("DivSupportiveContent");secondEl=document.getElementById("DivMainContent");if(firstEl&&secondEl){if(firstEl.offsetHeight>secondEl.offsetHeight){calculatedHeight=firstEl.offsetHeight-GetElementTopBottomMarginPadding(secondEl);if(!isNaN(calculatedHeight)){secondEl.style.height=calculatedHeight+"px";}}}};function GetElementTopBottomMarginPadding(el){var paddingTop;var paddingBottom;var borderTopWidth;var borderBottomWidth;paddingTop=parseInt(GetComputedStyle(el,"padding-top"));paddingBottom=parseInt(GetComputedStyle(el,"padding-bottom"));borderTopWidth=parseInt(GetComputedStyle(el,"border-bottom-width"));borderBottomWidth=parseInt(GetComputedStyle(el,"border-bottom-width"));return(paddingTop+paddingBottom+borderTopWidth+borderBottomWidth);};function GetComputedStyle(el,propertyName){var declaration;var re;if(!window.getComputedStyle){window.getComputedStyle=function(el,pseudo){this.el=el;this.getPropertyValue=function(prop){re=/(\-([a-z]){1})/g;if(prop=="float"){prop="styleFloat";}if(re.test(prop)){prop=prop.replace(re,function(){return arguments[2].toUpperCase();});}return el.currentStyle[prop]?el.currentStyle[prop]:null;};return this;}}declaration=window.getComputedStyle(el,"");return declaration.getPropertyValue(propertyName);};function AttachSubMenuOverHandlers(){var containerEl;var els;var ulEls;var liEls;var secondLevelEl;var funcOnOver;var funcOnOut;var linkEl;funcOnOver=function(e){var target;target=(this.tagName.toLowerCase()=="a")?this.parentNode:this;AddCssClass(target,"Over");};funcOnOut=function(e){var target;target=(this.tagName.toLowerCase()=="a")?this.parentNode:this;RemoveCssClass(target,"Over");};secondLevelEl=document.getElementById("DivSecondLevelMenu");if(secondLevelEl){els=secondLevelEl.getElementsByTagName("div");if(els){for(var i=0,len=els.length;i<len;i++){if(els[i].className.indexOf("SubMenuItemWrapper")> -1){els[i].onmouseover=funcOnOver;els[i].onmouseout=funcOnOut;}}}ulEls=secondLevelEl.getElementsByTagName("ul");if(ulEls&&ulEls.length>1){liEls=ulEls[1].getElementsByTagName("li");if(liEls){for(var i=0,len=liEls.length;i<len;i++){linkEl=liEls[i].getElementsByTagName("a")[0];if(linkEl){linkEl.onmouseover=funcOnOver;linkEl.onmouseout=funcOnOut;}}}}}};function OpenInPartSizeInScreenCenter(url,widthPercentage,heightPercentage){var height;var width;var posX;var posY;height=Math.round(screen.availHeight*(heightPercentage/100));width=Math.round(screen.availWidth*(widthPercentage/100));posX=Math.round((screen.availWidth-width)/2);posY=Math.round((screen.availHeight-height)/2);OpenInWindow(url,posX,posY,width,height);};function OpenInWindow(url,posX,posY,width,height){var options;options="menubar=0 , directories=0 , status=1 , toolbar= 0 , resizable=1 , scrollbars=1 , location = 0 ";options+=",width="+width+",height="+height;options+=",screenX=0,screenY=0,top="+posY+",left="+posX;window.setTimeout("window.open( \""+url+"\" , \"_blank\" , \""+options+"\" )",33);}
