
function sendMail1(){
	if (document.form1.guestNameF.value=="") {
		alert("Please enter your First Name.");
	}
	else if (document.form1.guestEmail.value=="") {
		alert("Please enter your Email Address.");
	}
	else if (document.form1.guestSubject.value=="") {
		alert("Please enter a Subject.");
	}
	else if (document.form1.guestQuestion.value=="") {
		alert("Please enter your Questions.");
	}
	else
		document.form1.submit();
}

function checkQty1(prodQty) {
	if (isNaN(prodQty.value)) {
		window.alert("Error! You have entered a value that is not a number.");
		prodQty.value = 1;
		return false;
	}
	else if (prodQty.value < 1) {
			window.alert("Error! You have entered a value that is smaller then '1'.");
			prodQty.value = 1;
			return false;
	}
	else 
		return true;
}

function checkQty2(prodQty) {
	if (isNaN(prodQty.value)) {
		window.alert("Error! You have entered a value that is not a number.");
		prodQty.value = "";
		return false;
	}
	else if (prodQty.value < 0) {
		window.alert("Error! You have entered a value that is smaller then '0'.");
		prodQty.value = "";
		return false;
	}
	else
		return true;
}

function DoCopy() {
	if (document.form1.Same.checked==true) {
		document.form1.ship_fname.value=document.form1.bill_fname.value;
		document.form1.ship_lname.value=document.form1.bill_lname.value;
		document.form1.ship_address1.value=document.form1.bill_address1.value;
		document.form1.ship_address2.value=document.form1.bill_address2.value;
		document.form1.ship_city.value=document.form1.bill_city.value;
		document.form1.ship_state.value=document.form1.bill_state.value;
		document.form1.ship_zip.value=document.form1.bill_zip.value;
		document.form1.ship_country.value=document.form1.bill_country.value;
	}
	if (document.form1.Same.checked==false) {
		document.form1.ship_fname.value="";
		document.form1.ship_lname.value="";
		document.form1.ship_address1.value="";
		document.form1.ship_address2.value="";
		document.form1.ship_city.value="";
		document.form1.ship_state.value="";
		document.form1.ship_zip.value="";
		document.form1.ship_country.value="";
	}	
}

function checkBillForm() {

	if (form1.bill_fname.value == "") {
		window.alert("Please enter your First Name.");
	} else

	if (form1.bill_lname.value == "") {
		window.alert("Please enter your Last Name.");
	} else

	if (form1.bill_address1.value == "") {
		window.alert("Please enter the Billing Address.");
	} else

	if (form1.bill_address1.value.length <= 7) {
		window.alert("Invalid Billing Address.");
	} else

	if (form1.bill_city.value == "") {
		window.alert("Please enter the Billing City.");
	} else

	if (form1.bill_city.value.length <= 2) {
		window.alert("Invalid Billing City.");
	} else

	if (form1.bill_state.value == "") {
		window.alert("Please enter the Billing State.");
	} else

	if (form1.bill_zip.value == "") {
		window.alert("Please enter the Billing Zip Code.");
	} else

	if (isNaN(form1.bill_zip.value)) {
		window.alert("Invalid Billing Zip Code.");
	} else

	if (form1.bill_cctype.value == "") {
		window.alert("Please enter the Credit Card Type.");
	} else

	if (form1.bill_ccnumber.value == "") {
		window.alert("Please enter the Credit Card Number. (No space or desh. Ie. 1234123412341234)");
	} else

	if (form1.bill_ccexpmonth.value == "") {
		window.alert("Please enter the credit card's Expiration Month.");
	} else

	if (form1.bill_ccexpyear.value == "") {
		window.alert("Please enter the credit card's Expiration Year.");
	} else

	if (form1.bill_ccname.value == "") {
		window.alert("Please enter the Name shows on your credit card.");
	} else

	if (form1.bill_phone.value == "") {
		window.alert("Please enter the Phone number. (Ie. 209-123-1234)");
	} else

	if (form1.bill_phone.value.length < 12) {
		window.alert("Invalid Phone number. (Ie. 209-123-1234)");
	} else

	if (form1.bill_email.value == "") {
		window.alert("Please enter your email address. (Ie. jsmith@myisp.com)");
	} else

	if (form1.ship_fname.value == "") {
		window.alert("Please enter your First Name (Shipping).");
	} else

	if (form1.ship_lname.value == "") {
		window.alert("Please enter your Last Name (Shipping).");
	} else

	if (form1.ship_address1.value == "") {
		window.alert("Please enter the Shipping Address.");
	} else

	if (form1.ship_address1.value.length <= 7) {
		window.alert("Invalid Shipping Address.");
	} else

	if (form1.ship_city.value == "") {
		window.alert("Please enter the Shipping City.");
	} else

	if (form1.ship_city.value.length <= 2) {
		window.alert("Invalid Shipping City.");
	} else

	if (form1.ship_state.value == "") {
		window.alert("Please enter the Shipping State.");
	} else

	if (form1.ship_zip.value == "") {
		window.alert("Please enter the Shipping Zip Code.");
	} else

	if (form1.ship_zip.value.length < 5) {
		window.alert("Invalid Shipping Zip Code.");
	} else

	if (isNaN(form1.ship_zip.value)) {
		window.alert("Invalid Shipping Zip Code.");
	} else {
		document.form1.submit();
	}

}
