function FrontPage_Form1_Validator(theForm)
{

  //Added 11/10/2008
 
  var test_fieds=true;
  
  if(theForm.txttable[0].checked || theForm.txttable[1].checked  || theForm.txttable[2].checked  || theForm.txttable[3].checked  || theForm.txttable[4].checked  || theForm.txttable[5].checked ){}
  else{
  	var test_fields=false;
  }
  
  if(theForm.GeneralDonations.value=="" && test_fields==false){
  alert("Please select at least one of the donation types!");
  return (false);
  }

  if (theForm.txtPerson.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    
    return (false);
  }

  if (theForm.txtPerson.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Name\" field.");
    theForm.txtPerson.focus();
    return (false);
  }

  if (theForm.txtTitle.value == "")
  {
    alert("Please enter a value for the \"Title\" field.");
    theForm.txtTitle.focus();
    return (false);
  }

  if (theForm.txtTitle.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Title\" field.");
    theForm.txtTitle.focus();
    return (false);
  }

  if (theForm.txtCompany.value == "")
  {
    alert("Please enter a value for the \"Company\" field.");
    theForm.txtCompany.focus();
    return (false);
  }

  if (theForm.txtCompany.value.length > 150)
  {
    alert("Please enter at most 150 characters in the \"Company\" field.");
    theForm.txtCompany.focus();
    return (false);
  }

  if (theForm.txtAddress.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.txtAddress.focus();
    return (false);
  }

  if (theForm.txtAddress.value.length > 150)
  {
    alert("Please enter at most 150 characters in the \"Address\" field.");
    theForm.txtAddress.focus();
    return (false);
  }

  if (theForm.txtCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.txtCity.focus();
    return (false);
  }

  if (theForm.txtCity.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"City\" field.");
    theForm.txtCity.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ \t\r\n\f";
  var checkStr = theForm.txtCity.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter and whitespace characters in the \"City\" field.");
    theForm.txtCity.focus();
    return (false);
  }

  if (theForm.txtState.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.txtState.focus();
    return (false);
  }

  if (theForm.txtState.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"State\" field.");
    theForm.txtState.focus();
    return (false);
  }

  if (theForm.txtState.value.length > 2)
  {
    alert("Please enter at most 2 characters in the \"State\" field.");
    theForm.txtState.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ";
  var checkStr = theForm.txtState.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter characters in the \"State\" field.");
    theForm.txtState.focus();
    return (false);
  }

  if (theForm.txtZip.value == "")
  {
    alert("Please enter a value for the \"Zip\" field.");
    theForm.txtZip.focus();
    return (false);
  }

  if (theForm.txtZip.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"Zip\" field.");
    theForm.txtZip.focus();
    return (false);
  }

  if (theForm.txtZip.value.length > 10)
  {
    alert("Please enter at most 10 characters in the \"Zip\" field.");
    theForm.txtZip.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.txtZip.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch == "," && decPoints != 0)
    {
      validGroups = false;
      break;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Zip\" field.");
    theForm.txtZip.focus();
    return (false);
  }

  if (decPoints > 1 || !validGroups)
  {
    alert("Please enter a valid number in the \"txtZip\" field.");
    theForm.txtZip.focus();
    return (false);
  }

  if (theForm.txtEmail.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.txtEmail.focus();
    return (false);
  }

  if (theForm.txtEmail.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Email\" field.");
    theForm.txtEmail.focus();
    return (false);
  }

  if (theForm.txtPhone.value == "")
  {
    alert("Please enter a value for the \"Phone\" field.");
    theForm.txtPhone.focus();
    return (false);
  }

  if (theForm.txtPhone.value.length < 10)
  {
    alert("Please enter at least 10 characters in the \"Phone\" field.");
    theForm.txtPhone.focus();
    return (false);
  }

  if (theForm.txtPhone.value.length > 15)
  {
    alert("Please enter at most 15 characters in the \"Phone\" field.");
    theForm.txtPhone.focus();
    return (false);
  }

  if (theForm.txtFax.value == "")
  {
    alert("Please enter a value for the \"Fax\" field.");
    theForm.txtFax.focus();
    return (false);
  }

  if (theForm.txtFax.value.length < 10)
  {
    alert("Please enter at least 10 characters in the \"Fax\" field.");
    theForm.txtFax.focus();
    return (false);
  }

  if (theForm.txtFax.value.length > 15)
  {
    alert("Please enter at most 15 characters in the \"Fax\" field.");
    theForm.txtFax.focus();
    return (false);
  }
  
  
 
  
  
  

  if (theForm.txtContactPerson.value == "")
  {
    alert("Please enter a value for the \"Contact Name\" field.");
    theForm.txtContactPerson.focus();
    return (false);
  }

  if (theForm.txtContactPerson.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Contact Name\" field.");
    theForm.txtContactPerson.focus();
    return (false);
  }
  
  if (theForm.txtContactTitle.value == "")
  {
    alert("Please enter a value for the \"Contact Title\" field.");
    theForm.txtContactTitle.focus();
    return (false);
  }

  if (theForm.txtContactTitle.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Contact Title\" field.");
    theForm.txtContactTitle.focus();
    return (false);
  }

  if (theForm.txtContactPhone.value == "")
  {
    alert("Please enter a value for the \"Contact Phone\" field.");
    theForm.txtContactPhone.focus();
    return (false);
  }

  if (theForm.txtContactPhone.value.length < 10)
  {
    alert("Please enter at least 10 characters in the \"Contact Phone\" field.");
    theForm.txtContactPhone.focus();
    return (false);
  }

  if (theForm.txtContactPhone.value.length > 15)
  {
    alert("Please enter at most 15 characters in the \"Contact Phone\" field.");
    theForm.txtContactPhone.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.txtContactPhone.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch == "," && decPoints != 0)
    {
      validGroups = false;
      break;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Contact Phone\" field.");
    theForm.txtContactPhone.focus();
    return (false);
  }

  if (decPoints > 1 || !validGroups)
  {
    alert("Please enter a valid number in the \"txtContactPhone\" field.");
    theForm.txtContactPhone.focus();
    return (false);
  }

  if (theForm.txtContactFax.value == "")
  {
    alert("Please enter a value for the \"Contact Fax\" field.");
    theForm.txtContactFax.focus();
    return (false);
  }

  if (theForm.txtContactFax.value.length < 10)
  {
    alert("Please enter at least 10 characters in the \"Contact Fax\" field.");
    theForm.txtContactFax.focus();
    return (false);
  }

  if (theForm.txtContactFax.value.length > 15)
  {
    alert("Please enter at most 15 characters in the \"Contact Fax\" field.");
    theForm.txtContactFax.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.txtContactFax.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch == "," && decPoints != 0)
    {
      validGroups = false;
      break;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Contact Fax\" field.");
    theForm.txtContactFax.focus();
    return (false);
  }

  if (decPoints > 1 || !validGroups)
  {
    alert("Please enter a valid number in the \"txtContactFax\" field.");
    theForm.txtContactFax.focus();
    return (false);
  }

  if (theForm.txtContactEmail.value == "")
  {
    alert("Please enter a value for the \"Contact Email\" field.");
    theForm.txtContactEmail.focus();
    return (false);
  }

  if (theForm.txtContactEmail.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Contact Email\" field.");
    theForm.txtContactEmail.focus();
    return (false);
  }

  if (theForm.txtContactEmail.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Contact Email\" field.");
    theForm.txtContactEmail.focus();
    return (false);
  }
  
  return (true);
}




	 
	 function copyInfo()
	 {	
		var the_box = window.document.FrontPage_Form1.SameInfo;
		
		if (the_box.checked == true) 
		{
			window.document.FrontPage_Form1.txtContactPerson.value = window.document.FrontPage_Form1.txtPerson.value;
			window.document.FrontPage_Form1.txtContactTitle.value = window.document.FrontPage_Form1.txtTitle.value;
			window.document.FrontPage_Form1.txtContactPhone.value = window.document.FrontPage_Form1.txtPhone.value;
			window.document.FrontPage_Form1.txtContactFax.value = window.document.FrontPage_Form1.txtFax.value;
			window.document.FrontPage_Form1.txtContactEmail.value = window.document.FrontPage_Form1.txtEmail.value;
		} 
		else 
		{
			window.document.FrontPage_Form1.txtContactPerson.value = "";
			window.document.FrontPage_Form1.txtContactTitle.value = "";
			window.document.FrontPage_Form1.txtContactPhone.value = "";
			window.document.FrontPage_Form1.txtContactFax.value = "";
			window.document.FrontPage_Form1.txtContactEmail.value = "";
		}
	 }
