
function ajaxInit() {
	var req;
	
	try {
	 req = new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
	 try {
	  req = new ActiveXObject("Msxml2.XMLHTTP");
	 } catch(ex) {
	  try {
	   req = new XMLHttpRequest();
	  } catch(exc) {
	   alert("Esse browser não tem os recursos necessários!");
	   req = null;
	  }
	 }
	}
	
	return req;
}

function fChecarEmail(pValorEmail) {
  //INCIA A FUNCAO DO HTTP
  ajax = ajaxInit();		

 if(ajax) {
   ajax.open("POST", "http://www.fastjob.com.br/DominioWS/frmChecar.aspx", true);
   ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
   ajax.send("pEmail="+pValorEmail.value+"");

   ajax.onreadystatechange = function() {
	 if(ajax.readyState == 4) {
	   if(ajax.status == 200) {
			var vRetorno = ajax.responseText;
			if (vRetorno.substring(0,1)=="0") {
				alert("Email Inválido!");										
				pValorEmail.value="";
				pValorEmail.focus();
			}			
	   } else {
			//alert(ajax.statusText);
	   }
	 }			
   }
 }	
}

