function _CF_onError(form_object, input_object, object_value, error_message)
    { alert(error_message);return false; }
function _CF_hasValue(obj, obj_type)
    { if (obj_type == "TEXT" || obj_type == "PASSWORD")
   { if (obj.value.length == 0)
 return false;
   else
 return true;
   }   
    else if (obj_type == "SELECT")
   {
   for (i=0; i < obj.length; i++)
 {
 if (obj.options[i].selected)
    return true;
 }
   return false;
   }
    else if (obj_type == "SINGLE_VALUE_RADIO" || obj_type == "SINGLE_VALUE_CHECKBOX")
   {
 if (obj.checked)
    return true;
 else
 return false;
   }
    else if (obj_type == "RADIO" || obj_type == "CHECKBOX")
   {
   for (i=0; i < obj.length; i++)
 {
 if (obj[i].checked)
    return true;
 }
   return false;
   }
   }   
function  _CF_checkTheForm(_CF_this)
    {
    if  (!_CF_hasValue(_CF_this.quotename, "TEXT" ))
   {
   if  (!_CF_onError(_CF_this, _CF_this.quotename, _CF_this.quotename.value, "Your Name is Required!"))
  {
  return false;
  }
   }
    if  (!_CF_hasValue(_CF_this.quotecompany, "TEXT" ))
   {
   if  (!_CF_onError(_CF_this, _CF_this.quotecompany, _CF_this.quotecompany.value, "Your Company Name is Required!"))
  {
  return false;
  }
   }
    if  (!_CF_hasValue(_CF_this.quoteemail, "TEXT" ))
   {
   if  (!_CF_onError(_CF_this, _CF_this.quoteemail, _CF_this.quoteemail.value, "Your Email Address is Required!"))
  {
  return false;
  }
   }
    if  (!_CF_hasValue(_CF_this.xxxx, "TEXT" ))
   {
   if  (!_CF_onError(_CF_this, _CF_this.xxxx, _CF_this.xxxx.value, "Your Phone Number is Required!"))
  {
return false;
  }
   }
    return true;
    }
