
	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 abrepagina(endereco,categoria,codigo)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Seu browser não suporta AJAX!");
  return;
  } 
var url=endereco+"?categoria="+categoria+"&codigo="+codigo;
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="<IMG SRC='IMAGES/LOADING.GIF'><BR><FONT SIZE=1 FACE=ARIAL>AGUARDE - PROCESSANDO</FONT>";
}
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 cadastra(endereco,nome,cidade,estado,email,telefone,idade,categoria,calcado,altura,perfil)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Seu browser não suporta AJAX!");
  return;
  } 
var url=endereco+"?nome="+nome+"&cidade="+cidade+"&estado="+estado+"&email="+email+"&telefone="+telefone+"&idade="+idade+"&categoria="+categoria+"&calcado="+calcado+"&altura="+altura+"&perfil="+perfil;
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").innerHTML="<IMG SRC='IMAGES/LOADING.GIF'><BR><FONT SIZE=1 FACE=ARIAL>AGUARDE - PROCESSANDO</FONT>";
}
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 mail(endereco,nome,cidade,estado,email,telefone,departamento,assunto)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Seu browser não suporta AJAX!");
  return;
  } 
var url=endereco+"?nome="+nome+"&cidade="+cidade+"&estado="+estado+"&email="+email+"&telefone="+telefone+"&departamento="+departamento+"&assunto="+assunto;
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").innerHTML="<IMG SRC='IMAGES/LOADING.GIF'><BR><FONT SIZE=1 FACE=ARIAL>AGUARDE - PROCESSANDO</FONT>";
}
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

