function Form1_Validator(theForm)
{
  if (theForm.agree.checked == false)    
  {		
    alert("You must agree to the Terms and conditions and privacy policy.");
    theForm.agree.focus();
    return (false);	
  }	

  if (theForm.fname.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.fname.focus();
    return (false);
  }

  if (theForm.lname.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.lname.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Email Address\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length < 6)
  {
    alert("Please enter at least 6 characters in the \"Email Address\" field.");
    theForm.email.focus();
    return (false);
  }
  
  if (theForm.address.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.address.focus();
    return (false);
  }
  
  if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.city.focus();
    return (false);
  }
  
  if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.state.focus();
    return (false);
  }
  
  if (theForm.zip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.zip.focus();
    return (false);
  }
  
    if (theForm.nameoncc.value == "")
  {
    alert("Please enter a value for the \"Credit Card Name\" field.");
    theForm.nameoncc.focus();
    return (false);
  }
  
  if (theForm.ccNumber.value == "")
  {
    alert("Please enter a value for the \"Credit Card Number\" field.");
    theForm.ccNumber.focus();
    return (false);
  }
  
  if (theForm.expdate1.value == "")
  {
    alert("Please enter a value for the \"Credit Card Expiration Date\" field.");
    theForm.expdate.focus();
    return (false);
  }
  
  if (theForm.expdate2.value == "")
  {
    alert("Please enter a value for the \"Credit Card Expiration Date\" field.");
    theForm.expdate.focus();
    return (false);
  }
  
  if (theForm.ccType.selectedIndex == 0)
   {
    alert("Please enter a value for the \"Credit Card Type\" field.");
    theForm.ccType.focus();
    return (false);
  }
  
  return (true);
}



function popup(url) {
	newwindow=window.open(url,'name','height=400,width=400,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}
