<!--
function validate(f)

{

  field="";

  fields="";
  
if (f.firstname.value == ""){
field = "Firstname";
fields += field + "\n";
}

if (f.lastname.value == ""){
field = "Lastname";
fields += field + "\n";
}
	
if ((f.country.value == "") || (f.country.value == "Select Country")){
field = "Country";
fields += field + "\n";
}

if (f.address.value == ""){
field = "Address";
fields += field + "\n";
}

if (f.suburb.value == ""){
field = "Suburb";
fields += field + "\n";
}


if (f.state.value == ""){
field = "State";
fields += field + "\n";
}

if (f.postcode.value == ""){
field = "Postcode";
fields += field + "\n";
}

if (f.phone.value == ""){
field = "Phone";
fields += field + "\n";
}

if (!(ValidEmail(f.email.value))){
field = "Valid Email";
fields += field + "\n";
}


if (fields == "") {
	return (true);
} else {
	alert("\nPlease fill in the following fields:\n\n" + fields);
    return(false);
}

}

function stateOptions() {
	stateArray = new Array("NSW","NT","QLD","SA","TAS","VIC","WA")
	var objForm = document.forms["cart"]
	
	while (objForm.state.hasChildNodes())
	objForm.state.removeChild(objForm.state.childNodes[0]);
	
	if (objForm.country.value == "Australia"){
		for (n=0; n<stateArray.length; n++) {
			objForm.state.options[objForm.state.options.length] = new Option(stateArray[n],stateArray[n]);
		}
	}
	else {
		objForm.state.options[objForm.state.options.length] = new Option('Outside Australia','other');
	}
}


function stateOptionsDelivery() {
	dStateArray = new Array("NSW","NT","QLD","SA","TAS","VIC","WA")
	var objForm = document.forms["cart"]
	
	while (objForm.dstate.hasChildNodes())
	objForm.dstate.removeChild(objForm.dstate.childNodes[0]);
	
	if (objForm.dcountry.value == "Australia"){
		for (n=0; n<dStateArray.length; n++) {
			objForm.dstate.options[objForm.dstate.options.length] = new Option(dStateArray[n],dStateArray[n]);
		}
	}
	else if (objForm.dcountry.value == ""){
		objForm.dstate.options[objForm.dstate.options.length] = new Option('Please Select','Please Select');
	}
	else {
		objForm.dstate.options[objForm.dstate.options.length] = new Option('Outside Australia','other');
	}
}
// -->



