	function getWidth() { 
		var x;
		if (window.screen && window.screen.width) { 
			x = window.screen.width.toString();	// ie 7
		} else if (document.documentElement && document.documentElement.clientWidth) {
			x = document.documentElement.clientWidth;	// ie 6
		} else if (document.body && document.body.clientWidth) {
			x = document.body.clientWidth;	// outros
		} else if (self.innerWidth) {
			x = self.innerWidth;	// não ie
		} else {
			x = 1024;	// não pegou
		}
		return x;
	}   
  
	function getHeight() {   
		var y;
		if (window.screen && window.screen.height) { 
			y = window.screen.height.toString();	// ie 7
		} else if (document.documentElement && document.documentElement.clientHeight) {
			y = document.documentElement.clientHeight;	// ie 6
		} else if (document.body && document.body.clientHeight) {
			y = document.body.clientHeight;		// outros
		} else if (self.innerHeight) {
			y = self.innerHeight;	// não ie
		} else {
			y = 768;	// não pegou
		}
		return y;
	}   

	function fxJsMostraLightBox( strNomDivLight ) {
		// Mostrando ou escondendo mensagem
		var st = document.getElementById( strNomDivLight ).style.visibility;
		if (st == 'hidden') {
			document.getElementById( strNomDivLight ).style.visibility = 'visible';
			document.getElementById( strNomDivLight ).style.display = 'block';
		} else {
			document.getElementById( strNomDivLight ).style.visibility = 'hidden';	
			document.getElementById( strNomDivLight ).style.display = 'none';		
		}
		// fundo
		document.getElementById( strNomDivLight ).style.width = getWidth() +"px";
		document.getElementById( strNomDivLight ).style.height = getHeight() +"px";		
		// frente
		document.getElementById( strNomDivLight ).style.top = 0;					// altura topo
		document.getElementById( strNomDivLight ).style.left = 0;					// esquerda
		document.getElementById( strNomDivLight ).style.position = 'absolute';		// firma na tela a mensagem
		document.getElementById( strNomDivLight ).style.zIndex = 2;					// camada
	}
	
	function fxJsPesqRapida( intPasso , divDestino ) {
		/*
		var strFin = document.getElementById('txtFinalidade').value;
		var strCid = document.getElementById('txtCidade').value;				
		var strTip = document.getElementById('txtTipo').value;
		var strDor = document.getElementById('txtDormitorios').value;		
		*/
		var strFin = document.getElementById('pg').value;
		var strCid = document.getElementById('cid').value;				
		var strTip = document.getElementById('tip').value;
		var strDor = document.getElementById('dor').value;		
		// ajx
		strPar  = 'imovel_pesq.ajax.asp?par=psq&intEtp=' +intPasso +'&';
		strPar += 'pg=' +strFin +'&cid=' +strCid +'&';
		strPar += 'tip=' +strTip +'&dor=' +strDor;
		fxAjxExecObjXMLHttp(strPar, divDestino);
	}
	
	function fxJsPesqRapidaProcurar() {
		var strFin = document.getElementById('pg').value;
		var strCid = document.getElementById('cid').value;				
		var strTip = document.getElementById('tip').value;
		var strDor = document.getElementById('dor').value;	
		if (strFin == '') {
			alert('Selecione FINALIDADE do imóvel');	
			return false;
		}
		if (strCid == '') {
			alert('Selecione CIDADE do imóvel');	
			return false;
		}
		location.href = 'imovel_pesq.asp?pg=' +strFin +'&tip=' +strTip +'&cid=' +strCid +'&dor=' +strDor;
		return true;
	}
	

