// JavaScript Document
function validForm(passform)
	{
		if(passform.what_name.value == "")
				{
				alert("You need to enter your name")
				passform.what_name.focus()
				return false
				}
		if(passform.contact_phone.value == "")
				{
				alert("You need to enter your phone number")
				passform.contact_phone.focus()
				return false
				}
		if(passform.how_much.value == "")
				{
				alert("You need to a payment amount")
				passform.how_much.focus()
				return false
				}
		
		else
				{
				sText = passform.how_much.value;
				var ValidChars = "0123456789.";
   				var IsNumber=true;
   				var Char;

						for (i = 0; i < sText.length && IsNumber == true; i++) 
      						{ 
      							Char = sText.charAt(i); 
      							if (ValidChars.indexOf(Char) == -1) 
         							{
         								IsNumber = false;
         								alert("You need to enter a number")
										passform.how_much.value = ""
										passform.how_much.focus()
										return false
         							}
      						}
				}
		
		if(passform.contact_email.value == "")
				{
				alert("You need to enter your email address. We will never give this to anyone and use it to contact you if there is a problem with the payment")
				passform.contact_email.focus()
				return false
				}
		else
				{
					var x = passform.contact_email.value;
					var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
							if (filter.test(x)) 
									{
										//document.paypal_form.submit();
										return true
									}
							else 
									{
										alert('Enter a valid email address. We will never give this out to anybody');
										passform.contact_email.value="";
										passform.contact_email.focus();
										return false
									}
				}
		
	}
	
function send_paypal()
	{
		document.paypal_form.submit();
	}