function sendConsult()
{

  var msg = '';

  if ($F('contact_name').empty())
  {
    msg += '- Contact Person is null! ' + '\n';
  }
  
  if ($F('email').empty())
  {
    msg += '- E-mail is null!' + '\n';
  }
  else
  {
    REstr = /([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)/;
    if (!REstr.test($F('email')))
    {
        msg += '- E-maill is incorrect!' + '\n';
    }
  }
  
  if($F('company_name').empty())
  {
  	msg += '- Company\'s name is null!' + '\n';
  }
  
  if($F('company_tel').empty())
  {
  	msg += '- Tel is null!' + '\n';
  }
/*  
  if($F('company_web').empty())
  {
  	msg += '- Company\'s web is null!' + '\n';
  }
  else{
	  webstr = /^http/;
      if (webstr.test($F('company_web')))
   		{
        	msg += '- Company\'s web is incorrect!' + '\n';
    	}

  }

  if($F('company_address').empty())
  {
  	msg += '- Company\'s address is null!' + '\n';
  }
*/  
  if ($F('contents').empty())
  {
    msg += '- Contents is null!' + '\n';
  }
  
  if($F('company_type').empty())
  {
    msg += '- Business Model is null!' + '\n';
  }
  
    if($F('company_type2').empty())
  {
    msg += '- Application Category null!' + '\n';
  }


  if($F('country_city').empty())
  {
    msg += '- Country City is null!' + '\n';
  }
  
  if($F('info_from').empty())
  {
    msg += '- How to know website is null!' + '\n';
  }

  if (msg.length > 0)
  {
    alert(msg);
  }
  else
  {
    var url = 'common.php?step=send_consult';

    new Ajax.Request(url, {
                     method: 'post',
                     parameters: $("ConsultInfo").serialize(),
                     onLoading: showLoader,
                     onComplete: hideLoader,
                     onSuccess: sendConsultResponse});
  }
}

function sendConsultResponse(result)
{

  var result = result.responseText.evalJSON(true);
  if (result.error > 0)
  {
    alert(result.message);
  }
  else
  {
    alert("系統已將您所填寫資料轉寄客服人員，我們會盡快於您聯絡。");
    Form.reset('ConsultInfo');
  }
}