
var first_set = false;
var last_set = false;
function form_validator(theform){
	if (theform.txtFirstName.value == "" || theform.txtFirstName.value == "<first name here>"){
		alert("Please enter your first name!");
		theform.txtFirstName.focus();
		theform.txtFirstName.select();
		return (false);
	}
	if (theform.txtLastName.value == "" || theform.txtLastName.value == "<last name here>"){
		alert("Please enter your Last name!");
		theform.txtLastName.focus();
		theform.txtLastName.select();
		return (false);
	}
	if (theform.txtAge.value == ""){
		alert("Please enter your age!");
		theform.txtAge.focus();
		return (false);
	}
	if (theform.lstGender.selectedIndex == 2){
		alert("Please select if you are a boy or a girl");
		theform.lstGender.focus();
		return (false);
	}
	if (theform.txtWishListItems.value == ""){
		alert("Please enter your wish list items!");
		theform.txtWishListItems.focus();
		return (false);
	}
	if (theform.txtEmail.value == ""){
		alert("Please enter your email address!");
		theform.txtEmail.focus();
		return (false);
	}
	return (true);
}

function clear_name(whichname){
	if (whichname == "first" && first_set == false){
		document.frmWishList.txtFirstName.value = "";
		document.frmWishList.txtFirstName.focus();
		first_set = true;
	} else if (whichname == "last" && last_set == false) {
		document.frmWishList.txtLastName.value = "";
		document.frmWishList.txtLastName.focus();
		last_set = true;
	}
}

