// JavaScript Document
   function getDown() {
	   location.href = "interna.php?cod=77";
	}
   function cadOuv() {
	   location.href = "interna.php?cod=1";
	}
   function cadSol() {
	   location.href = "interna.php?cod=2";
	}
   function cadFale() {
	   location.href = "interna.php?cod=56";
	}
   function demo(produto) {
     if(produto == "ImobSale") {
	    location.href = "interna.php?cod=57";
	  } 
     if(produto == "ImobPalm") {
	    location.href = "interna.php?cod=57";
	  } 
     if(produto == "Cadimo") {
	    location.href = "interna.php?cod=85";
	  } 
   }
   function listFaq() {
	   location.href = "interna.php?cod=3";
	}
   function cadNews() {
	   location.href = "interna.php?cod=4";
	}
   function logar() {
	   location.href = "index.php?cod=5";
	}
   function upload(prod) {
	   location.href = "interna.php?cod=6&produto="+prod;
	}
   function release(prod) {
      if(prod) {
	   location.href = "interna.php?cod=7&produto="+prod;
	  } 
	  if(!prod) {
	   location.href = "interna.php?cod=7";
	  }
	}
   function caracteristica(prod) {
	   location.href = "interna.php?cod=9&produto="+prod;
	}
   function principal() {
	   location.href = "index.php";
	}
   function cadCurr() {
	   location.href = "index.php?cod=12";
	}
/* ----- Apresenta uma caixa de texto rolante no rodapé da página 
*/ 
var Texto = "IMOBSOFT - TECNOLOGIA E SATISFAÇÃO PARA O MERCADO IMOBILIÁRIO            Av. Santos Dumont,5335 - Sala 810            " 
var Tamanho = Texto.length 
var Trab = Texto.length 
var Trab1=0 
var Temp = "" 
var Mensagem="" 
var CtrTime="" 
for (x=0 ; x <= 200 ; x++) { 
      Mensagem += " " } 
// 
function Mostra() { 
   if (Trab <= Tamanho && Trab> 0) { 
       Temp = Mensagem.substring(1, Mensagem.length) 
       Mensagem = Temp + Texto.substring(Trab1,Trab1 + 1) 
       Trab-- 
       Trab1++ } 
  else { 
       Trab = Texto.length 
       Trab1 = 0 } 
  window.status = Mensagem 
  //document.Form1.Letreiro.value = Mensagem.substring(150, Mensagem.length) 
  CtrTime = setTimeout("Mostra()", 100) 
} 
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/*
function popup() {
   window.open("chat.php","","width=300, height=400");
}
*/
function deslogar() {
   document.frmMain.submit();
}
function beneficio(prod) {
   if(prod == "Cadimo") {
      location.href = "interna.php?cod=18&produto="+prod;
   }
   if(prod == "ImobSale") {
      location.href = "interna.php?cod=19&produto="+prod;
   }
}
function reqBasico(prod) {
  if(prod == "Cadimo") {
     location.href = "interna.php?cod=20&produto="+prod;
  }
  if(prod == "ImobSale") {
     location.href = "interna.php?cod=21&produto="+prod;
  }
  if(prod == "ImobWeb") {
     location.href = "interna.php?cod=37&produto="+prod;
  }
  if(prod == "ImobPalm") {
     location.href = "interna.php?cod=59&produto="+prod;
  }
}
function atualizacao(prod) {
  if(prod == "Cadimo") {
     location.href = "interna.php?cod=22&produto="+prod;
  }
  if(prod == "ImobSale") {
     location.href = "interna.php?cod=23&produto="+prod;
  }
}
function visaoGeral(prod) {
  if(prod == "Cadimo") { 
     location.href = "interna.php?cod=24&produto="+prod;
  }	  
  if(prod == "ImobSale") { 
     location.href = "interna.php?cod=25&produto="+prod;
  }	  
  if(prod == "ImobWeb") { 
     location.href = "interna.php?cod=26&produto="+prod;
  }	  
  if(prod == "ImobPalm") { 
     location.href = "interna.php?cod=27&produto="+prod;
  }	  
}
function pedido(prod) {
  if(prod == "Cadimo") { 
     location.href = "interna.php?cod=24&produto="+prod;
  }	  
  if(prod == "ImobSale") { 
     location.href = "interna.php?cod=45&produto="+prod;
  }	  
  if(prod == "ImobWeb") { 
     location.href = "interna.php?cod=30&produto="+prod;
  }	  
  if(prod == "ImobPalm") { 
     location.href = "interna.php?cod=62&produto="+prod;
  }	  
}
function getSaiba() {
   location.href = "interna.php?cod=36";
}
function getInvest(prod) {
  if(prod == "Cadimo") { 
     //location.href = "interna.php?cod=24&produto="+prod;
  }	  
  if(prod == "ImobSale") { 
     location.href = "interna.php?cod=58";
  }	  
  if(prod == "ImobWeb") { 
     location.href = "interna.php?cod=38&produto="+prod;
  }	  
  if(prod == "ImobPalm") { 
     location.href = "interna.php?cod=60&produto="+prod;
  }	  
}
function getApresent(prod) {
  if(prod == "ImobWeb") { 
     location.href = "interna.php?cod=39&produto="+prod;
  }	  
}
function carregarBanner()
{
var tempo = 0;
  http.open("GET", "banner.php", true);
  http.onreadystatechange = handleHttpResponse;
  http.send(null);
  tempo = 30000;
  setTimeout("carregarBanner()",tempo);
}

function carregarBannerUnico()
{
  http.open("GET", "banner.php", true);
  http.onreadystatechange = handleHttpResponse;
  http.send(null);
}
function handleHttpResponse()
{
  //campo_text = document.getElemntById('banner');
  if (http.readyState == 4) {
     campo_text = http.responseText;
	  //alert(campo_text);
	  document.getElementById('banner').innerHTML = campo_text;
  }
}
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
var http = getHTTPObject();

function carregar(st) {
  if(st == 1) {
		carregarBanner();
  } 
	if(st == 2) {
		carregarBannerUnico();
  } 
}

function Propaganda(){
	
		//e.preventDefault();
		$('body').append('<div id="boxes"><div id="dialog" class="window"><a href="#" class="close">Fechar [X]</a><br /><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="980" height="509" title="Imobredes">  <param name="movie" value="flashsite.swf">  <param name="quality" value="high">  <embed src="flashsite.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="980" height="509"></embed></object></div><div id="mask"></div></div>');
		var id = "#dialog";/*$(this).attr('href');*/
	
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();
	
		$('#mask').css({'width':maskWidth,'height':maskHeight});

		$('#mask').fadeIn(1000);	
		$('#mask').fadeTo("slow",0.8);	
	
		//Get the window height and width
		var winH = $(window).height();
		var winW = $(window).width();
              
		$(id).css('top',  winH/2-$(id).height()/2);
		$(id).css('left', winW/2-$(id).width()/2);
	
		$(id).fadeIn(2000); 
		
	$('.window .close').click(function (e) {
		e.preventDefault();
		$("#boxes").remove();
		/*$('#mask').hide();
		$('.window').hide();*/
		
	});		
	
	$('#mask').click(function () {
		$(this).hide();
		$("#boxes").remove();
		//$('.window').hide();
	});					   
}
