﻿var intervaloClientes;
var IntervaloImoveis;
var html;
$(document).ready(function(){
        $('.boxlogosrolagem').before('<div id="nav2">').cycle({ 
		fx:     'fade', 
		speed:  'fast', 
		timeout: 6000, 
		pager:  '#nav2' 
	});


						   
});
$(document).ready(function(){

	intervaloClientes = setInterval('giraTodos()', 60);	 
	$("table").removeAttr("border");
	$("table").removeAttr("cellspacing");
	$("table").removeAttr("cellpadding");
	$("table").removeAttr("rules");
	$("#imbDestaque").ready(function()
	{
		

		IntervaloImoveis = window.setInterval('AjAss()',15000);	
	});
	$("#divlogos").html($("#divlogos").html() + $("#divlogos").html());
});
function AjAss(){
	$.ajax({
		type: "GET",
		url: "destaque_home.aspx",
		datatype: "html",
		cache: false,
		success: function(msg){
			html = msg;
			troca();
		}
	});
}

function troca(){
    $("#imbDestaque").slideUp('slow', function(){
			$(this).html(html).slideDown('slow');
	});

}

/*function ExibeFoto(foto,alt)
{
	var dvFoto = document.getElementById('divMostraFoto');
	var novaFoto = new Image();
	novaFoto.src = foto;
	myWidth = novaFoto.width;
	myHeight = 480;
	var img = "<img src=\"" + foto + "\" width='"+ myWidth +"' height='"+ myHeight +"'  border=\"0\" alt =\""+ alt +"\" />";
	dvFoto.innerHTML = img;
}*/

function ExibeFoto(foto)
{
	var dvFoto = document.getElementById('divMostraFoto');
	var novaFoto = new Image();
	novaFoto.src = foto;
	myWidth = novaFoto.width;
	myHeight = 480;
	var img = "<img src=\"" + foto + "\" width=\""+ myWidth +"\" height=\""+ myHeight +"\"  border=\"0\"  />";
	dvFoto.innerHTML = img;
}

function submenu(x){
	var obSub = document.getElementById("sub");
	if(x==1){
		obSub.style.display = "block";
	}else{
		obSub.style.display = "none";
	}
}

function submenuu(x){
	var obSubu = document.getElementById("subu");
	if(x==1){
		obSubu.style.display= "block";
		var txtSeuNome = document.getElementById("txtSeuNome");
		txtSeuNome.setFocus();
	}else{
		obSubu.style.display = "none";
	}
}

function submenuuu(x){
	var obSubuu = document.getElementById("subuu");
	if(x==1){
		obSubuu.style.display= "block";
		
	}else{
		obSubuu.style.display = "none";
	}
}

function expand(x){
	var obj = document.getElementById(x);
	if(obj.style.display == "none") obj.style.display = "block";
	else{ obj.style.display = "none"; }
	
}


