function formData2QueryString(formName){var docForm=document.forms[formName];var submitContent="";var formElem;var lastElemName="";for(i=0;i<docForm.elements.length;i++){formElem=docForm.elements[i];switch(formElem.type){case"text":case"hidden":case"password":case"textarea":case"select-one":submitContent+=formElem.name+"="+escape(formElem.value)+"&";break;case"radio":if(formElem.checked){submitContent+=formElem.name+"="+escape(formElem.value)+"&"}break;case"checkbox":if(formElem.checked){if(formElem.name==lastElemName){if(submitContent.lastIndexOf("&")==submitContent.length-1){submitContent=submitContent.substr(0,submitContent.length-1)}submitContent+=","+escape(formElem.value)}else{submitContent+=formElem.name+"="+escape(formElem.value)}submitContent+="&";lastElemName=formElem.name}break}}submitContent=submitContent.substr(0,submitContent.length-1);return submitContent}function xmlhttpPost(strURL,strSubmit,strResultFunc,strProcessingFunc){var xmlHttpReq=false;if(window.XMLHttpRequest){var xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){var xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}xmlHttpReq.open("POST",strURL,true);xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttpReq.onreadystatechange=function(){if(xmlHttpReq.readyState==4){strResponse=xmlHttpReq.responseText;switch(xmlHttpReq.status){case 404:alert("Error: Not Found. The requested URL "+strURL+" could not be found.");break;case 500:handleErrFullPage(strResponse);break;default:if(strResponse.indexOf("Error:")>-1||strResponse.indexOf("Debug:")>-1){alert(strResponse)}else{eval(strResultFunc+"(strResponse)")}break}}else{if(xmlHttpReq.readyState<4){}}};xmlHttpReq.send(strSubmit)}function handleErrFullPage(strIn){var errorWin;try{errorWin=window.open("","errorWin");errorWin.document.body.innerHTML=strIn}catch(e){alert("An error occurred, but the error message cannot be displayed because of your browser's pop-up blocker.\nPlease allow pop-ups from this Web site.")}};