function set_sel_istat_on_controller(_1){var _2=(function(){var _3="";if($("#sel_istat").val()!=undefined){_3="sel_istat="+$("#sel_istat").val();}return _3;});_1.getAdditionalParameters=_2;}function checkIsAggr(_4){if(_4.idInputBox=="id_input_aziende_city"){showDivBucaDiRicerca(_4);}else{if(_4.idInputBox=="id_input_aziende_city_hp"){hideDivOnAggr(_4,"div_no_aggr_foot");}else{if(_4.idInputBox=="id_input_eventi_dove"){showDivBucaDiRicerca(_4);}else{if(_4.idInputBox=="id_input_annunci_city"){showDivBucaDiRicerca(_4);}else{if(_4.idInputBox=="id_input_cinema_city"){showDivBucaDiRicerca(_4);}else{if(_4.idInputBox=="id_input_notizie_dove"){var _5=_4.typeLoc=="AGGREGATO";hideDiv($("#div_provbocs"),_5);if(_5){$("#id_input_notizie_prov").attr("checked",false);}}}}}}}}function hideDivOnAggr(_6,_7){if(_6.typeLoc=="AGGREGATO"&&document.getElementById(_7)!=null){document.getElementById(_7).style.display="none";}else{if(document.getElementById(_7)!=null){document.getElementById(_7).style.display="block";}}}function showDivBucaDiRicerca(_8){var _9=$("#url_ricerca_aggr").val();var _a=$("#url_ricerca_comune").val();if(_8.typeLoc=="AGGREGATO"){var _b=$("#url_combo_static").val();if(_9!=undefined&&_b!=undefined){getBoxRicerca(_9);loadComboComuniAggregati(_8,_b);}else{}}else{if(_a!=undefined&&_a!="current_box"){getBoxRicerca(_a);}else{if(_a=="current_box"){$("#div_var").html("");}else{}}}}function getBoxRicerca(_c){$.ajax({url:_c,dataType:"html",success:function(_d){$("#div_var").html(_d);$("#indirizzo").val("");},error:function(){}});}function loadBoxRicerca(_e,_f,_10){if(_f=="si"){$.ajax({url:_e,dataType:"html",success:function(_11){$("#div_var").html(_11);if(_10!=""){var _12=_10;var _13=$("#sel_istat").find("option[value='"+_10+"']");_13.attr("selected","selected");if(LOCAL_COMMON.canale=="pubblicautilita"||LOCAL_COMMON.canale=="aziende"){$("#ricerca_con_indirizzo").show();}}},error:function(){}});}else{$.ajax({url:_e,dataType:"html",success:function(_14){$("#div_var").html(_14);},error:function(){}});}}function loadComboComuniAggregati(_15,_16){var _17="/static/"+_15.pathStaticComuneSelected+_16;$.ajax({url:_17,dataType:"html",success:function(_18){$("#sel_istat").html(_18);if(_15.idInputBox!="id_input_annunci_city"){$("#sel_istat").append("<option id=\"\" value=\"\" selected=\"selected\">Tutti i comuni</option>");}else{var _19=$("#sel_istat").find("option[value='"+_15.idCityRif_Aggr+"']");_19.attr("selected","selected");}},error:function(){}});}function setCodIstat_OnCombo(_1a){var _1b=$("#sel_istat").find("option[value='"+_1a+"']");_1b.attr("selected","selected");}function displayAggrOrComune(_1c,_1d,_1e,_1f){if(_1e=="no"){loadBoxRicerca(_1c,_1e,_1f);}else{if(_1e=="si"){loadBoxRicerca(_1d,_1e,_1f);}}}function display_ricerca_indirizzo(){$("#sel_istat").change(function(){var v=$(this).val();if(v!=""){$("#ricerca_con_indirizzo").show();}else{$("#ricerca_con_indirizzo").hide();}});}function hideDiv(_21,_22){if(_22){_21.hide();}else{_21.show();}}
