/*
|===============================================|
| JAVA-SCRIPT - AJAX                            |
| DESENVOLVEDOR: TIAGO ROCHA SARNO              |
| DATA: 09/06/2006                              |
| ULTIMA ATUALIZAÇÃO: 28/04/2008 < TIAGO >      |
| http://www.veloxi.com.br                      |
|===============================================|
*/
try{
xmlhttp = new XMLHttpRequest();
}catch(ee){
	try{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e){
		try{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}catch(E){
			xmlhttp = false;
		}
	}
}

function ajax_1_parametro(pcPagina, pcCamada, pr1, pr2){
	var req = null;		
	if(window.XMLHttpRequest){
		req = new XMLHttpRequest();		
		req.onreadystatechange = processReqChange;		
		req.open("GET",pcPagina+"?"+pr1+"="+pr2, true);		
		document.getElementById(pcCamada).innerHTML = "Aguarde, processando...";
		req.send(null);		
	}else if(window.ActiveXObject){
		req = new ActiveXObject("Microsoft.XMLHTTP");
		if(req){			
			req.onreadystatechange = processReqChange;
			req.open("GET",pcPagina+"?"+pr1+"="+pr2, true);
			document.getElementById(pcCamada).innerHTML = "Aguarde, processando...";
			req.send();
		}
	}
	function processReqChange(){
		if(req.readyState == 4){
			if((req.status == 200) && ((req.responseText) != "UNKNOWN")) { 
				document.getElementById(pcCamada).innerHTML = req.responseText;			
			}
		}
	}
}
