function arrayitem_school(idvalue, textvalue, regionid, provinid) { this.id = idvalue; this.txt = textvalue; this.regionid = regionid; this.provinid = provinid; } function search_school(searchterm, regione, provincia) { var searchschool = new Array(); var result = new Array(); var foundcount = 0; searchschool[0] = new arrayitem_school(106, ' 3° Circolo Didattico Barcellona - P.G.', 15, 158); searchschool[1] = new arrayitem_school(110, 'Attigliano', 18, 194); searchschool[2] = new arrayitem_school(115, 'Barocci', 10, 170); searchschool[3] = new arrayitem_school(79, 'Calvino', 5, 160); searchschool[4] = new arrayitem_school(80, 'Carducci', 5, 160); searchschool[5] = new arrayitem_school(103, 'Circolo Didattico Cutrofiano', 13, 149); searchschool[6] = new arrayitem_school(109, 'De Amicis', 5, 181); searchschool[7] = new arrayitem_school(117, 'Destra Torre', 6, 200); searchschool[8] = new arrayitem_school(114, 'E. Fermi', 10, 154); searchschool[9] = new arrayitem_school(122, 'G. Falcone ', 13, 149); searchschool[10] = new arrayitem_school(93, 'Giacinto Gigante ', 4, 161); searchschool[11] = new arrayitem_school(86, 'Giovanni XXIII', 6, 175); searchschool[12] = new arrayitem_school(104, 'Istituto Comprensivo G. Verdi', 15, 158); searchschool[13] = new arrayitem_school(87, 'Lanfranco', 5, 160); searchschool[14] = new arrayitem_school(116, 'Lelio Orsi ', 5, 181); searchschool[15] = new arrayitem_school(84, 'Levi', 5, 160); searchschool[16] = new arrayitem_school(113, 'Madonna Assunta', 4, 161); searchschool[17] = new arrayitem_school(82, 'Marconi', 5, 160); searchschool[18] = new arrayitem_school(118, 'Oregina - Plesso Aldo Gastaldi', 8, 141); searchschool[19] = new arrayitem_school(53, 'Pergola', 10, 170); searchschool[20] = new arrayitem_school(108, 'Pieve', 5, 181); searchschool[21] = new arrayitem_school(81, 'Piumati - Craveri - Dalla Chiesa', 11, 134); searchschool[22] = new arrayitem_school(85, 'Romualdi', 1, 193); searchschool[23] = new arrayitem_school(144, 'S. Marco dei Cavoti ', 4, 116); searchschool[24] = new arrayitem_school(119, 'S. Marco dei Cavoti', 4, 116); searchschool[25] = new arrayitem_school(83, 'Sola', 5, 160); //alert(searchschool.length); var regexp = eval("/" + searchterm + "/gi"); for (i=0;i= 0) { foundcount++; //result = result + '
  • ' + searchschool[i].txt + '<\/a><\/li>'; result.push(searchschool[i].id); } } } else { if(regione != -1) { if(searchschool[i].regionid == regione) { found = searchschool[i].txt.search(regexp); if(found >= 0) { foundcount++; //result = result + '
  • ' + searchschool[i].txt + '<\/a><\/li>'; result.push(searchschool[i].id); } } } else { found = searchschool[i].txt.search(regexp); if(found >= 0) { foundcount++; //result = result + '
  • ' + searchschool[i].txt + '<\/a><\/li>'; result.push(searchschool[i].id); } } } } //if(foundcount==0) // result = result + '
  • Nessun risultato trovato.<\/li>'; //result = result + '<\/ul>'; return result; }