function ajaxPower(paramSend, posAct, idDest, postCont)
{
	//Essa classe esta habilitada a tratar requisicoes GET e POST, sejam unicas ou multiplas.
	
	//criamos uma string numérica randômica para concatenar com o nome de request
	var nomeVar = String(Math.random()).substring(2);
	
	//criamos uma request com uma variavel variavel
	eval('REQ'+nomeVar+' = (window.XMLHttpRequest) ? new XMLHttpRequest() : (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : false ;');
	
	//aqui tomamos a decisao pelo tipo de cabeçalho se GET ou POST
	if(postCont != '')
	{
		eval('REQ'+nomeVar).open("POST",paramSend,true);
		eval('REQ'+nomeVar).setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		eval('REQ'+nomeVar).setRequestHeader("Content-length", postCont.length);
		eval('REQ'+nomeVar).setRequestHeader("Connection", "close");	
	}else{
		eval('REQ'+nomeVar).open("GET",paramSend,true);
	}
	
	//requisicao ajax normal
	eval('REQ'+nomeVar).onreadystatechange=function()  
	{ 
		if (eval('REQ'+nomeVar).readyState==4)  
		{ 
			switch(posAct)
			{
				case 1:
					var partes = (eval('REQ'+nomeVar).responseText).split('|');
					if(parseInt(partes[0]))
					{
						document.getElementById(idDest).innerHTML = partes[2];
						document.getElementById('frmLogin').innerHTML = '<p>Usu&aacute;rio logado: <span style="color:#990000; font-weight:bold;">'+partes[1]+'</span></p><p><a href="javascript:location=\'index.php\'">sair</a></p>';
					}else{
						document.getElementById('msgCheckErrors').innerHTML = '<p style="color:#990000; font-weight:bold;">'+partes[1]+'</p>';						
					}
				break
				
				case 2:
					partes = (eval('REQ'+nomeVar).responseText).split('|');
					if(parseInt(partes[0]))
					{
						document.getElementById(idDest).innerHTML = partes[1];
					}else{
						document.getElementById(idDest).innerHTML = '<p style="color:#990000; font-weight:bold;">Erro</p>';					
					}					
				break;
				
				default:	
					document.getElementById(idDest).innerHTML = (eval('REQ'+nomeVar).responseText);
				break;	
			}
		} 
	} 
	
	//Tratamos o send de GET ou POST
	if(postCont != '')
	{	
		eval('REQ'+nomeVar).send(postCont);
	}else{
		eval('REQ'+nomeVar).send(null); 		
	}
}
