var gPopupMask=null;var gPopupContainer=null;var gPopFrame=null;var gReturnFunc;var gPopupIsShown=false;var gHideSelects=false;var gLoading="Common/html/loadingSubModal.htm";var gTabIndexes=new Array();var gTabbableTags=new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME");if(!document.all){document.onkeypress=keyDownHandler;}function setPopUpLoadingPage(_1){gLoading=_1;}function initPopUp(){var _2=document.getElementsByTagName("body")[0];var _3=document.createElement("div");_3.id="popupMask";var _4=document.createElement("div");_4.id="popupContainer";_4.innerHTML=""+"<div id=\"popupInner\">"+"<div id=\"popupTitleBar\">"+"<div id=\"popupTitle\"></div>"+"<div id=\"popupControls\">"+"<img src=\"Common/images/subModal/close.gif\" onclick=\"hidePopWin(false);\" id=\"popCloseBox\" />"+"</div>"+"</div>"+"<iframe src=\""+gLoading+"\" style=\"width:100%;height:100%;background-color:transparent;\" scrolling=\"auto\" frameborder=\"0\" allowtransparency=\"true\" id=\"popupFrame\" name=\"popupFrame\" width=\"100%\" height=\"100%\"></iframe>"+"</div>";_2.appendChild(_3);_2.appendChild(_4);gPopupMask=document.getElementById("popupMask");gPopupContainer=document.getElementById("popupContainer");gPopFrame=document.getElementById("popupFrame");var _5=parseInt(window.navigator.appVersion.charAt(0),10);if(_5<=6&&window.navigator.userAgent.indexOf("MSIE")>-1){gHideSelects=true;}var _6=document.getElementsByTagName("a");for(i=0;i<_6.length;i++){if(_6[i].className.indexOf("submodal")>=0){_6[i].onclick=function(){var _7=400;var _8=200;var _9=this.className.indexOf("submodal");var _a=this.className.indexOf(" ",_9);if(_a<0){_a=this.className.length;}var _b=this.className.substring(_9,_a);params=_b.split("-");if(params.length==3){_7=parseInt(params[1]);_8=parseInt(params[2]);}showPopWin(this.href,_7,_8,null);return false;};}}}addEvent(window,"load",initPopUp);function showPopWin(_c,_d,_e,_f){gPopupIsShown=true;disableTabIndexes();gPopupMask.style.display="block";gPopupContainer.style.display="block";centerPopWin(_d,_e);var _10=parseInt(document.getElementById("popupTitleBar").offsetHeight,10);gPopupContainer.style.width=_d+"px";gPopupContainer.style.height=(_e+_10)+"px";gPopFrame.style.width=parseInt(document.getElementById("popupTitleBar").offsetWidth,10)+"px";gPopFrame.style.height=(_e)+"px";gPopFrame.src=_c;gReturnFunc=_f;if(gHideSelects==true){hideSelectBoxes();}window.setTimeout("setPopTitleAndRewriteTargets();",100);}var gi=0;function centerPopWin(_11,_12){if(gPopupIsShown==true){if(_11==null||isNaN(_11)){_11=gPopupContainer.offsetWidth;}if(_12==null){_12=gPopupContainer.offsetHeight;}var _13=getViewportHeight();var _14=getViewportWidth();var _15,scTop;if(self.pageYOffset){_15=self.pageXOffset;scTop=self.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){_15=document.documentElement.scrollLeft;scTop=document.documentElement.scrollTop;}else{if(document.body){_15=document.body.scrollLeft;scTop=document.body.scrollTop;}}}gPopupMask.style.height=_13+"px";gPopupMask.style.width=_14+"px";gPopupMask.style.top=scTop+"px";gPopupMask.style.left=_15+"px";window.status=gPopupMask.style.top+" "+gPopupMask.style.left+" "+gi++;var _16=parseInt(document.getElementById("popupTitleBar").offsetHeight,10);var _17=scTop+((_13-(_12+_16))/2);if(_17<0){_17=0;}gPopupContainer.style.top=_17+"px";gPopupContainer.style.left=(_15+((_14-_11)/2))+"px";}}addEvent(window,"resize",centerPopWin);window.onscroll=centerPopWin;function hidePopWin(_18){gPopupIsShown=false;restoreTabIndexes();if(gPopupMask==null){return;}gPopupMask.style.display="none";gPopupContainer.style.display="none";if(_18==true&&gReturnFunc!=null){gReturnFunc(window.frames["popupFrame"].returnVal);}gPopFrame.src=gLoading;if(gHideSelects==true){displaySelectBoxes();}}function setPopTitleAndRewriteTargets(){if(window.frames["popupFrame"].document.title==null){window.setTimeout("setPopTitleAndRewriteTargets();",10);}else{var _19=window.frames["popupFrame"].document;document.getElementById("popupTitle").innerHTML=_19.title;if(_19.getElementsByTagName("base").length<1){var _1a=window.frames["popupFrame"].document.getElementsByTagName("a");for(var i=0;i<_1a.length;i++){if(_1a.target==null){_1a[i].target="_parent";}}var _1c=window.frames["popupFrame"].document.getElementsByTagName("form");for(i=0;i<_1c.length;i++){if(_1c.target==null){_1c[i].target="_parent";}}}}}function keyDownHandler(e){if(gPopupIsShown&&e.keyCode==9){return false;}}function disableTabIndexes(){if(document.all){var i=0;for(var j=0;j<gTabbableTags.length;j++){var _20=document.getElementsByTagName(gTabbableTags[j]);for(var k=0;k<_20.length;k++){gTabIndexes[i]=_20[k].tabIndex;_20[k].tabIndex="-1";i++;}}}}function restoreTabIndexes(){if(document.all){var i=0;for(var j=0;j<gTabbableTags.length;j++){var _24=document.getElementsByTagName(gTabbableTags[j]);for(var k=0;k<_24.length;k++){_24[k].tabIndex=gTabIndexes[i];_24[k].tabEnabled=true;i++;}}}}function hideSelectBoxes(){for(var i=0;i<document.forms.length;i++){for(var e=0;e<document.forms[i].length;e++){if(document.forms[i].elements[e].tagName=="SELECT"){document.forms[i].elements[e].style.visibility="hidden";}}}}function displaySelectBoxes(){for(var i=0;i<document.forms.length;i++){for(var e=0;e<document.forms[i].length;e++){if(document.forms[i].elements[e].tagName=="SELECT"){document.forms[i].elements[e].style.visibility="visible";}}}}function addEvent(obj,_2b,fn){if(obj.addEventListener){obj.addEventListener(_2b,fn,false);return true;}else{if(obj.attachEvent){var r=obj.attachEvent("on"+_2b,fn);return r;}else{return false;}}}function getViewportHeight(){if(window.innerHeight!=window.undefined){return window.innerHeight;}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight;}if(document.body){return document.body.clientHeight;}return window.undefined;}function getViewportWidth(){if(window.innerWidth!=window.undefined){return window.innerWidth;}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth;}if(document.body){return document.body.clientWidth;}return window.undefined;}
