function getViewportHeight(){return window.innerHeight!=window.undefined?window.innerHeight:document.compatMode=="CSS1Compat"?document.documentElement.clientHeight:document.body?document.body.clientHeight:window.undefined}function getViewportWidth(){var a=17,b=null;return window.innerWidth!=window.undefined?window.innerWidth:document.compatMode=="CSS1Compat"?document.documentElement.clientWidth:document.body?document.body.clientWidth:void 0}function getScrollTop(){return self.pageYOffset?self.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body?document.body.scrollTop:void 0}function getScrollLeft(){return self.pageXOffset?self.pageXOffset:document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body?document.body.scrollLeft:void 0}var gPopupMask=null,gPopupContainer=null,gPopFrame=null,gReturnFunc,gPopupIsShown=false,gHideSelects=false,gReturnVal=null,gLoadingPage="Loading.aspx",gTabIndexes=[],gTabbableTags=["A","BUTTON","TEXTAREA","INPUT","IFRAME"];function initPopUp(){theBody=document.getElementsByTagName("BODY")[0];popmask=document.createElement("div");popmask.id="popupMask";popcont=document.createElement("div");popcont.id="popupContainer";popcont.innerHTML='<div id="popupInner"><div id="popupTitleBar"><div id="popupTitle"></div><div id="popupControls"><a href="#" id="popupCloseRef" onclick="hidePopWin(true);return false;"><img src="'+PathToRoot+'styles/close.gif" id="popCloseBox" /></a></div></div><iframe src="'+PathToRoot+gLoadingPage+'" style="width:100%;height:100%;background-color:transparent;z-index:20" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%"><a href="'+PathToRoot+gLoadingPage+'">Click to go to details window</a></iframe></div>';theBody.appendChild(popmask);theBody.appendChild(popcont);gPopupMask=document.getElementById("popupMask");gPopupContainer=document.getElementById("popupContainer");gPopFrame=document.getElementById("popupFrame");var a=parseInt(window.navigator.appVersion.charAt(0),10);if(a<=6&&window.navigator.userAgent.indexOf("MSIE")>-1)gHideSelects=true;wireUpModals()}Dea.browser.addEvent(window,"load",initPopUp);function wireUpModals(){for(var b=document.getElementsByTagName("a"),a=0;a<b.length;a++)if(b[a].className.indexOf("submodal")==0)b[a].onclick=function(){var b=550,a=600;params=this.className.split("-");if(params.length>=3){b=parseInt(params[1]);a=parseInt(params[2])}showPopWin(this.href,b,a,null);return false}}function showPopWin(f,c,a,e,b){typeof hideTip==="function"&&hideTip();if(b==null||b==true)document.getElementById("popCloseBox").style.display="block";else document.getElementById("popCloseBox").style.display="none";gPopupIsShown=true;disableTabIndexes();gPopupMask.style.display="block";gPopupContainer.style.display="block";centerPopWin(c,a);var d=parseInt(document.getElementById("popupTitleBar").offsetHeight,10);gPopupContainer.style.width=c+"px";gPopupContainer.style.height=a+d+"px";setMaskSize();gPopFrame.style.width=parseInt(document.getElementById("popupTitleBar").offsetWidth,10)+"px";gPopFrame.style.height=a+"px";gPopFrame.src=f;gReturnFunc=e;gHideSelects==true&&Dea.hideSelectBoxes();document.getElementById("popupCloseRef").focus();window.setTimeout("setPopTitle();",1500);return}var gi=0;function centerPopWin(b,a){if(gPopupIsShown==true){if(b==null||isNaN(b))b=gPopupContainer.offsetWidth;if(a==null)a=gPopupContainer.offsetHeight;var f=document.getElementsByTagName("BODY")[0],h=parseInt(getScrollTop(),10),g=parseInt(f.scrollLeft,10);setMaskSize();var d=parseInt(document.getElementById("popupTitleBar").offsetHeight,10),c=getViewportHeight(),e=getViewportWidth();if(a>c)a=c-50;gPopupContainer.style.top=h+(c-(a+d))/2+"px";gPopupContainer.style.left=g+(e-b)/2+"px"}}Dea.browser.addEvent(window,"resize",centerPopWin);function setMaskSize(){var a=document.getElementsByTagName("BODY")[0],b=getViewportHeight(),c=getViewportWidth();if(b>a.scrollHeight)popHeight=b;else popHeight=a.scrollHeight;if(c>a.scrollWidth)popWidth=c;else popWidth=a.scrollWidth;gPopupMask.style.height=popHeight+"px";gPopupMask.style.width=popWidth+"px"}function hidePopWin(a){gPopupIsShown=false;var b=document.getElementsByTagName("BODY")[0];b.style.overflow="";restoreTabIndexes();if(gPopupMask==null)return;gPopupMask.style.display="none";gPopupContainer.style.display="none";if(a==true&&gReturnFunc!=null){gReturnVal=window.frames.popupFrame.returnVal;window.setTimeout("gReturnFunc(gReturnVal);",1)}gPopFrame.src=PathToRoot+gLoadingPage;gHideSelects==true&&Dea.displaySelectBoxes()}function setPopTitle(){if(window.frames.popupFrame.document.title==null)window.setTimeout("setPopTitle();",10);else document.getElementById("popupTitle").innerHTML=window.frames.popupFrame.document.title}function disableTabIndexes(){for(var d=0,c=0;c<gTabbableTags.length;c++)for(var b=document.getElementsByTagName(gTabbableTags[c]),a=0;a<b.length;a++)if(!isInFrame(b[a])){gTabIndexes[d]=b[a].tabIndex;b[a].tabIndex="-1";d++}}function isInFrame(a){var b=a;while(a=a.parentNode)if(a.id==="popupInner")return true;return false}function restoreTabIndexes(){for(var d=0,c=0;c<gTabbableTags.length;c++)for(var b=document.getElementsByTagName(gTabbableTags[c]),a=0;a<b.length;a++)if(!isInFrame(b[a])){b[a].tabIndex=gTabIndexes[d];b[a].tabEnabled=true;d++}}
