/*
 * Ajax URL Request v1.0
 *
 * Copyright (C) 2007 Fernando Marcelo Morgenstern
 *
 * Você pode utilizar e modificar esse script porém deverá manter esse cabeçalho com as informações
 * do autor.
 *
 * Para saber como utilizar, entre em http://www.fernandomarcelo.com
 *
 * Fernando Marcelo Morgenster ( http://www.fernandomarcelo.com/contato )
 * FID: bf69fa13cb0c4f3d4a30fa794442532 ( Para controle interno, por favor, não remova )
*/

function ajax_url( url , local_conteudo ) {
	function createXMLHttpRequest()
	{
		try{ return new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){}
		try{ return new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){}
		try{ return new XMLHttpRequest(); }catch(e){}
		alert("XMLHttpRequest not supported");
		return null;
	}
	var xhReq = createXMLHttpRequest();
	xhReq.open("post",encodeURI(url),true);
	xhReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-1");
    xhReq.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
    xhReq.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
    xhReq.setRequestHeader("Pragma", "no-cache");
	xhReq.onreadystatechange = function do_readyStateChange(to) {
		if (xhReq.readyState == 4)
		{
			document.getElementById(local_conteudo).innerHTML = xhReq.responseText;
		}
		else
		{
			document.getElementById(local_conteudo).innerHTML = '<img src="http://andersen.eti.br/img/indicator.white.gif" alt="Loading...." />';
		}
	}
	xhReq.send("&ajaxr=true");
} 
