var gPopupMask=null;var gPopupContainer=null;var gPopFrame=null;var gReturnFunc;var gPopupIsShown=false;var gHideSelects=false;var gLoading="loading.html";var gTabIndexes=new Array();var gTabbableTags=new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME");if(!document.all){document.onkeypress=keyDownHandler;}function viewDemoScreen(){showPopWin("modalcontent.html",800,396,null);}function getCookie(_1){if(document.cookie.length>0){begin=document.cookie.indexOf(_1+"=");if(begin!=-1){begin+=_1.length+1;end=document.cookie.indexOf(";",begin);if(end==-1){end=document.cookie.length;}return unescape(document.cookie.substring(begin,end));}}return null;}function setCookie(_2,_3,_4){var _5=new Date();_5.setTime(_5.getTime()+(_4*24*3600*1000));document.cookie=_2+"="+escape(_3)+((_4==null)?"":"; expires="+_5.toGMTString());}function delCookie(_6){if(getCookie(_6)){document.cookie=_6+"="+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}function setPopUpLoadingPage(_7){gLoading=_7;}function initPopUp(){var _8=document.getElementsByTagName("body")[0];var _9=document.createElement("div");_9.id="popupMask";var _a=document.createElement("div");_a.id="popupContainer";_a.innerHTML=""+"<div id=\"popupInner\">"+"<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>";_8.appendChild(_9);_8.appendChild(_a);gPopupMask=document.getElementById("popupMask");gPopupContainer=document.getElementById("popupContainer");gPopFrame=document.getElementById("popupFrame");var _b=parseInt(window.navigator.appVersion.charAt(0),10);if(_b<=6&&window.navigator.userAgent.indexOf("MSIE")>-1){gHideSelects=true;}var _c=document.getElementsByTagName("a");for(i=0;i<_c.length;i++){if(_c[i].className.indexOf("submodal")>=0){_c[i].onclick=function(){var _d=400;var _e=200;var _f=this.className.indexOf("submodal");var _10=this.className.indexOf(" ",_f);if(_10<0){_10=this.className.length;}var _11=this.className.substring(_f,_10);params=_11.split("-");if(params.length==3){_d=parseInt(params[1]);_e=parseInt(params[2]);}showPopWin(this.href,_d,_e,null);return false;};}}}function showPopWin(url,_13,_14,_15){gPopupIsShown=true;disableTabIndexes();gPopupMask.style.display="block";gPopupContainer.style.display="block";centerPopWin(_13,_14);gPopupContainer.style.width=_13+30+"px";gPopupContainer.style.height=(_14)+30+"px";gPopFrame.style.width=_13+30+"px";gPopFrame.style.height=(_14)+30+"px";gPopFrame.src=url;gReturnFunc=_15;if(gHideSelects==true){hideSelectBoxes();}window.setTimeout("setPopTitleAndRewriteTargets();",100);}var gi=0;function centerPopWin(_16,_17){if(gPopupIsShown==true){if(_16==null||isNaN(_16)){_16=gPopupContainer.offsetWidth;}if(_17==null){_17=gPopupContainer.offsetHeight;}var _18=getViewportHeight();var _19=getViewportWidth();var _1a,scTop;if(self.pageYOffset){_1a=self.pageXOffset;scTop=self.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){_1a=document.documentElement.scrollLeft;scTop=document.documentElement.scrollTop;}else{if(document.body){_1a=document.body.scrollLeft;scTop=document.body.scrollTop;}}}gPopupMask.style.height=_18+"px";gPopupMask.style.width=_19+"px";gPopupMask.style.top=scTop+"px";gPopupMask.style.left=_1a+"px";window.status=gPopupMask.style.top+" "+gPopupMask.style.left+" "+gi++;var _1b=scTop+((_18-(_17))/2);if(_1b<0){_1b=0;}gPopupContainer.style.top=_1b+"px";gPopupContainer.style.left=(_1a+((_19-_16)/2))+"px";}}addEvent(window,"resize",centerPopWin);window.onscroll=centerPopWin;function hidePopWin(_1c){gPopupIsShown=false;restoreTabIndexes();if(gPopupMask==null){return;}gPopupMask.style.display="none";gPopupContainer.style.display="none";if(_1c==true&&gReturnFunc!=null){gReturnFunc(window.frames["popupFrame"].returnVal);}gPopFrame.src=gLoading;if(gHideSelects==true){displaySelectBoxes();}if(1==gShowDemoScreen){dojo.io.cookie.set("sicknessMapDemoScreen","1",30);}}function doNotShowPopWin(_1d){setCookie("sicknessMapDemoScreen","0",30);gShowDemoScreen=0;hidePopWin(_1d);}function setPopTitleAndRewriteTargets(){if(window.frames["popupFrame"].document.title==null){window.setTimeout("setPopTitleAndRewriteTargets();",10);}else{var _1e=window.frames["popupFrame"].document;if(_1e.getElementsByTagName("base").length<1){var _1f=window.frames["popupFrame"].document.getElementsByTagName("a");for(var i=0;i<_1f.length;i++){if(_1f.target==null){_1f[i].target="_parent";}}var _21=window.frames["popupFrame"].document.getElementsByTagName("form");for(i=0;i<_21.length;i++){if(_21.target==null){_21[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 _25=document.getElementsByTagName(gTabbableTags[j]);for(var k=0;k<_25.length;k++){gTabIndexes[i]=_25[k].tabIndex;_25[k].tabIndex="-1";i++;}}}}function restoreTabIndexes(){if(document.all){var i=0;for(var j=0;j<gTabbableTags.length;j++){var _29=document.getElementsByTagName(gTabbableTags[j]);for(var k=0;k<_29.length;k++){_29[k].tabIndex=gTabIndexes[i];_29[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,_30,fn){if(obj.addEventListener){obj.addEventListener(_30,fn,false);return true;}else{if(obj.attachEvent){var r=obj.attachEvent("on"+_30,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;}
