<!-- Begin

var janela;

function atualiza(){

   if(janela != null){
    janela.close();
   }
   janela = window.open('http://www.guiasjp.com/imoveis/logradouros_imoveis.php?logradouro=' + document.busca_imoveis.logradouro.value + '&id_cidade=' + document.busca_imoveis.id_cidade.value ,'_new','height=300,width=650,scrollbars=yes,left=50,top=5');
   janela.focus();

}

function inicia(){

    local = new Array();
    var maximo, i, campo;

    local = myIframe.a;
    local1 = myIframe.a;

    campo = document.busca_imoveis.bairro;

    maximo = local.length;

    campo.options.length = 0;

    if(maximo > 0){

      addItem(campo,'Todos os bairros','',false,campo.length);
      for (i=0;i<maximo;i++){
        addItem(campo,local[i][1],local[i][0],false,campo.length);
      }

    }

    //----------------------------------------



}

function addItem(obj,strText,strValue,blSel,intPos){

    var newOpt,i,ArTemp,selIndex;
    selIndex = (blSel)?intPos:obj.selectedIndex;
    newOpt = new Option(strText,strValue);
    Len = obj.options.length+1
    if (intPos > Len) return
    obj.options.length = Len
    if (intPos != Len) {
        ArTemp = new Array();
        for(i=intPos;i<obj.options.length-1;i++)
              ArTemp[i] = Array(obj.options[i].text,obj.options[i].value);
        for(i=intPos+1;i<Len;i++)
              obj.options[i] = new Option(ArTemp[i-1][0],ArTemp[i-1][1]);
    }
    obj.options[intPos] = newOpt;
    if (selIndex > intPos)
        obj.selectedIndex = selIndex+1;
    else if (selIndex == intPos)
        obj.selectedIndex = intPos;
}

//]]>