AllowCopy=DefaultCopy=!1;function disablePaste(){with(document.body)onselectstart=function(){return AllowCopy},ondrag=function(){return AllowCopy},onfocus=function(){return AllowCopy}}function CharCount(b,c){var d=document.getElementById(b),e=document.getElementById(b+"count");if(null!=e){var d=d.value,f=0;c&&(d+=window.clipboardData.getData("Text"));a=d.replace(/\s/g," ");a=a.split(" ");for(i=0;i<a.length;i++)0<a[i].length&&f++;e.value=d.length+" chars "+f+" words"}return!0}
function setupCharCount(){for(i=0;i<document.forms.length;i++)for(j=0;j<document.forms[i].elements.length;j++)with(document.forms[i].elements[j])"textarea"==type&&(oninput=function(){return CharCount(name,0)},onkeyup=function(){return CharCount(name,0)},onkeydown=function(){return CharCount(name,0)},onpaste=function(){return CharCount(name,1)})}
function getHTTPObject(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}return!1}cFvalue="";cFtime=0;
function checkField(b,c,d,e,f,g){if(""==c.value)d.value="Please enter "+c.name.toLowerCase().substr(4).replace("_"," "),d.style.color=e;else if(t=new Date,m=t.getTime(),c.value!=cFvalue||5E3<m-cFtime)cFvalue=c.value,cFtime=m,http=getHTTPObject(),http.open("GET",b+"?"+c.name+"="+encodeURIComponent(c.value),!0),http.onreadystatechange=function(){4==http.readyState&&("OK"==http.responseText?(d.value=f,d.style.color=g):(d.value=http.responseText,d.style.color=e))},http.send(null)}
function setElement(b,c){var d=document.getElementById(b);null!=d&&(d.style.display=c)}image_popup=null;
function ShowFullImage(b,c,d,e,f,g,h){if(0<navigator.appVersion.indexOf("Chrome")||0<navigator.appVersion.indexOf("Safari"))f+=20,g+=40;null!=image_popup&&image_popup.closed&&(image_popup=null);null==image_popup?(image_popup=window.open(b,c,"left="+d+",top="+e+",screenX="+d+",screenY="+e+",width="+f+",height="+g+h),image_popup.moveTo(d,e)):(image_popup.location.replace(b),image_popup.resizeTo(f+20,g+60));image_popup.focus()}function ClosePopup(){null!=image_popup&&image_popup.close()}
function setLinks(b){now=new Date;t="tzoffset="+now.getTimezoneOffset()+"&scrw="+screen.width+"&scrh="+screen.height;for(i=0;i<document.links.length;i++)with(document.links[i])-1==href.indexOf("#")&&0<=href.indexOf(b)&&(href=-1==href.indexOf("?")?href+("?"+t):href+("&"+t));for(i=0;i<document.forms.length;i++)with(document.forms[i])action=-1==action.indexOf("?")?action+("?"+t):action+("&"+t)}BoxDisplayed=!1;
function getProgress(b,c){http=getHTTPObject();http.open("GET",b+"?progress_key="+c,!0);http.onreadystatechange=function(){4==http.readyState&&(percent=http.responseText,!BoxDisplayed&&100>percent&&(ProgressBox.style.display="block",BoxDisplayed=!0),ProgressBar.style.width=percent+"%",100>percent&&setTimeout("getProgress('"+b+"','"+c+"')",2E3))};http.send(null)}function startProgress(b,c,d){""!=d.value&&setTimeout("getProgress('"+b+"','"+c+"')",1E3)}
function clickClear(b,c){b.value==c&&(b.value="")}function clickRecall(b,c){""==b.value&&(b.value=c)}function AddOpt(b,c,d){with(b)i=options.length,options[i]=new Option(d,c),c==options[0].value&&(options[i].selected=!0,options[0]=null)};
