function subPrintWindow() {
  window.print();
}

function subCloseWindow() {
  window.close();
}

function subBackWindow() {
  history.back();
}

function subAlteraImagemPrincipal(image, width, height) {
  parent.imagemPrincipal.src = image;
  parent.imagemPrincipal.width = width;
  parent.imagemPrincipal.height = height;
}

function subOpenCenterWindow(url, width, height, scr) {
  window.open(url, "", "status=1,scrollbars="+scr+",width="+width+",height="+height+",left="+(screen.width - width) / 2+",top="+(screen.height - height) / 2);
}


function frmPesquisa_Validate(f) {
  if(f.ddlFinalidade.value == "") {
    alert("Não é possível realizar a pesquisa.\nSeleccione a finalidade.");
    return false;
  }
  if(f.ddlTipoImovel.value == "") {
    alert("Não é possível realizar a pesquisa.\nSeleccione o tipo de imóvel.");
    return false;
  }  
  return true;
}
