function validate_required(field,alerttxt)
{
with (field)
{
  if (value==null||value=="")
  {
  alert(alerttxt);return false;
  }
  else
  {
  return true;
  }
}
}


function validate_form(thisform)
{
var xcontribution;
var xcontribother = document.DonationForm.contribother.value;
var xcontriball;
var winRef;

if(document.DonationForm.contribution[0].checked){xcontribution=1000};
if(document.DonationForm.contribution[1].checked){xcontribution=500};
if(document.DonationForm.contribution[2].checked){xcontribution=250};
if(document.DonationForm.contribution[3].checked){xcontribution=100};
if(document.DonationForm.contribution[4].checked){xcontribution=50};
if(document.DonationForm.contribution[5].checked){xcontribution=25};
if(document.DonationForm.contribution[6].checked){xcontribution=0};
if(xcontribother==""){xcontribother=0};

xcontriball=Number(xcontribution)+Number(xcontribother);

with (thisform)
{
if (validate_required(name,"Name must be filled out!")==false)
  {name.focus();return false;}
}
with (thisform)
{
if (validate_required(phone,"Phone Number must be filled out!")==false)
  {phone.focus();return false;}
}
with (thisform)
{
if (validate_required(address,"Home Address must be filled out!")==false)
  {address.focus();return false;}
}
with (thisform)
{
if (validate_required(city,"City must be filled out!")==false)
  {city.focus();return false;}
}
with (thisform)
{
if (validate_required(state,"State must be filled out!")==false)
  {state.focus();return false;}
}
with (thisform)
{
if (validate_required(zip,"Zip Code must be filled out!")==false)
  {zip.focus();return false;}
}
winRef = window.open('https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=daren%40dnisarian%2ecom&item_name=Donate%20to%20Friends%20of%20Daren%20Nisarian&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8');
if(xcontriball>99.99){
with (thisform)
{
if (validate_required(occupation,"Occupation must be filled out!")==false)
  {occupation.focus();return false;}
}
with (thisform)
{
if (validate_required(employer,"Employer must be filled out!")==false)
  {employer.focus();return false;}
}
with (thisform)
{
if (validate_required(empaddress,"Employer Address must be filled out!")==false)
  {empaddress.focus();return false;}
}
}
}