
window.onload = function(){
	ajaxFunction('flavors/inicial.php', 'nav');
}

function ajaxFunction(url,alvo)
  {
	  
	 document.getElementById(alvo).innerHTML='<table width=570 border=0 align=center cellpadding=0 cellspacing=0><tr><td valign=top>carregando<br><div align=right><img src=images/carregando.gif width=16 height=16 /></div></td></tr></table>';
  var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
	 if (xmlHttp.overrideMimeType) {
                xmlHttp.overrideMimeType('text/XML');
                // See note below about this line
            }
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
			
			document.getElementById(alvo).innerHTML=xmlHttp.responseText;
	
        }
      }
xmlHttp.open("GET",url,true);

xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttp.setRequestHeader('Content-Type', "application/x-www-form-urlencoded; charset=iso-8859-1");
xmlHttp.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
xmlHttp.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
xmlHttp.setRequestHeader("Pragma", "no-cache");

xmlHttp.send(null);
  
  }