function openWindow(d,e,a,c){if(c==undefined){c="window"+e+"_"+a+"_"+d.replace(/[._\/:;?&=]/gi,"")}var g=(screen.width-e)/2;var f=((screen.height-a)*0.9)/2;var b=window.open(d,c,"width="+e+",height="+a+",left="+g+",top="+f+",resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no","replace=yes");b.focus()}function openModalWindow(c,d,a){var b="window"+d+"_"+a+"_"+c.replace(/[._\/:;?&=]/gi,"");var f=(screen.width-d)/2;var e=((screen.height-a)*0.9)/2;return window.showModalDialog(c,b,"dialogHeight:"+a+"px;dialogWidth:"+d+"px;status:no;scroll:no;center:yes;dialogLeft:"+f+";dialogTop:"+e)}function updateOpener(a){if(window.opener){window.opener.document.location.href=a}}function reloadOpener(){if(window.opener){if(window.opener.document.location.href.indexOf("#")!=-1){window.opener.document.location.href=window.opener.document.location.href.substr(0,window.opener.document.location.href.indexOf("#"))}else{window.opener.document.location.href=window.opener.document.location.href}}}function closeAndReloadOpener(){if(window.opener){if(window.opener.document.location.href.indexOf("#")!=-1){window.opener.document.location.href=window.opener.document.location.href.substr(0,window.opener.document.location.href.indexOf("#"))}else{window.opener.document.location.href=window.opener.document.location.href}}window.close()}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 createCookie(c,d,e){if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=c+"="+d+a+"; path=/"}function eraseCookie(a){createCookie(a,"",-1)};
