function formValidator(frm){	if(frm.DomainName.value ==""){		alert("Please enter a Domain Name.");		frm.DomainName.focus();		return (false);}	if(frm.ContactFirst.value ==""){		alert("Please enter your First Name");		frm.ContactFirst.focus();		return (false);}	if(frm.ContactLast.value ==""){		alert("Please enter your Last Name.");		frm.ContactLast.focus();		return (false);}	if(frm.CompanyName.value ==""){		alert("Please enter your Company Name. If you do not have a company, please enter your First and Last Name.");		frm.CompanyName.focus();		return (false);}	if(frm.ContactAddress.value ==""){		alert("Please enter your Address.");		frm.ContactAddress.focus();		return (false);}	if(frm.ContactCity.value ==""){		alert("Please enter your City.");		frm.ContactCity.focus();		return (false);}	if(frm.ContactState.value ==""){		alert("Please enter your State.");		frm.ContactState.focus();		return (false);}	if(frm.ContactZip.value ==""){		alert("Please enter your Zip Code.");		frm.ContactZip.focus();		return (false);}	if(frm.ContactZip.value.length < 5){		alert("Please enter a valid Zip Code.");		frm.ContactZip.focus();		return (false);}	var checkOK = "0123456789-";	var checkStr = frm.ContactZip.value;	var allValid = true;	for (i=0;i<checkStr.length;i++){		ch = checkStr.charAt(i);		for (j=0;j<checkOK.length;j++){			if(ch == checkOK.charAt(j)){break;}			if(j == checkOK.length-1){allValid=false;}		}	}		if(!allValid){		alert("Please enter a valid Zip Code.");		frm.ContactZip.focus();		return (false);}			if(frm.ContactPhone.value ==""){		alert("Please enter your Telephone Number.");		frm.ContactPhone.focus();		return (false);}	if(frm.ContactPhone.value.length < 10){		alert("Please enter a valid Telephone Number including Area Code.");		frm.ContactPhone.focus();		return (false);}		var checkOK = "0123456789-()[]";	var checkStr = frm.ContactPhone.value;	var allValid = true;	for(i=0;i<checkStr.length;i++){		ch = checkStr.charAt(i);		for(j=0;j<checkOK.length;j++){			if(ch==checkOK.charAt(j)){break;}			if(j == checkOK.length-1){allValid=false;}		}	}	if(!allValid){		alert("Please enter a valid Telephone Number including Area Code.");		frm.ContactPhone.focus();		return (false);}			if(frm.ContactEmail.value ==""){		alert("Please enter an Email Address.");		frm.ContactEmail.focus();		return (false);}	if((frm.ContactEmail.value.indexOf ('@',0) == -1 || frm.ContactEmail.value.indexOf ('.',0) == -1) && frm.ContactEmail.value != ""){		alert("Please enter a valid Email Address.");		frm.ContactEmail.focus();		return (false);} 	if(frm.BillingFirst.value==""){		alert("Please enter your First Name");		frm.BillingFirst.focus();		return (false);}	if(frm.BillingLast.value==""){		alert("Please enter your Last Name.");		frm.BillingLast.focus();		return (false);}	if(frm.BillingCompany.value==""){		alert("Please enter your Company Name. If you do not have a company, please enter your First and Last Name.");		frm.BillingCompany.focus();		return (false);}	if(frm.BillingAddress.value ==""){		alert("Please enter your Address.");		frm.BillingAddress.focus();		return (false);}	if(frm.BillingCity.value ==""){		alert("Please enter your City.");		frm.BillingCity.focus();		return (false);}	if(frm.BillingState.value ==""){		alert("Please enter your State.");		frm.BillingState.focus();		return (false);}	if(frm.BillingZip.value ==""){		alert("Please enter your Zip Code.");		frm.BillingZip.focus();		return (false);}	if(frm.BillingZip.value.length < 5){		alert("Please enter a valid Zip Code.");		frm.BillingZip.focus();		return (false);}		var checkOK = "0123456789-";	var checkStr = frm.BillingZip.value;	var allValid = true;	for (i=0;i<checkStr.length;i++){		ch = checkStr.charAt(i);		for (j=0;j<checkOK.length;j++){			if(ch == checkOK.charAt(j)){break;}			if(j == checkOK.length-1){allValid=false;}		}	}		if(!allValid){		alert("Please enter a valid Zip Code.");		frm.BillingZip.focus();		return (false);}	if(frm.BillingPhone.value ==""){		alert("Please enter your Telephone Number.");		frm.BillingPhone.focus();		return (false);}	if(frm.BillingPhone.value.length < 10){		alert("Please enter a valid Telephone Number including Area Code.");		frm.BillingPhone.focus();		return (false);}		var checkOK = "0123456789-()[]";	var checkStr = frm.BillingPhone.value;	var allValid = true;	for (i=0;i<checkStr.length;i++){		ch = checkStr.charAt(i);		for (j=0;j<checkOK.length;j++){			if(ch == checkOK.charAt(j)){break;}			if(j == checkOK.length-1){allValid=false;}		}	}	if(!allValid){		alert("Please enter a valid Telephone Number including Area Code.");		frm.BillingPhone.focus();		return (false);}	if(frm.BillingEmail.value ==""){		alert("Please enter an Email Address.");		frm.BillingEmail.focus();		return (false);}		if((frm.BillingEmail.value.indexOf ('@',0) == -1 || frm.BillingEmail.value.indexOf ('.',0) == -1) && frm.BillingEmail.value != ""){		alert("Please enter a valid Email Address.");		frm.BillingEmail.focus();		return (false);} 		if(frm.attached_file.value == ""){		var tbl = document.getElementById('userTable');		var i;		for (i=1; i<=userCount; i++) {			if(field = document.getElementById('firstName' + i)){				if (field.value.length <= 0) {					alert('First Name ' + i + ' is empty');					field.focus();					return false;}			}			if(field = document.getElementById('lastName' + i)){				if (field.value.length <= 0) {					alert('Last Name ' + i + ' is empty');					field.focus();					return false;}			}			if(field = document.getElementById('userName' + i)){				if (field.value.length <= 0) {					alert('User Name ' + i + ' is empty');					field.focus();					return false;}			}			if(field = document.getElementById('password' + i)){				if (field.value.length <= 0) {					alert('Password ' + i + ' is empty');					field.focus();					return false;}			}			if(field = document.getElementById('email' + i)){				if (field.value.length <= 0) {					alert('Email ' + i + ' is empty');					field.focus();					return false;}				str = field.value;				if (!(str.indexOf('.') > 2) || !(str.indexOf('@') > 0)){					alert('Email ' + i + ' does not appear to be valid');					field.focus();					return false;}			}		}	}    	return (true);}