var regiondb = new Object() regiondb["Romania"] = [ {value:"1", text:"Alba"}, {value:"2", text:"Arad"}, {value:"3", text:"Arges"}, {value:"4", text:"Bacau"}, {value:"5", text:"Bihor"}, {value:"6", text:"Bistrita-Nasaud"}, {value:"7", text:"Botosani"}, {value:"8", text:"Brasov"}, {value:"9", text:"Braila"}, {value:"10", text:"Buzau"}, {value:"11", text:"Caras-Severin"}, {value:"12", text:"Cluj"}, {value:"13", text:"Constanta"}, {value:"14", text:"Covasna"}, {value:"15", text:"Dambovita"}, {value:"16", text:"Dolj"}, {value:"17", text:"Galati"}, {value:"18", text:"Gorj"}, {value:"19", text:"Harghita"}, {value:"20", text:"Hunedoara"}, {value:"21", text:"Ialomita"}, {value:"22", text:"Iasi"}, {value:"23", text:"Ilfov"}, {value:"24", text:"Maramures"}, {value:"25", text:"Mehedinti"}, {value:"26", text:"Mures"}, {value:"27", text:"Neamt"}, {value:"28", text:"Olt"}, {value:"29", text:"Prahova"}, {value:"30", text:"Satu-Mare"}, {value:"31", text:"Salaj"}, {value:"32", text:"Sibiu"}, {value:"33", text:"Suceava"}, {value:"34", text:"Teleorman"}, {value:"35", text:"Timis"}, {value:"36", text:"Tulcea"}, {value:"37", text:"Vaslui"}, {value:"38", text:"Valcea"}, {value:"39", text:"Vrancea"}, {value:"40", text:"Bucuresti"}, {value:"41", text:"Calarasi"}, {value:"42", text:"Giurgiu"} ]; var regiondb2 = new Object() regiondb2["1"] = [ {value:"1", text:"Beldiu"},{value:"2", text:"Alba Iulia"},{value:"3", text:"Sebes"},{value:"4", text:"Aiud"},{value:"5", text:"Baia de Aries"},{value:"6", text:"Zlatna"},{value:"7", text:"Abrud"},{value:"8", text:"Blaj"},{value:"9", text:"Cugir"} ]; regiondb2["2"] = [ {value:"10", text:"Arad"},{value:"11", text:"Curtici"},{value:"12", text:"Nadlac"},{value:"13", text:"Ineu"},{value:"14", text:"Lipova"} ]; regiondb2["3"] = [ {value:"15", text:"Pitesti"},{value:"16", text:"Colibasi"},{value:"17", text:"Rucar"},{value:"18", text:"Topoloveni"},{value:"19", text:"Dambovicioara"},{value:"20", text:"Mioveni"},{value:"21", text:"Campulung"}]; regiondb2["4"] = [ {value:"22", text:"Targu Ocna"},{value:"23", text:"Darmanesti"},{value:"24", text:"Bacau"},{value:"25", text:"Borzesti"},{value:"26", text:"Onesti"},{value:"27", text:"Slanic Moldova"},{value:"28", text:"Buhusi"},{value:"29", text:"Comanesti"},{value:"30", text:"Moinesti"}]; regiondb2["5"] = [ {value:"31", text:"Oradea"},{value:"32", text:"Beius"},{value:"33", text:"Nucet"},{value:"34", text:"Salonta"},{value:"35", text:"Vascau"}]; regiondb2["6"] = [ {value:"36", text:"Bistrita"},{value:"37", text:"Rebrisoara"},{value:"38", text:"Sintereag"},{value:"39", text:"Beclean"},{value:"40", text:"Sangeorz-bai"},{value:"41", text:"Nasaud"}]; regiondb2["7"] = [ {value:"42", text:"Botosani"},{value:"43", text:"Dorohoi"},{value:"44", text:"Dealu Mare"}]; regiondb2["8"] = [ {value:"45", text:"Brasov"},{value:"46", text:"Sambata"},{value:"47", text:"Fagaras"},{value:"48", text:"Purcareni"},{value:"49", text:"Bran"},{value:"50", text:"Predeal"},{value:"51", text:"Codlea"},{value:"52", text:"Sanpetru"},{value:"53", text:"Moeciu"},{value:"54", text:"Ghimbav"},{value:"55", text:"Sacele"},{value:"56", text:"Prejmer"},{value:"57", text:"Paraul Rece"},{value:"58", text:"Rasnov"},{value:"59", text:"Poiana Brasov"},{value:"60", text:"Rupea"},{value:"61", text:"Zarnesti"}]; regiondb2["9"] = [ {value:"62", text:"Braila"},{value:"63", text:"Faurei"},{value:"64", text:"Insuratei"},{value:"65", text:"Ianca"}]; regiondb2["10"] = [ {value:"66", text:"Chiojdu"},{value:"67", text:"Buzau"},{value:"68", text:"Nehoiu"},{value:"69", text:"Pogoanele"},{value:"70", text:"Ramnicu Sarat"}]; regiondb2["11"] = [ {value:"71", text:"Baile Herculane"},{value:"72", text:"Caransebes"},{value:"73", text:"Resita"},{value:"74", text:"Bocsa"},{value:"75", text:"Calnic"},{value:"76", text:"Otelu Rosu"},{value:"77", text:"Moldova Noua"},{value:"78", text:"Anina"},{value:"79", text:"Oravita"}]; regiondb2["12"] = [ {value:"80", text:"Dej"},{value:"81", text:"Cluj Napoca"},{value:"82", text:"Turda"},{value:"83", text:"Gherla"},{value:"84", text:"Huedin"}]; regiondb2["13"] = [ {value:"85", text:"Mangalia"},{value:"86", text:"Constanta"},{value:"87", text:"Eforie Nord"},{value:"88", text:"Jupiter"},{value:"89", text:"Mamaia"},{value:"90", text:"Costinesti"},{value:"91", text:"Olimp"},{value:"92", text:"Neptun"},{value:"93", text:"Navodari"},{value:"94", text:"Medgidia"},{value:"95", text:"Harsova"},{value:"96", text:"Cernavoda"},{value:"97", text:"Baneasa"},{value:"98", text:"Basarabi"},{value:"99", text:"Negru Voda"},{value:"100", text:"Agigea"},{value:"101", text:"Techirghiol"},{value:"102", text:"Eforie Sud"},{value:"103", text:"Statiuni sud"},{value:"104", text:"Corbu"}]; regiondb2["14"] = [ {value:"105", text:"Covasna"},{value:"106", text:"Sfantul Gheorghe"},{value:"107", text:"Targu Secuiesc"},{value:"108", text:"Baraolt"},{value:"109", text:"Bradet"},{value:"110", text:"Biborteni"},{value:"111", text:"Intorsura Buzaului"}]; regiondb2["15"] = [ {value:"112", text:"Targoviste"},{value:"113", text:"Pucioasa"},{value:"114", text:"Gaesti"},{value:"115", text:"Moreni"},{value:"116", text:"Fieni"},{value:"117", text:"Titu"}]; regiondb2["16"] = [ {value:"118", text:"Craiova"},{value:"119", text:"Bailesti"},{value:"120", text:"Calafat"},{value:"121", text:"Filiasi"},{value:"122", text:"Rovine"},{value:"123", text:"Bechet"}]; regiondb2["17"] = [ {value:"124", text:"Galati"},{value:"125", text:"Tecuci"}]; regiondb2["18"] = [ {value:"126", text:"Tg. Jiu"},{value:"127", text:"Motru"},{value:"128", text:"Rovinari"},{value:"129", text:"Turceni"},{value:"130", text:"Tismana"}]; regiondb2["19"] = [ {value:"131", text:"Lacu Rosu"},{value:"132", text:"Izvorul Muresului"},{value:"133", text:"Miercurea Ciuc"},{value:"134", text:"Gheorghieni"},{value:"135", text:"Borsec"},{value:"136", text:"Baile Tusnad"},{value:"137", text:"Toplita"},{value:"138", text:"Balan"},{value:"139", text:"Odorheiul Secuiesc"}]; regiondb2["20"] = [ {value:"140", text:"Deva"},{value:"141", text:"Hunedoara"},{value:"142", text:"Hateg"},{value:"143", text:"Lupeni"},{value:"144", text:"Vulcan"},{value:"145", text:"Uricani"},{value:"146", text:"Petrila"},{value:"147", text:"Orastie"},{value:"148", text:"Calan"},{value:"149", text:"Petrosani"},{value:"150", text:"Simeria"} ]; regiondb2["21"] = [ {value:"151", text:"Slobozia"},{value:"152", text:"Amara"},{value:"153", text:"Fetesti"},{value:"154", text:"Urziceni"},{value:"155", text:"Tandarei"} ]; regiondb2["22"] = [ {value:"156", text:"Iasi"},{value:"157", text:"Targu Frumos"},{value:"158", text:"Harlau"},{value:"159", text:"Pascani"} ]; regiondb2["23"] = [ {value:"160", text:"Buftea"},{value:"161", text:"Otopeni"},{value:"162", text:"Voluntari"},{value:"163", text:"Afumati"} ]; regiondb2["24"] = [ {value:"164", text:"Sighetu Marmatiei"},{value:"165", text:"Ocna Sugatag"},{value:"166", text:"Borsa"},{value:"167", text:"Baia Mare"},{value:"168", text:"Viseu de Sus"},{value:"169", text:"Repedea"},{value:"170", text:"Cavnic"},{value:"171", text:"Baia Sprie"} ]; regiondb2["25"] = [ {value:"172", text:"Drobeta Tr. Severin"},{value:"173", text:"Baia de Arama"},{value:"174", text:"Orsova"},{value:"175", text:"Strehaia"} ]; regiondb2["26"] = [ {value:"176", text:"Sighisoara"},{value:"177", text:"Targu Mures"},{value:"178", text:"Reghin"},{value:"179", text:"Ludus"},{value:"180", text:"Tarnaveni"},{value:"181", text:"Ungheni"},{value:"182", text:"Sovata"} ]; regiondb2["27"] = [ {value:"183", text:"Piatra Neamt"},{value:"184", text:"Roman"},{value:"185", text:"Bicaz"},{value:"186", text:"Izvorul Muntelui"},{value:"187", text:"Humulesti"},{value:"188", text:"Targu Neamt"} ]; regiondb2["28"] = [ {value:"189", text:"Slatina"},{value:"190", text:"Bals"},{value:"191", text:"Draganesti Olt"},{value:"192", text:"Scornicesti"},{value:"193", text:"Caracal"},{value:"194", text:"Corabia"} ]; regiondb2["29"] = [ {value:"195", text:"Ploiesti"},{value:"196", text:"Campina"},{value:"197", text:"Sinaia"},{value:"198", text:"Poiana Tapului"},{value:"199", text:"Cheia"},{value:"200", text:"Slanic Prahova"},{value:"201", text:"Baicoi"},{value:"202", text:"Breaza"},{value:"203", text:"Mizil"},{value:"204", text:"Valenii de munte"},{value:"205", text:"Comarnic"},{value:"206", text:"Azuga"},{value:"207", text:"Busteni"},{value:"208", text:"Urlati"} ]; regiondb2["30"] = [ {value:"209", text:"Satu Mare"},{value:"210", text:"Carei"} ]; regiondb2["31"] = [ {value:"211", text:"Zalau"},{value:"212", text:"Simleul silvaniei"} ]; regiondb2["32"] = [ {value:"213", text:"Sibiu"},{value:"214", text:"Medias"},{value:"215", text:"Rasinari"},{value:"216", text:"Ocna Sibiului"},{value:"217", text:"Cisnadioara"},{value:"218", text:"Cisnadie"},{value:"219", text:"Copsa Mica"} ]; regiondb2["33"] = [ {value:"220", text:"Suceava"},{value:"221", text:"Vama"},{value:"222", text:"Sucevita"},{value:"223", text:"Voronet"},{value:"224", text:"Gura Humorului"},{value:"225", text:"Campulung Moldovenesc"},{value:"226", text:"Radauti"},{value:"227", text:"Frasin"},{value:"228", text:"Vatra Dornei"},{value:"229", text:"Falticeni"} ]; regiondb2["34"] = [ {value:"230", text:"Alexandria"},{value:"231", text:"Videle"},{value:"232", text:"Zimnicea"},{value:"233", text:"Rosiorii de vede"},{value:"234", text:"Turnu Magurele"} ]; regiondb2["35"] = [ {value:"235", text:"Timisoara"},{value:"236", text:"Lugoj"},{value:"237", text:"Faget"} ]; regiondb2["36"] = [ {value:"238", text:"Tulcea"},{value:"239", text:"Babadag"},{value:"240", text:"Sulina"},{value:"241", text:"Macin"} ]; regiondb2["37"] = [ {value:"242", text:"Vaslui"},{value:"243", text:"Barlad"},{value:"244", text:"Husi"} ]; regiondb2["38"] = [ {value:"245", text:"Ramnicu Valcea"},{value:"246", text:"Baile Olanesti"},{value:"247", text:"Calinesti"},{value:"248", text:"Horezu"},{value:"249", text:"Olanesti"},{value:"250", text:"Lespezi"},{value:"251", text:"Caciulata"},{value:"252", text:"Baile Govora"},{value:"253", text:"Calimanesti"},{value:"254", text:"Ocnele Mari"},{value:"255", text:"Voineasa"} ]; regiondb2["39"] = [ {value:"256", text:"Focsani"},{value:"257", text:"Adjud"},{value:"258", text:"Panciu"},{value:"259", text:"Marasesti"},{value:"260", text:"Odobesti"},{value:"261", text:"Lepsa"},{value:"262", text:"Tulnici"} ]; regiondb2["40"] = [ {value:"263", text:"Bucuresti"} ]; regiondb2["41"] = [ {value:"264", text:"Calarasi"},{value:"265", text:"Fundulea"},{value:"266", text:"Lehliu Gara"},{value:"267", text:"Oltenita"} ]; regiondb2["42"] = [ {value:"268", text:"Giurgiu"},{value:"269", text:"Novaci"} ]; function setCities(chooser) { var newElem; var where = (navigator.appName == "Microsoft Internet Explorer") ? -1 : null; var cityChooser = chooser.form.elements["jud"]; while (cityChooser.options.length) { cityChooser.remove(0); } var choice = chooser.options[chooser.selectedIndex].value; var db = regiondb[choice]; newElem = document.createElement("option"); newElem.text = "Alege judetul"; newElem.value = ""; cityChooser.add(newElem, where); if (choice != "") { for (var i = 0; i < db.length; i++) { newElem = document.createElement("option"); newElem.text = db[i].text; newElem.value = db[i].value; cityChooser.add(newElem, where); } } } function setCities2(chooser) { var newElem; var where = (navigator.appName == "Microsoft Internet Explorer") ? -1 : null; var cityChooser = chooser.form.elements["localitate"]; while (cityChooser.options.length) { cityChooser.remove(0); } var choice = chooser.options[chooser.selectedIndex].value; var db = regiondb2[choice]; newElem = document.createElement("option"); newElem.text = "Alege localitatea"; newElem.value = ""; cityChooser.add(newElem, where); if (choice != "") { for (var i = 0; i < db.length; i++) { newElem = document.createElement("option"); newElem.text = db[i].text; newElem.value = db[i].value; cityChooser.add(newElem, where); } } } /********** DOM LEVEL 0 ALTERNATE ********** function setCities(chooser) { var cityChooser = chooser.form.elements["jud"]; // empty previous settings cityChooser.options.length = 0; // get chosen value to act as index to regiondb hash table var choice = chooser.options[chooser.selectedIndex].value; var db = regiondb[choice]; // insert default first item cityChooser.options[0] = new Option("Alege judetul", "", true, false); if (choice != "") { // loop through array of the hash table entry, and populate options for (var i = 0; i < db.length; i++) { cityChooser.options[i + 1] = new Option(db[i].text, db[i].value); } } } **********/