<!--
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 == "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;	
		}		
		
    else if (obj_type == "TEXTAREA")
		{ if (obj.value.length  == 0) 
      			return false;
    	  else	return true;
    	}		
		
	 else if (obj_type == "SELECT")
		{ if (obj.options[0].selected)
			return false;
		else
	       	return true;
		}
}
		
function  _CF_checkContactUsForm(_CF_this)
{   
	if  (!_CF_hasValue(_CF_this.recipient, "SELECT" )) 
        { if  (!_CF_onError(_CF_this, _CF_this.recipient, _CF_this.recipient.value, "Please select a Recipient."))
         {  return false; }
    }
	
	
	if  (!_CF_hasValue(_CF_this.company, "TEXT" ))
	{	if  (!_CF_onError(_CF_this, _CF_this.company, _CF_this.company.value, "Please enter your Company name."))
         {  return false; }
    }	
	
	if  (!_CF_hasValue(_CF_this.name, "TEXT" ))
	{	if  (!_CF_onError(_CF_this, _CF_this.name, _CF_this.name.value, "Please enter your Full Name."))
         {  return false; }
    }	
		
    if  (!_CF_hasValue(_CF_this.email, "TEXT" )) 
    { if  (!_CF_onError(_CF_this, _CF_this.email, _CF_this.email.value, "Please enter your Email address."))
         {  return false; }
    }  
	  
	if (!isEmail(_CF_this.email.value))
  	{  alert("Please enter a complete Email in the form: yourname@yourdomain.com");
    	 _CF_this.email.focus(); return false;
  	}
	
	if  (!_CF_hasValue(_CF_this.phone, "TEXT" ))
	{	if  (!_CF_onError(_CF_this, _CF_this.phone, _CF_this.phone.value, "Please enter your Phone."))
         {  return false; }
    }	
	
    if  (!_CF_hasValue(_CF_this.subject, "TEXT" )) 
    { if  (!_CF_onError(_CF_this, _CF_this.subject, _CF_this.subject.value, "Please enter the Subject."))
         {  return false; }
    }
	
	if  (!_CF_hasValue(_CF_this.body, "TEXTAREA" )) 
    { if  (!_CF_onError(_CF_this, _CF_this.body, _CF_this.body.value, "Please provide the content of your message."))
         {  return false; }
    }
	
	return true;
}
//-->
