function Validate(theForm)
{
  if (theForm.txtEmail.value != ""){
		if (emailChecking(theForm.txtEmail)==false)
			return (false);
  }

  if (theForm.txtFirstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.txtFirstName.focus();
    return (false);
  }

	if (theForm.txtLastName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.txtLastName.focus();
    return (false);
  }

  if (theForm.txtEmail.value == "") 
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.txtEmail.focus();
    return (false);
  } else { 
	if (trim(theForm.txtEmail.value.toUpperCase()) != trim(theForm.txtEmail2.value.toUpperCase())) { 
		alert("The Emails do not match.");
		theForm.txtEmail.focus();
		return (false);
	}
  }  
  
	if (theForm.txtCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.txtCity.focus();
    return (false);
  }

	if (theForm.txtState.selectedIndex == 0)
  {
    alert("Please enter a value for 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.radIsMember[0].checked && !theForm.radIsMember[1].checked)
  {
    alert("Please enter a value for the \"Are you an Alliance Member\" field.");
    return (false);
  } else { 
	if (theForm.radIsMember[0].checked && theForm.txtMemberNumber.value =="") {
		//alert("Please enter a value for the \"Member Number\" field.");
		//theForm.txtMemberNumber.focus();
		//return (false);
	}
  }

  if (!theForm.radHasBusiness[0].checked && !theForm.radHasBusiness[1].checked)
  {
    alert("Please enter a value for the \"Do you own a Business\" field.");
    return (false);
  } else { 
	if (theForm.radHasBusiness[0].checked && !(theForm.radNoOfEmployees[0].checked || theForm.radNoOfEmployees[1].checked || theForm.radNoOfEmployees[2].checked || theForm.radNoOfEmployees[3].checked || theForm.radNoOfEmployees[4].checked || theForm.radNoOfEmployees[5].checked)) {
		alert("Please enter a value for the \"Number of Employees\" field.");
		return (false);
	}
  }

  if (!(theForm.chkEmailCongress.checked || theForm.chkCallCongress.checked || theForm.chkMeetCongress.checked || theForm.chkWashington.checked || theForm.chkKeepInformed.checked )) { 
    alert("Please enter a value for the \"I am willing to...\" field.");
    return (false);
  }


  return (true);
}
  
function CleanChecks(thisClicked) { 
	if (thisClicked.name == 'chkKeepInformed') { 
		document.frmContactMain.chkEmailCongress.checked = false;
		document.frmContactMain.chkCallCongress.checked = false;
		document.frmContactMain.chkMeetCongress.checked = false;
		document.frmContactMain.chkWashington.checked = false;
	} else { 
		document.frmContactMain.chkKeepInformed.checked = false;
	}
} 

function CleanRadio(thisClicked) { 
	if (thisClicked.name == 'radHasBusiness') { 
		if (document.frmContactMain.radHasBusiness[1].checked) { 
			document.frmContactMain.radNoOfEmployees[0].checked = false;
			document.frmContactMain.radNoOfEmployees[1].checked = false;
			document.frmContactMain.radNoOfEmployees[2].checked = false;
			document.frmContactMain.radNoOfEmployees[3].checked = false;
			document.frmContactMain.radNoOfEmployees[4].checked = false;
			document.frmContactMain.radNoOfEmployees[5].checked = false;
		}
	} else { 
		if (thisClicked.name == 'radNoOfEmployees') {
			document.frmContactMain.radHasBusiness[0].checked = true;
		}
	}
} 

