function Validator(theForm)
{

  if (theForm.CustomPrice.value.length < 1)
  {
    alert("Please enter a value for the price");
    theForm.CustomPrice.focus();
    return (false);
  }

  if (theForm.CustomTitle.value.length < 1)
  {
    alert("Please enter a description of what you are ordering");
    theForm.CustomTitle.focus();
    return (false);
  }



  var checkOK = "0123456789,.";
  var checkStr = theForm.CustomPrice.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
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digits, commas and periods in the price field.");
    theForm.CustomPrice.focus();
    return (false);
  }

  if (decPoints > 1 || !validGroups)
  {
    alert("Please enter a valid number in the \"Price\" field.");
    theForm.CustomPrice.focus();
    return (false);
  }
  return (true);


}
function PasteCustom(){
     document.CustomOrderForm.CustomTitle.focus()
     document.execCommand("Paste");
}

