function emailValdation(){var reEmail=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;var txtEmail=document.getElementById("txtEmail").value;if(txtEmail==""||txtEmail=="Enter your email address *"){document.getElementById("err_email").innerHTML="Please enter your Email-Id.";document.getElementById("txtEmail").focus();return false}else{if(!reEmail.test(txtEmail)){document.getElementById("err_email").innerHTML="Please enter your valid Email-Id";document.getElementById("txtEmail").focus();return false}}return true}function changeTextValue(txtId,val,val1){if(trim(val,"")==trim(val1,"")||trim(val,"")==""){document.getElementById(txtId).value=val1}}function setTextValue(txtId,val,val1){if(trim(val,"")==trim(val1,"")||trim(val,"")==""){document.getElementById(txtId).value=""}}function trim(str,chars){return ltrim(rtrim(str,chars),chars)}function ltrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("^["+chars+"]+","g"),"")}function rtrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"")};
