
	function showEvent( elemento ){
		var c_obj = document.getElementById(elemento);
		if ( c_obj.style.display == 'none' ) c_obj.style.display = 'block';
		else c_obj.style.display = 'none';
	}

function evento(endereco,condicao,cod_resposta)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Seu browser não suporta AJAX!");
  return;
  } 
var url=endereco+"?condicao="+condicao+"&cod_resposta="+cod_resposta;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged5;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged5() 
{ 
if (xmlHttp.readyState==1)
{ 

document.getElementById("resultado").innerHTML="<div style='text-align: center;margin-top: 60px'><IMG SRC='nova_enquete/IMAGES_ENQUETE/LOADING.GIF'><BR><FONT SIZE=1 FACE=ARIAL>AGUARDE - PROCESSANDO</FONT></div>";
}
if (xmlHttp.readyState==4)
{ 

document.getElementById("resultado").innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
};
//FIM da função para pesquisa de clientes



function abrepagina(endereco,regiao)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Seu browser não suporta AJAX!");
  return;
  } 
var url=endereco+"?regiao="+regiao;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged6;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged6() 
{ 
if (xmlHttp.readyState==1)
{ 

document.getElementById("resultado_mapa").innerHTML="<div style='text-align: center;margin-top: 60px'><IMG SRC='nova_enquete/IMAGES_ENQUETE/LOADING.GIF'><BR><FONT SIZE=1 FACE=ARIAL>AGUARDE - PROCESSANDO</FONT></div>";
}
if (xmlHttp.readyState==4)
{ 

document.getElementById("resultado_mapa").innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
};
//FIM da função para pesquisa de clientes




