function Mostra(id1, id2) {
  if (id1 != '') expMenu(id1);
  if (id2 != '') expMenu(id2);
}
function expMenu(id) {
  var itm = null;
  if (document.getElementById) {
		itm = document.getElementById(id);
  } else if (document.all){
		itm = document.all[id];
  } else if (document.layers){
		itm = document.layers[id];
  }
	
  if (!itm) {
  }
  else if (itm.style) {
		if (itm.style.display == "none") { itm.style.display = ""; }
	else { itm.style.display = "none"; }
    }
  else { itm.visibility = "show"; }
}

<!-- Ampliar Foto -->
function ampliar_imagem(URL, width, height) {
	var larguratela = screen.width;
	var alturatela = screen.height;
	var largurajanela = ''+width+'';
	var alturajanela = ''+height+'';
	
	var iniciolargura = (larguratela - largurajanela) / 2;
	var inicioaltura = (alturatela-alturajanela) / 2;

   window.open(URL, 'imagem', 'width='+largurajanela+', height='+alturajanela+', top='+inicioaltura+', left='+iniciolargura+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}
<!-- Ampliar Foto -->


<!--  Validação do campo busca -->
function ValidaBusca(){
        if( document.getElementById('textfield').value.length < 3 || document.getElementById('textfield').value == "Utilize a busca para encontrar o imóvel que deseja:" ){
        alert("Para fazer a busca, digite o que deseja no campo de busca de Imóveis.");
        return false;
        }
}
<!--  Validação do campo busca -->


<!-- Validação do campo busca avançada -->
function ValidaBuscaAvancada(){
if(document.form_busca_avancada.categoria.value == ""){
alert('É necessário selecionar pelo menos a Categoria do Imóvel!');
form_busca_avancada.categoria.focus();
return false;
} else {
return true;
}
}
<!-- Validação do campo busca avançada -->

// inicio formata valor nos campos destinados a valor
function FormataValor(fld, milSep, decSep, e) {
var sep = 0;
var key = '';
var i = j = 0;
var len = len2 = 0;
var strCheck = '0123456789';
var aux = aux2 = '';
var whichCode = (window.Event) ? e.which : e.keyCode;
if (whichCode == 13) return true;  // Enter
if (whichCode == 8) return true;
if (whichCode == 46) return true;
key = String.fromCharCode(whichCode);  // Get key value from key code
if (strCheck.indexOf(key) == -1) return false;  // Not a valid key
len = fld.value.length;
for(i = 0; i < len; i++)
if ((fld.value.charAt(i) != '0') && (fld.value.charAt(i) != decSep)) break;
aux = '';
for(; i < len; i++)
if (strCheck.indexOf(fld.value.charAt(i))!=-1) aux += fld.value.charAt(i);
aux += key;
len = aux.length;
if (len == 0) fld.value = '';
if (len == 1) fld.value = '0'+ decSep + '0' + aux;
if (len == 2) fld.value = '0'+ decSep + aux;
if (len > 2) {
aux2 = '';
for (j = 0, i = len - 3; i >= 0; i--) {
if (j == 3) {
aux2 += milSep;
j = 0;
}
aux2 += aux.charAt(i);
j++;
}
fld.value = '';
len2 = aux2.length;
for (i = len2 - 1; i >= 0; i--)
fld.value += aux2.charAt(i);
fld.value += decSep + aux.substr(len - 2, len);
}
return false;
}
// final formata valor nos campos destinados a valor

//inicio carrega flash
function carregaFlash(caminho,largura,altura)
{
document.write('<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="'+largura+'" height="'+altura+'">');
document.write('<param name="movie" value="'+caminho+'">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="menu" value="false">');
document.write('<embed src="'+caminho+'" quality="high" wmode="transparent" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed>');
document.write('</object>');
}
//final carrega flash