function validate_form()
{
var error = "";

if (document.contributionform.Occupation.value == "")
    error += "- Please enter your occupation.\n";

if (document.contributionform.USCitizen[0].checked == false && document.contributionform.USCitizen[1].checked == false)
    error += "- Please specify whether or not you are a U.S. Citizen or permanent resident.\n"
else 
if (document.contributionform.USCitizen[1].checked == true)
    error += "- You must be a U.S. Citizen or permanent resident to make a contribution.\n";

if (document.contributionform.amount[0].checked == false && 
    document.contributionform.amount[1].checked == false && 
    document.contributionform.amount[2].checked == false && 
    document.contributionform.amount[3].checked == false && 
    document.contributionform.amount[4].checked == false &&
    document.contributionform.amount[5].checked == false)
    error += "- Please select a Contribution option.\n"
else
if (document.contributionform.amount[5].checked == true)
   {
   if (document.contributionform.OAmount.value == "")
       error += "- Please enter a contribution amount.\n"
   else
   if (isNaN(document.contributionform.OAmount.value))
    error += "- Please enter a contribution amount between 1 and 500.\n"
   else
   if (document.contributionform.OAmount.value.indexOf(".",0) > 0)
       error += "- Please enter a whole dollar amount (no cents).\n"
   else
   if (document.contributionform.OAmount.value < 1 || document.contributionform.OAmount.value > 500)
       error += "- Please enter a contribution amount between 1 and 500.\n"
   else
    document.contributionform.amount[5].value = document.contributionform.OAmount.value;
   }
else
   document.contributionform.OAmount.value = "";


//error += "Validation edits not complete.\n";

if (error != "")
   {
	alert(error);
    return (false);
   }
else
   { 
//    document.contributionform.Submit.disabled = true;
    document.contributionform.custom.value = document.contributionform.Occupation.value;
    return (true);
	}	 
}

function clear_other_amount() {
if (document.contributionform.amount[5].checked == false)
    document.contributionform.OAmount.value = "";
}

