function addEvent(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false);return true}else if(a.attachEvent){var r=a.attachEvent("on"+b,c);return r}else{return false}}function removeEvent(a,b,c,d){if(a.removeEventListener){a.removeEventListener(b,c,d);return true}else if(a.detachEvent){var r=a.detachEvent("on"+b,c);return r}else{alert("Handler could not be removed")}}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(){var a=17;var b=null;if(window.innerWidth!=window.undefined)return window.innerWidth;if(document.compatMode=='CSS1Compat')return document.documentElement.clientWidth;if(document.body)return document.body.clientWidth}function getScrollTop(){if(self.pageYOffset){return self.pageYOffset}else if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}else if(document.body){return document.body.scrollTop}}function getScrollLeft(){if(self.pageXOffset){return self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft}else if(document.body){return document.body.scrollLeft}}var gPopupMask=null;var gPopupContainer=null;var gPopFrame=null;var gPopupIsShown=false;var gHideSelects=false;var gReturnVal=null;var gTabIndexes=new Array();var gTabbableTags=new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME");if(!document.all){document.onkeypress=keyDownHandler}function yzInitWin(){theBody=document.getElementsByTagName('BODY')[0];popmask=document.createElement('div');popmask.id='popupMask';popcont=document.createElement('div');popcont.id='popupContainer';popcont.innerHTML=''+'<div id="popupInner">'+'<iframe style="width:100%;height:100%;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%"></iframe>'+'<div style="text-align: right"><a href="javascript:yzHideWin()"><img style="margin: 0px 10px 10px 0px;" src="'+yzWinCloseButton+'" border=0 ></a></div>'+'</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}}addEvent(window,"load",yzInitWin);function yzOpenWin(a,b,c){gPopupIsShown=true;disableTabIndexes();gPopupMask.style.position="absolute";gPopupMask.style.display="block";gPopupContainer.style.display="block";yzCenterWin(b,c);gPopupContainer.style.width=b+"px";gPopupContainer.style.height=c+"px";yzSizeMask();gPopFrame.style.width=(b-10)+"px";gPopFrame.style.height=(c-10)+"px";gPopFrame.src=a;if(gHideSelects==true){hideSelectBoxes()}}var gi=0;function yzCenterWin(a,b){if(gPopupIsShown==true){if(a==null||isNaN(a)){a=gPopupContainer.offsetWidth}if(b==null){b=gPopupContainer.offsetHeight}var c=document.getElementsByTagName("BODY")[0];var d=parseInt(getScrollTop(),10);var e=parseInt(c.scrollLeft,10);yzSizeMask();var f=getViewportHeight();var g=getViewportWidth();gPopupContainer.style.top=(d+((f-b)/2))+"px";gPopupContainer.style.left=(e+((g-a)/2))+"px"}}addEvent(window,"resize",yzCenterWin);function yzSizeMask(){var a=document.getElementsByTagName("BODY")[0];var b=getViewportHeight();var 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 yzHideWin(){gPopupIsShown=false;var a=document.getElementsByTagName("BODY")[0];a.style.overflow="";restoreTabIndexes();if(gPopupMask==null){return}gPopupMask.style.display="none";gPopupContainer.style.display="none";if(gHideSelects==true){displaySelectBoxes()}}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 a=document.getElementsByTagName(gTabbableTags[j]);for(var k=0;k<a.length;k++){gTabIndexes[i]=a[k].tabIndex;a[k].tabIndex="-1";i++}}}}function restoreTabIndexes(){if(document.all){var i=0;for(var j=0;j<gTabbableTags.length;j++){var a=document.getElementsByTagName(gTabbableTags[j]);for(var k=0;k<a.length;k++){a[k].tabIndex=gTabIndexes[i];a[k].tabEnabled=true;i++}}}}function hideSelectBoxes(){var x=document.getElementsByTagName("SELECT");for(i=0;x&&i<x.length;i++){x[i].style.visibility="hidden"}}function displaySelectBoxes(){var x=document.getElementsByTagName("SELECT");for(i=0;x&&i<x.length;i++){x[i].style.visibility="visible"}}