
function CheckEmail (form)
{
  validRegExp = /^[^@][^ ]+@[^@]+.[a-z]{2,}$/i ;
  if (form.email.value.search( validRegExp ) == -1)  {
    alert('A valid e-mail address is required.\nPlease amend and retry');
    form.email.focus();
    return false;
    }
  if (form.message.value == "") {
  	alert("Please enter your questions in the text box and retry");
	form.message.focus();
	return false;	
  }
}


function CheckState (state)
{
  if (state.value == "AK" || state.value == "HI")  {
    alert ( "Ground shipping is not available for Alaska and Hawaii, $28 sur-charge will be added to other shipping options except 'Self Stamped Enveloped'");
    //document.surCharge.readonly="No";
    document.forms[0].surcharge.value=28;
    //document.surCharge.readonly="Yes";
  } else {
    document.forms[0].surcharge.value=0;
  }
  CheckShipping();
}

function PayPalAlert (payment_method)
{
  if (payment_method.value == "3") {
    alert ( "A 4% credit card processing fee will be added to the total amount if you select 'PayPal / Credit Card' payment method");
  }
}

function checkContact ( form )
{
  // see http://www.thesitewizard.com/archive/validation.shtml
  // for an explanation of this script and how to use it on your
  // own website

  // ** START **
  if (form.shipping_desc.options[0].selected == true ) {
  	 alert('Please select your shipping back option');
	 form.shipping_desc.focus();
	 return false;
  }  
  // Names
  if (form.first_name.value == "" || form.last_name.value == "" ) {
    alert( "Please enter your first and last name in boxs!" );
    form.first_name.focus();
    return false ;
  }
  // address
  if (form.address1.value == "" ) {
	      alert('Please enter your mailing address');
		  form.address1.focus();
		  return false;
  }
  // city
  if (form.city.value == "" ) {
  	alert ( "Please enter a valid city name");
	form.city.focus();
	return false ;
  }
  // state
  if (form.state.value == "" ) {
  	alert ( "Please select a state from the list");
	form.state.focus();
	return false ;
  }
  // zipcode
  validRegExp = /^[0-9]{5,}$/i ;
  if (form.zipcode.value.search( validRegExp ) == -1)  {
     alert('Please enter a valid 5 digit zipcode');
     form.zipcode.focus();
     return false;
     } 
  // email
  validRegExp = /^[^@][^ ]+@[^@]+.[a-z]{2,}$/i ;
  if (form.email.value.search( validRegExp ) == -1)  {
     alert('A valid e-mail address is required.\nPlease amend and retry');
     form.email.focus();
     return false;
     }   
  return true ;
}



