google.load('dojo','1.1.1');getBundle('bundle.htm?action=loadJSONBundle&filter=labs.prices.game');function changeMunicipalDistrict(value){dojo.xhrGet({url:"el-precio-susto.htm?action=loadMunicipalDistrict&province="+value,load:function(responseObject,ioArgs){fillMunicipalDistricts(responseObject);},error:function(response,ioArgs){console.log('error:'+response);return response;},handleAs:"json"});}
function fillMunicipalDistricts(municipalDistricts){clearCombo('municipalDistrict');var option=document.createElement('option');option.setAttribute('value',"");option.appendChild(document.createTextNode(labs_prices_game['labs.prices.game.all']));dojo.byId('municipalDistrict').appendChild(option);for(var i=0;i<municipalDistricts.length;i++){var option=document.createElement('option');option.setAttribute('value',municipalDistricts[i].key);option.appendChild(document.createTextNode(municipalDistricts[i].value));dojo.byId('municipalDistrict').appendChild(option);}}
function clearCombo(id){var obj=dojo.byId(id);obj.innerHTML="";}