String.prototype.stringUTF8=function(){return this.replace(/%/g,'%25').replace(/\\/g,'%5C').replace(/&/g,'%26').replace(/#/g,'%23').replace(/\+/g,'%2B').replace(/\r\n|\n/g,'%0A').replace(/\s/g,'%20');};function stringFormPost(oForm){var sGenericInput='',sRadios='',sChecks='',sSelects='';var aChecks=new Array(oForm.length);var nChecks=-1;for(var x=0;x<oForm.length;x++){var chkOptions='',selOptions='';var bReady=false;with(oForm.elements[x]){if(type=='text'||type=='password'||type=='hidden'||type=='hidden'||type=='file'||type=='select-one'||type=='textarea')sGenericInput+=name+'='+value.stringUTF8()+'&';if(type=='radio')if(checked)sRadios+=name+'='+value.stringUTF8()+'&';if(type=='checkbox'){for(var i=0;i<aChecks.length;i++)if(aChecks[i]==name)bReady=true;if(!bReady){nChecks++;aChecks[nChecks]=name;for(var y=0;y<n(name).length;y++)if(n(name)[y].checked)chkOptions+=n(name)[y].value.stringUTF8()+',';if(chkOptions.length>0)chkOptions=chkOptions.substring(0,chkOptions.length-1);sChecks+=name+'='+chkOptions+'&';}}if(type=='select-multiple'){for(y=0;y<options.length;y++)if(options[y].selected)selOptions+=(options[y].value).stringUTF8()+',';if(selOptions.length>0)selOptions=selOptions.substring(0,selOptions.length-1);sSelects+=name+'='+selOptions+'&';}}}return sGenericInput+sRadios+sChecks+sSelects+'&';}function d(sField){return document.getElementById(sField);}function d(sField){return document.getElementById(sField);}function showObjectHTML(oDiv){document.getElementById(oDiv).style.display='';}function hideObjectHTML(oDiv){document.getElementById(oDiv).style.display='none';}function IsEmail(sEmail){var regExpEmailSeparators=/\.\.|\.@|@\./;var regExpEmail=/^[A-Za-z0-9][\.A-Za-z0-9_-]{0,}@[\.A-Za-z0-9_-]{1,}\.[A-Za-z0-9]{2,5}$/;return(sEmail.search(regExpEmail)==0&&sEmail.search(regExpEmailSeparators)<0)?true:false;};function getObjXMLHTTP(){var XMLHttpRequestObject=false;if(window.XMLHttpRequest){XMLHttpRequestObject=new XMLHttpRequest();}else if(window.ActiveXObject){XMLHttpRequestObject=new ActiveXObject("Microsoft.XMLHTTP");}return XMLHttpRequestObject;};function clearMessage(oDiv){document.getElementById(oDiv).innerHTML=aMsg[0];}function showMessage(oDiv,oMessage,bHide){document.getElementById(oDiv).innerHTML=oMessage;if(bHide)setTimeout("clearMessage('"+oDiv+"')",5000);}
