// JavaScript Document


//     ---------------------------------------   FUNÇÕES PRA O MENU  -------------------------------------------     //

//--- Submenu Empresa

function abreInstitucional(){
	window.open("institucional.php","_parent");
}

function abrePremios(){
	window.open("premios.php","_parent");
}

function abreParticipacoes(){
	window.open("participacoes.php","_parent");
}

function abreColaboradores(){
	window.open("colaboradores.php","_parent");
}

function abreIso(){
window.open('certificado.html','','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=391,height=540,top=45,left=45');
}

function abreeventos(){
	window.open("eventos.php","_parent");
}

//--- Submenu Imóveis

function abreLancamentos(){
	window.open("lancamentos.php","_parent");
}

function abrePortfolio(){
	window.open("portfolio.php","_parent");
}

function abreEstagioObra(){
	window.open("estagio_obra.php","_parent");
}


function abreImoveisVenda(){
	window.open("imoveis_venda.php","_parent");
	
}

function abreImoveisUsados(){
	window.open("imoveis_usados.php","_parent");
	
}


//--- Submenu Apoio ao Cliente

function abreJuridico(){
	window.open("juridico.php","_parent");
	
}

function abreDicas(){
	window.open("dicas.php","_parent");
	
}

function abreIndices(){
	window.open("indices.php","_parent");
	
}

function abreGoldenCard(){
	window.open("goldencard.php","_parent");
	
}

function abreIncorporacao(){
	window.open("incorporacao.php","_parent");
	
}

function abreAssistencia(){
	window.open("assistencia.php","_parent");
	
}


//--- Preços

function abrePrecos(){
	window.open("precos_imoveis.php","_parent");
	
}

//--- contato

function abreContato(){
	window.open("contato.php","_parent");
	
}
//   --------------------------------------------------   BANNERS TOPO   ---------------------------------------------------//

// BANNER GOLDEN SPACE HOME SERVISE


function AbredetalhesGoldenSpace(){
	window.open("http://www.construtoradallas.com.br/detalhes_empreendimento.php?emp=263_3_0_00576038799","_parent");
}

// BANNER GOLDEN SPACE HOME SERVISE


function AbredetalhesGoldenSquare(){
	window.open("http://www.construtoradallas.com.br/detalhes_empreendimento.php?emp=263_3_0_05331068553","_parent");
}


// BANNER GOLDEN BREEZE

function AbredetalhesGoldenSquare(){
	window.open("http://www.construtoradallas.com.br/detalhes_empreendimento.php?emp=263_3_0_34792575836","_parent");
}

//carrega conteudo estágio obra


tXHR=0;   
divId="";

function XMLHTTPRequest() {   
if (window.XMLHttpRequest) {   
	a=new XMLHttpRequest(); } //Objeto nativo (FF/Safari/Opera7.6+)   
else {   
  try {   
	 a=new ActiveXObject("Msxml2.XMLHTTP");  //activeX (IE5.5+/MSXML2+)   
  }     
  catch(e) {   
	try {   
	   a=new ActiveXObject("Microsoft.XMLHTTP"); //activeX (IE5+/MSXML1)   
	}     
	catch(e) { /* O navegador não tem suporte */   
	   a=false;   
	}   
  }   
}   
return a;   
}   

function recebeResultado() {
  if (!tXHR) {
	  return false;
  }
  else {
	  if (tXHR.readyState == 4) {
		  if (tXHR.status == 200) {
			  document.getElementById(divId).innerHTML = tXHR.responseText;
		  }   
		  else {   
			  document.getElementById(divId).innerHTML = 'Erro! "'+ tXHR.statusText +'" (erro '+ tXHR.status +')';   
		  }   
	  }       
  }   
}   

function acaoConteudo(div,action) {
  divId = div;
  tXHR=XMLHTTPRequest();   
  if (tXHR) {
	  document.getElementById(divId).innerHTML = 
          "<table align='center' valign='center'>"+
          	"<tr>"+
           		"<td align='center'>"+
               		"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />"+
               		"<img src='imagens/load.gif' /><br />"+
                 	"<font color='#0099CC' size='2' face='Verdana, Arial, Helvetica, sans-serif'>Carregando...</font>"+
                       	"<br/><br/><br/><br/><br/><br/><br/>"+
                       	"</td>"+
                "</tr>"+
          "</table>";
	  tXHR.open("POST", action, true);
	  //tXHR.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-1");
	  tXHR.onreadystatechange=recebeResultado;   
	  tXHR.send(null);   
  }   
}



