/* Alerts if the shipping field is empty or contains anything other */
/* than 0 or 5, then returns shipping and total fields to 0 */
function shippingCheck() {
	if (!document.getElementsByTagName) return false; if (!document.getElementsByTagName) return false;
		nowt=document.getElementById('flashOrder').shipping.value
	if (nowt == "0" || nowt == "5")
	return true
	else
	{
		alert("Please enter either 0 or 5 in the shipping field.")
		document.getElementById('flashOrder').shipping.value = "0";
		document.getElementById('flashOrder').total.value = "0";
	return false
	}
 }
 
/* Calculates the total amount */
function compute()
	{
	if (!document.getElementsByTagName) return false; if (!document.getElementsByTagName) return false;
	with (document.getElementById('flashOrder')) {
		japSub = parseInt(japquantity.value * japset.value)
		headSub = parseInt(headquantity.value * headset.value)
		fantasySub = parseInt(fantasyquantity.value * fantasyset.value)
		subTotal = parseInt(japSub + headSub + fantasySub)
		shipTotal = parseInt(shipping.value)
		total.value = parseInt(subTotal + shipTotal)
	}
}
