function popupPrinterFriendly(a){PrintWindow=window.open(a,"Printable","height=500,width=700,top=10,left=10,status=no,scrollbars=yes,toolbar=yes,menubar=yes,location=no,resizable=yes");PrintWindow.focus();PrintWindow.moveTo(10,10)}function Popup(h,a,g){if(null==a){a=400}if(null==g){g=603}a=a+25;var b="no";if(a>600&&screen.height<=600){g=775;a=550;b="yes"}var c="width="+g+",height="+a+",top=20,left=20,resizable=no,menubar=no,scrollbars="+b+",status=yes";var d;d=window.open(h,"PopupWindow",c);try{if(document.layers){d.setResizable(true)}d.resizeTo(g,a);d.focus()}catch(f){}}function alertPopup(c,a){var b=325;Popup(c,a,b)}function select_Registration(a,b){Popup("/popups/alertpopups/RegistrationSelector.aspx?edit=true&AlertId="+a+"&registrationType="+b,200,350)}function add_Registration_Click(){var b=document.getElementById("pageMaster_centreZoneWide_AlertPageTopBar_cmbAlertType");var a=b.options[b.selectedIndex].value;switch(a){case"1":alertPopup("/popups/alertpopups/SummaryAlert.aspx",527);break;case"2":alertPopup("/popups/alertpopups/GlobalIssuesAlert.aspx",500);break;case"3":alertPopup("/popups/alertpopups/CountryAlert.aspx",590);break;case"4":alertPopup("/popups/alertpopups/CityAlert.aspx",510);break;case"5":alertPopup("/popups/alertpopups/ReginalUpdateAlert.aspx",500);break;case"6":alertPopup("/popups/alertpopups/RecentChangesInRiskAlert.aspx",448);break;case"7":alertPopup("/popups/alertpopups/EvacuationMonotorAlert.aspx",340);break;case"8":window.location="EmailAlerts.aspx?action=RegisterForPriortyAlert";break;case"9":alertPopup("/popups/alertpopups/CategoryAlert.aspx",460);break;default:break}}function edit_Registration_Click(a,b){switch(b){case"1":alertPopup("/popups/alertpopups/SummaryAlert.aspx?edit=true&AlertId="+a,425);break;case"2":alertPopup("/popups/alertpopups/GlobalIssuesAlert.aspx?edit=true&AlertId="+a,395);break;case"3":alertPopup("/popups/alertpopups/CountryAlert.aspx?edit=true&AlertId="+a,475);break;case"4":alertPopup("/popups/alertpopups/CityAlert.aspx?edit=true&AlertId="+a,400);break;case"5":alertPopup("/popups/alertpopups/ReginalUpdateAlert.aspx?edit=true&AlertId="+a,400);break;case"6":alertPopup("/popups/alertpopups/RecentChangesInRiskAlert.aspx?edit=true&AlertId="+a,450);break;case"7":alertPopup("/popups/alertpopups/EvacuationMonotorAlert.aspx?edit=true&AlertId="+a,340);break;case"9":alertPopup("/popups/alertpopups/CategoryAlert.aspx?edit=true&AlertId="+a,500);break;default:break}}function filter_Registration_Click(a,b){Popup("/popups/alertpopups/AlertFilter.aspx?AlertId="+a+"&RegistrationType="+b,485,630)}function OpenRegister(a){window.open("/popups/alertregistration/registration.aspx?Action="+a,"register","height=355,width=295,top=10,left=10,status=no,scrollbars=no,toolbar=no,menubar=no,location=no,resize=no")}function clockTick(){var b=document.getElementById("localTime");if(b){var a=b.innerHTML.split(":");var e=new Date();var c=new Date(e.getFullYear(),e.getMonth(),e.getDate(),a[0],a[1],a[2]);c.setSeconds(c.getSeconds()+1);b.innerHTML=padToTwoDigits(c.getHours())+":"+padToTwoDigits(c.getMinutes())+":"+padToTwoDigits(c.getSeconds())}}function padToTwoDigits(a){a=a.toString();return(a.length==1)?"0"+a:a}function SetAllCheckBoxes(d,g,a,f){a=document.getElementById(f).checked;if(!document.forms[d]){return}var c=document.forms[d].elements[g];if(!c){return}var e=c.length;if(!e){c.checked=a}else{for(var b=0;b<e;b++){c[b].checked=a}}}function SelService(h,g,a,k,f){var e=true;var b=document.forms.__PageForm.elements[g];for(var c=0;c<b.length;c++){if(h==b[c].value){e=b[c].checked}}if(h=="R9"){for(var d=0;d<R9.length;d++){for(var c=0;c<b.length;c++){if((R9[d]==b[c].value)&&!b[c].disabled){b[c].checked=e;if(e==true){if(g!="S51"){Region("S48","S51",R9[d],g)}}}}}}else{if(h=="R10"){for(var d=0;d<R10.length;d++){for(var c=0;c<b.length;c++){if((R10[d]==b[c].value)&&!b[c].disabled){b[c].checked=e;if(e==true){if(g!="S51"){Region("S48","S51",R10[d],g)}}}}}}else{if(h=="R11"){for(var d=0;d<R11.length;d++){for(var c=0;c<b.length;c++){if((R11[d]==b[c].value)&&!b[c].disabled){b[c].checked=e;if(e==true){if(g!="S51"){Region("S48","S51",R11[d],g)}}}}}}else{if(h=="R12"){for(var d=0;d<R12.length;d++){for(var c=0;c<b.length;c++){if((R12[d]==b[c].value)&&!b[c].disabled){b[c].checked=e;if(e==true){if(g!="S51"){Region("S48","S51",R12[d],g)}}}}}}else{if(h=="R13"){for(var d=0;d<R13.length;d++){for(var c=0;c<b.length;c++){if((R13[d]==b[c].value)&&!b[c].disabled){b[c].checked=e;if(e==true){if(g!="S51"){Region("S48","S51",R13[d],g)}}}}}}}}}}}function ConfirmPageSaved(a){if(isEntryChanged==1){return confirm(a)}else{return true}}function ValidateRegionalSummaries(f,e,c){var a=false;var h=0;var k=document.getElementById("regionallist").value;var g=k.split(",");for(i=0;i<g.length;i++){if(g[i]!=""){var b=document.forms.__PageForm.elements["Grp"+g[i]];for(var d=0;d<b.length;d++){if(b[d].checked&&b[d].value=="40"){h++}}}}if(h>0){a=true}if(a){if(!(document.getElementById("chkAfternoon").checked||document.getElementById("chkEvening").checked)){alert(e);return false}}else{if((document.getElementById("chkAfternoon").checked||document.getElementById("chkEvening").checked)){alert(c);return false}}}function ValidateRegionalSummaries_Old(f,e,b){var a=false;var d=document.forms.__PageForm.elements[f];for(var c=0;c<d.length;c++){if(d[c].checked){a=true}}if(a){if(!(document.getElementById("chkAfternoon").checked||document.getElementById("chkEvening").checked)){alert(e);return false}}else{if((document.getElementById("chkAfternoon").checked||document.getElementById("chkEvening").checked)){alert(b);return false}}return false}function ValidateNonEnglishRegionalSummaries(b,a){}function getElementsByClass(g,e,a){var d=new Array();if(e==null){e=document}if(a==null){a="*"}var c=e.getElementsByTagName(a);var b=c.length;var f=new RegExp("(^|\\s)"+g+"(\\s|$)");for(i=0,j=0;i<b;i++){if(f.test(c[i].className)){d[j]=c[i];j++}}return d}function toggleSummaryAll(e){var c=getElementsByClass("expandable",document);var b=getElementsByClass("expandArrows",document);var d=c.length;var a=0;var f=0;for(i=0;i<d;i++){if(c[i].style.display=="none"){f++}else{if(c[i].style.display=="block"){a++}}}if(f==0||a==0){for(i=0;i<d;i++){if(c[i].style.display=="none"){$("#"+c[i].id).fadeIn("slow",function(){this.style.display="block"});b[i].innerHTML='<img src="/i/headlines/arrows/small_arrow_down.gif" title="'+e+'" />'}else{$("#"+c[i].id).fadeOut("slow",function(){this.style.display="none"});b[i].innerHTML='<img src="/i/headlines/arrows/small_arrow_left.gif" title="'+e+'" />'}}return}if(f>a){for(i=0;i<d;i++){$("#"+c[i].id).fadeIn("slow",function(){this.style.display="block"});b[i].innerHTML='<img src="/i/headlines/arrows/small_arrow_down.gif" title="'+e+'" />'}return}else{for(i=0;i<d;i++){$("#"+c[i].id).fadeOut("slow",function(){this.style.display="none"});b[i].innerHTML='<img src="/i/headlines/arrows/small_arrow_left.gif" title="'+e+'" />'}return}}function toggleSummary(e,d,c){var b=document.getElementById(c+e);var a=document.getElementById("Expand"+c+e);if(b.style.display=="none"){$("#"+c+e).fadeIn("slow",function(){this.style.display="block"});a.innerHTML='<img src="/i/headlines/arrows/small_arrow_down.gif" title="'+d+'" />'}else{$("#"+c+e).fadeOut("slow",function(){this.style.display="none"});a.innerHTML='<img src="/i/headlines/arrows/small_arrow_left.gif" title="'+d+'" />'}}function calRedirect(b){var g=new Date(b);var p=document.location;var e=document.location;var n=g.getFullYear(g);var f=g.getMonth(g)+1;var k=g.getDate(g);var h=k+","+f+","+n;var r=new Date($("#latestDate").val());var c=r.getFullYear();var l=r.getMonth()+1;var a=r.getDate();var o=a+","+l+","+c;var q=document.getElementById("calRedirectPath").value;if(o!=h){if(q.indexOf("?")==-1){e=q+"?"}else{e=q+"&"}e=e+"hfy="+n+"&hfm="+f+"&hfd="+k}else{e=q}if(p!=e){window.location=e}}function getQueryVariable(a){var c=window.location.search.substring(1);var d=c.split("&");for(var b=0;b<d.length;b++){var e=d[b].split("=");if(e[0]==a){return e[1]}}return -1;alert("Query Variable "+a+" not found")}var isEntryChanged=0;function FlagChange(){isEntryChanged=1}function Incident(a,g,h){var d;d=false;var c=document.forms.__PageForm.elements[a];var f=document.forms.__PageForm.elements[h];for(var e=0;e<f.length;e++){if(g==f[e].value){d=f[e].checked}}if(d==true){for(var b=0;b<c.length;b++){if((g==c[b].value)&&!c[b].disabled){c[b].checked=true}}}}function Region(c,b,g,h){var a;a=false;var d=document.forms.__PageForm.elements[c];if(!d){return}var k=document.forms.__PageForm.elements[h];for(var f=0;f<k.length;f++){if(g==k[f].value){a=k[f].checked}}if(a==true){for(var e=0;e<d.length;e++){if((g==d[e].value)&&!d[e].disabled){d[e].checked=true}}Incident(b,g,h)}}function showPdfHandsOffMessage(){alert("This document is only available to PRIME subscribers (it is not available to trialists).")}function fillSelectFromXml(a,d,e,c,b){$(e,d).each(function(f){a.append('<option value="'+$(this).find(c).text()+'">'+$(this).find(b).text()+"</option>")})}function createCookie(c,d,e){if(e){var b=new Date();b.setTime(b.getTime()+(e*1000));var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=c+"="+d+a+"; path=/"}function readCookie(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null}function eraseCookie(a){createCookie(a,"",-1)}function moveRightZone(){if($(window).width()<920){$("#tmpZone").html($("#rightZoneWrapper").html());$("#leftZone").css("width",window.rightZoneWidth);$("#centreZone").css("margin-left",window.rightZoneWidth+6);$("#centreZone").css("margin-right","3px");$("#rightZoneWrapper").css("display","none");$("#rightZone").css("top",$("#leftZone").height()+4);$("#rightZone").css("left","0px");$("#tmpZone").css("display","block")}if($(window).width()>920&&$("#rightZoneWrapper").css("display")=="none"){$("#tmpZone").css("display","none");$("#rightZoneWrapper").css("display","block");$("#leftZone").css("width",window.leftZoneWidth);$("#rightZone").css("right","3px");$("#centreZone").css("margin-left",window.leftZoneWidth+8);$("#centreZone").css("margin-right",window.rightZoneWidth+8)}};