//Scripts for validating the Google Checkout input form.
//Very simple.

function validateAmount(amount){
	//check whether it's numeric
	if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/)){
		if (amount.value < 1){
			alert('Please enter an amount of $1 or more.');
			amount.focus();
			return false;
		}
		
		if (amount.value >= 25000){
			alert("Google can't process such a large donation! Please contact us, and we'll be more than happy to talk to you about your donation.");
			amount.focus();
			return false;
		}
		return true;
	}else{
		alert('You must enter a valid donation.');
		amount.focus();
		return false;
	}
}

