function giftcertificates_Validator(theForm)
{

  if (theForm.giftcertamount.value == "")
  {
    alert("Please enter your Gift Certificate Amount.");
    theForm.giftcertamount.focus();
    return (false);
  }

  var checkOK = "0123456789.,";
  var checkStr = theForm.giftcertamount.value;
  var allValid = 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 != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter a valid Gift Certificate Dollar Amount.");
    theForm.giftcertamount.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid Gift Certificate Dollar Amount.");
    theForm.giftcertamount.focus();
    return (false);
  }
  
  if (theForm.name.value == "")
  {
    alert("Please enter the Recipient's Name.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.address1.value == "")
  {
    alert("Please enter the Recipient's Address.");
    theForm.address1.focus();
    return (false);
  }
  
  if (theForm.city.value == "")
  {
    alert("Please enter the Recipient's City.");
    theForm.city.focus();
    return (false);
  }

  if (theForm.state.value == "")
  {
    alert("Please enter the Recipient's State.");
    theForm.state.focus();
    return (false);
  }
  
  if (theForm.zipcode.value == "")
  {
    alert("Please enter the Recipient's Zip Code.");
    theForm.state.focus();
    return (false);
  }
  
  return (true);
}

