function ajaxEmailFunction(email,campoRisposta)
{
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari  
xmlHttp=new XMLHttpRequest();  
}
catch (e)
  {  // Internet Explorer  
  try
    {    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");  
	}
  catch (e)
    {    
	try
      {      
	  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      
	  }
    catch (e)
      {      
	  alert("Your browser does not support AJAX!");
	  return false;      
	  }    
	 }  
	}
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      //document.myForm.time.value=xmlHttp.responseText;
	  //AQUI E' O RESULTADO DA PAGINA ASP POR EXEMPLO QUE PROCESSOU AS INFORMACOES EM BACKGROUND
	  var risultato = xmlHttp.responseText;
	  //alert(risultato);
	  if(risultato=="OK"){		 
		   document.getElementById(campoRisposta).value="OK";
		   document.getElementById(campoRisposta+"div").innerHTML="<img src='IMAGES/btOk.png'/>";
	  }else{
		   document.getElementById(campoRisposta).value="";
		   document.getElementById(campoRisposta+"div").innerHTML="<img src='IMAGES/btErro.png'/>";
	  }
      }
    }
	//AQUI QUE EU PECO PRA OUTRA PAGINA FAZE ALGUMA COISA PRA MIM EM BACKGROUND
  xmlHttp.open("GET","AJAX-controlla-email.asp?email="+email,true);
  xmlHttp.send(null);  
  }
  
  //ajaxFunction();

