<!--
function emptyvalidation(entered, alertbox) {
	with (entered) {
		if (value==null || value==""){
			if (alertbox!="") {
				alert(alertbox);
			}
			return false;
		} else {
			return true;
		}
	}
}
function emailvalidation(entered, alertbox) {
	with (entered) {
		apos=value.indexOf("@"); 
		dotpos=value.lastIndexOf(".");
		lastpos=value.length-1;
		if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) {
			if (alertbox) {
				alert(alertbox);
			}
			return false;
		} else {
			return true;
		}
	}
}
function digitvalidation(entered, min, max, alertbox, datatype) {
	with (entered) {
		checkvalue=parseFloat(value);
		if(value.charAt(0) != "0") {
			if (datatype) {
				smalldatatype=datatype.toLowerCase();
				if (smalldatatype.charAt(0)=="i") {
					checkvalue=parseInt(value);
					if (value.indexOf(".")!=-1) {
						checkvalue=checkvalue+1
					}
				}
			}
			if ((parseFloat(min)==min && value.length<min) || (parseFloat(max)==max && value.length>max) || value!=checkvalue) {
				if (alertbox!="") {
					alert(alertbox);
				}
				return false;
			} else {
				return true;
			}
		} else {
			return true;
		}
	}
}
function formvalstep3(thisform, cc) {
	with (thisform)	{
		if (emptyvalidation(FirstName,"Please type your firstname.")==false) {
			FirstName.focus();
			return false;
		}
		if (emptyvalidation(LastName,"Please type your surname.")==false) {
			LastName.focus();
			return false;
		}
		if (emailvalidation(Email,"Please type a valid E-mail address.")==false) {
			Email.focus();
			return false;
		}
		if (thisform.requireau.value == "y") {
			if (emptyvalidation(BusinessName,"Please type your business name.")==false) {
				BusinessName.focus();
				return false;
			}
			if (thisform.BusinessName.value == "NA" || thisform.BusinessName.value == "N/A" || thisform.BusinessName.value == "na" || thisform.BusinessName.value == "n/a" || thisform.BusinessName.value == " ") {
				alert("Please type a valid business name.");
				BusinessName.focus();
				return false;
			}
			if (emptyvalidation(EligID,"Please type your business number.")==false) {
				EligID.focus();
				return false;
			}
			if (digitvalidation(EligID,4,20,"Please type a valid business number\r\n\r\nie: numerical without spaces.","I")==false) {
				EligID.focus();
				return false;
			}
		}
		if (emptyvalidation(Addr1,"Please type your address.")==false) {
			Addr1.focus();
			return false;
		}
		if (emptyvalidation(City,"Please type your city/suburb/town.")==false) {
			City.focus();
			return false;
		}
		if (thisform.State.selectedIndex == 8) {
			if (emptyvalidation(Other_State,"Please type your state/province.")==false) {
				Other_State.focus();
				return false;
			}
		}
		if (emptyvalidation(PCde,"Please type your postcode/zip.")==false) {
			PCde.focus();
			return false;
		}
		if (emptyvalidation(TelACode,"Please type your telephone area code.")==false) {
			TelACode.focus();
			return false;
		}
		if (emptyvalidation(Tel,"Please type your telephone number.")==false) {
			Tel.focus();
			return false;
		}
		if (digitvalidation(Tel,5,20,"Please type a valid telephone number\r\n\r\nie: numerical without spaces.","I")==false) {
			Tel.focus();
			return false;
		}
		if (!thisform.agree.checked) {
			alert("You must agree to our Terms and Conditions before proceeding.");
			return false;
		}
		if (thisform.policies) {
			if (!thisform.policies.checked) {
				alert("You must carefully read our Domain Name Policies before proceeding.");
				return false;
			}
		}
		if (thisform.hostingtc) {
			if (!thisform.hostingtc.checked) {
				alert("You must agree to our Hosting Terms and Conditions before proceeding.");
				return false;
			}
		}
		if(cc == 'y')
		{
			if (emptyvalidation(thisform.cardholder,"Please type in name of Credit Card Holder.")==false) {
				cardholder.focus();
				return false;
			}
			if (emptyvalidation(thisform.card,"Please type in a valid Credit Card Number.")==false) {
				card.focus();
				return false;
			}
			if (emptyvalidation(thisform.card2,"Please type in a valid Credit Card Number.")==false) {
				card2.focus();
				return false;
			}
			if (emptyvalidation(thisform.card3,"Please type in a valid Credit Card Number.")==false) {
				card3.focus();
				return false;
			}
			if (emptyvalidation(thisform.card4,"Please type in a valid Credit Card Number.")==false) {
				card4.focus();
				return false;
			}
			if (emptyvalidation(thisform.csc,"Please type in your CSC number.")==false) {
				csc.focus();
				return false;
			}		

		}

	}
}
function hostval(thisform) {
	with (thisform)	{
		if (emptyvalidation(domain,"Please type the domain name.")==false) {
			domain.focus();
			return false;
		}
	}
}
//-->