<!--
 // a funcao abaixo funciona em qualquer
 // browser ou versão.  
 function createXMLHTTP() 
 {
  var ajax;
  try 
  {
   ajax = new ActiveXObject("Microsoft.XMLHTTP");
  } 
  catch(e) 
  {
   try 
   {
    ajax = new ActiveXObject("Msxml2.XMLHTTP");
    alert(ajax);
   }
   catch(ex) 
   {
    try 
    {
     ajax = new XMLHttpRequest();
    }
    catch(exc) 
    {
      alert("Esse browser não tem recursos para uso do Ajax");
      ajax = null;
    }
   }
   return ajax;
  }
 

 
     var arrSignatures = ["MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0",
           "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP",
           "Microsoft.XMLHTTP"];
     for (var i=0; i < arrSignatures.length; i++) 
     {
    try 
    {
     var oRequest = new ActiveXObject(arrSignatures[i]);
     return oRequest;
    } 
    catch (oError) 
    {
       }
     }
  
      throw new Error("MSXML is not installed on your system.");
 }


 function EnviarDados(pagina,Div,func)
 {
	var oHTTPRequest = createXMLHTTP(); 
	oHTTPRequest.open("post", pagina, true); 
	oHTTPRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso8859-1");
	oHTTPRequest.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
	oHTTPRequest.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
	oHTTPRequest.setRequestHeader("Pragma", "no-cache");
	oHTTPRequest.setRequestHeader("encoding", "ISO-8859-1"); 
	oHTTPRequest.onreadystatechange=function(){
	if (oHTTPRequest.readyState==4){
		document.getElementById(''+Div+'').innerHTML = oHTTPRequest.responseText;
		
			setTimeout(''+func+'',10);
			
			if(!(func == undefined)){
				//document.getElementById("imgloading").style.display = "none"
			}
		}
	}
	oHTTPRequest.send();
 }
//-->

