var ajax = null;
var dadosUser;
function init()
{
	try
	{
		ajax = new ActiveXObject('Microsoft.XMLHTTP'); // I.E explorer
	}
	catch (e)
	{
		try
		{
			ajax = new ActiveXObject('Msxml2.XMLHTTP');
		}
		catch (ex)
		{
			try
			{
				ajax = new XMLHttpRequest();
			}
			catch (exc)
			{
				alert('Seu navegador não tem recursos para o uso de Ajax, por favor atualize-o');
				ajax = null;
			}
		}
	}
}
function request(tipo,url,func)
{
	init();
	if (ajax)
	{
		ajax.open(tipo,url,true);
		ajax.onreadystatechange = func;
		ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=iso-8859-1");
		ajax.send(dadosUser);
	}
}
function aguarde(show)
{
	if (show)
	{
		document.getElementById("aviso").style.visibility = "visible";
		return;
	}
	document.getElementById("aviso").style.visibility = "hidden";
}