var autodb = new Object()
autodb["Alfa Romeo"] = [{value:"145", text:"145"},
                      {value:"146", text:"146"},
                      {value:"147", text:"147"},
					  {value:"155", text:"155"},
					  {value:"156", text:"156"},
					  {value:"156 Sport Wagon", text:"157 Sport-Wagon"},
					  {value:"166", text:"166"},
					  {value:"GTV", text:"GTV"},
                	  {value:"Spider", text:"Spider"}];
autodb["Aston Martin"] = [{value:"db9", text:"DB 9"},
	                    {value:"v12", text:"V12"}];
autodb["Audi"] = [{value:"a2", text:"A2"},
                    {value:"a3", text:"A3"},
                    {value:"a4", text:"A4"},
					{value:"a6", text:"A6"},
					{value:"a8", text:"A8"},
					{value:"allroad", text:"Allroad"},
                    {value:"tt", text:"TT"}];
autodb["Bentley"] = [{value:"arnage", text:"Arnage"},
                    {value:"continentalgt", text:"Continental GT"}];
autodb["Bmw"] = [{value:"serie1", text:"Serie1"},
		    		{value:"316", text:"316"},
                    {value:"318", text:"318"},
					{value:"320", text:"320"},
					{value:"323", text:"323"},
                    {value:"324", text:"324"},
					{value:"325", text:"325"},
					{value:"328", text:"328"},
                    {value:"330", text:"330"},
					{value:"518", text:"518"},					
					{value:"520", text:"520"},					
                    {value:"523", text:"523"},
					{value:"524", text:"524"},					
					{value:"525", text:"525"},					
                    {value:"528", text:"528"},
					{value:"530", text:"530"},					
					{value:"535", text:"535"},					
                    {value:"540", text:"540"},
					{value:"545", text:"545"},
					{value:"628", text:"628"},					
					{value:"633", text:"633"},
                    {value:"635", text:"635"},
					{value:"645", text:"645"},
					{value:"725", text:"725"},
                    {value:"728", text:"728"},
					{value:"730", text:"730"},					
					{value:"732", text:"732"},					
                    {value:"735", text:"735"},
					{value:"740", text:"740"},					
					{value:"745", text:"745"},					
                    {value:"750", text:"750"},
					{value:"760", text:"760"},					
					{value:"840", text:"840"},					
                    {value:"850", text:"850"},
					{value:"M1", text:"M1"},
					{value:"M3", text:"M3"},
					{value:"M5", text:"M5"},					
					{value:"z1", text:"Z1"},
					{value:"z3", text:"Z3"},
                    {value:"z4", text:"Z4"},
					{value:"z8", text:"Z8"},
					{value:"x3", text:"X3"},					
					{value:"x5", text:"X5"}];
autodb["Cadillac"] = [{value:"cts", text:"CTS"},
					 {value:"seville", text:"Seville"}, 
                     {value:"xlr", text:"XLR"}];
autodb["Chevrolet"] = [{value:"matiz", text:"Matiz"},
                      	{value:"kalos", text:"Kalos"},
                     	{value:"lacetti", text:"Lacetti"},
						{value:"nubira", text:"Nubira"},
						{value:"evanda", text:"Eanda"},
						{value:"tacuma", text:"Tacuma"}];
autodb["Chrysler"] = [{value:"ptcruise", text:"PT Cruiser"},
                      	{value:"sebring", text:"Sebring"},
                     	{value:"300m", text:"300 M"},
						{value:"crossfire", text:"Crossfire"},
						{value:"voyager", text:"Voyager"}];
autodb["Citroen"] = [{value:"c2", text:"C2"},
                      	{value:"c3", text:"C3"},
                     	{value:"c4", text:"C4"},
						{value:"c5", text:"C 5"},
						{value:"xsarasw", text:"Xsara station wagon"},
						{value:"xsarapicasso", text:"Xsara Picasso"},
						{value:"berlngo", text:"Berlingo"},
						{value:"c8", text:"C 8"}];
autodb["Corvette"] = [{value:"60", text:"6.0 Coupè"}];
autodb["Daihatsu"] = [{value:"cuore", text:"Cuore"},
                      	{value:"sirion", text:"Sirion"},
                     	{value:"copen", text:"Copen"},
		      			{value:"terios", text:"Terios"}];
autodb["Ferrari"] = [{value:"360 spider", text:"360 Spider"},
                      	{value:"f430", text:"F430"},
                     	{value:"575", text:"575M Maranello"},
		        		{value:"612", text:"612 Scaglietti"}];
autodb["Fiat"] = [{value:"seicento", text:"Seicento"},
                      	{value:"panda", text:"Panda"},
                     	{value:"punto", text:"Punto"},
						{value:"idea", text:"Idea"},
						{value:"stilo", text:"Stilo"},
						{value:"barchetta", text:"Barchetta"},
						{value:"doblo", text:"Doblò"},
						{value:"multipla", text:"Multipla"},
						{value:"ulisse", text:"Ulysse"}];
autodb["Ford"] = [{value:"ka", text:"Ka"},
                      	{value:"streetka", text:"Streetka"},
                     	{value:"fiesta", text:"Fiesta"},
						{value:"fusion", text:"Fusion"},
						{value:"focus", text:"Focus"},
						{value:"focuscmax", text:"Focus C-max"},
						{value:"mondeo", text:"Mondeo"},
						{value:"tourneo", text:"Tourneo"},
						{value:"galaxi", text:"Galaxy"},
						{value:"ranger", text:"Ranger"}];
autodb["Honda"] = [{value:"jazz", text:"Jazz"},
                      	{value:"civic", text:"Civic"},
                     	{value:"accord", text:"Accord"},
						{value:"frv", text:"Fr-v"},
						{value:"stream", text:"Stream"},
						{value:"s2000", text:"S 2000"},
						{value:"hrv", text:"HR-V"},
						{value:"crv", text:"CR-V"}];
autodb["Hyundai"] = [{value:"atosprime", text:"Atos Prime"},
                      	{value:"getz", text:"Getz"},
                     	{value:"accent", text:"Accent"},
						{value:"elantra", text:"Elantra"},
						{value:"coupe", text:"Coupè"},
						{value:"sonica", text:"Sonica"},
						{value:"matrix", text:"Matrix"},
						{value:"trajet", text:"Trajet"},
						{value:"tucson", text:"Tucson"},
						{value:"santafe", text:"Santa Fe"},
						{value:"terracan", text:"Terracan"}];
autodb["Jaguar"] = [{value:"xtype", text:"X-Type"},
                      	{value:"stype", text:"S-Type"},
                     	{value:"xj", text:"XJ"},
		        {value:"xk", text:"XK"}];
autodb["Jeep"] = [{value:"wranger", text:"Wrangler"},
                      	{value:"cherokee", text:"Cherokee"},
                     	{value:"gradcherokee", text:"Grand Cherokee"}];
autodb["Kia"] = [{value:"picanto", text:"Picanto"},
                      	{value:"rio", text:"Rio"},
                     	{value:"cerato", text:"Cerato"},
					    {value:"magentis", text:"Magentis"},
					    {value:"opirus", text:"Opirus"},
					    {value:"carens", text:"Carens"},
					    {value:"carnival", text:"Carnival"},
					    {value:"sportage", text:"Sportage"},
					    {value:"sorento", text:"Sorento"}];
autodb["Lamborghini"] = [{value:"gallardo", text:"Gallardo"},
		      		    {value:"murcielago", text:"Murcièlago"}];
autodb["Lancia"] = [{value:"ypsilon", text:"Ypsilon"},
                      	{value:"musa", text:"Musa"},
                     	{value:"lybra", text:"Lybra"},
		      		    {value:"thesis", text:"Thesis"},
		      		    {value:"phedra", text:"Phedra"}];
autodb["Land Rover"] = [{value:"defeder", text:"Defender"},
                      	{value:"freelander", text:"Freelander SW"},
                     	{value:"discovery", text:"Discovery"},
		      		    {value:"rangerover", text:"Range Rover"}];
autodb["Lexus"] = [{value:"is", text:"Is"},
                      	{value:"gs", text:"GS"},
                     	{value:"ls", text:"LS"},
						{value:"sc", text:"SC"},
		      		    {value:"rx", text:"RX"}];
autodb["Lotus"] = [{value:"elise", text:"Elise"}];
autodb["Maserati"] = [{value:"coupe", text:"Coupè"},
                      	{value:"spyder", text:"Spyder"},
                     	{value:"gransport", text:"Grandsport"},
						{value:"quattroporte", text:"Quattroporte"}];
autodb["Maybach"] = [{value:"57", text:"57"},
		      		    {value:"62", text:"62"}];
autodb["Mazda"] = [{value:"mazda2", text:"Mazda2"},
				   		{value:"mazda3", text:"Mazda3"},
						{value:"mazda6", text:"Mazda6"},
						{value:"mx5", text:"MX-5"},
                      	{value:"rx8", text:"RX-8"},
                     	{value:"premacy", text:"Premacy"},
						{value:"mpv", text:"MPV"},
						{value:"tribute", text:"Tribute"},
		      		    {value:"b2500", text:"B2500"}];
autodb["Mercedes"] = [{value:"classea", text:"Classe A"},
				   		{value:"classec", text:"Classe C"},
						{value:"classee", text:"Classe E"},
						{value:"classes", text:"Classe S"},
						{value:"cls", text:"CLS"},
						{value:"cl", text:"CL"},
						{value:"clk", text:"CLK"},
						{value:"sl", text:"SL"},
						{value:"slk", text:"SLK"},
						{value:"v", text:"V"},
						{value:"vaneo", text:"Vaneo"},
						{value:"viano", text:"Viano"},
						{value:"classem", text:"Classe M"},
		      		    {value:"classeg", text:"Classe G"}];
autodb["Mg"] = [{value:"zr", text:"ZR"},
                      	{value:"zs", text:"ZS"},
                     	{value:"zt", text:"ZT"},
						{value:"tf", text:"TF"}];
autodb["Mini"] = [{value:"minione", text:"Mini One"},
                      	{value:"minicooper", text:"Mini Cooper"}];
autodb["Mitsubishi"] = [{value:"colt", text:"Colt"},
				   		{value:"lancer", text:"Lancer"},
						{value:"spacestar", text:"Space Star"},
						{value:"pajero", text:"Pajero"},
                      	{value:"outlander", text:"Outlander"},
                     	{value:"l200", text:"L200"},
						{value:"spacerunner", text:"Space Runner"},
		      		    {value:"eclipse", text:"Eclipse"}];
autodb["Nissan"] = [{value:"micra", text:"Micra"},
				   		{value:"almera", text:"Almera"},
						{value:"mazda6", text:"Mazda6"},
						{value:"primera", text:"Primera"},
                      	{value:"350z", text:"350 Z"},
                     	{value:"murano", text:"Murano"},
						{value:"xtrail", text:"X-Trail"},
						{value:"tribute", text:"Tribute"},
						{value:"terrano", text:"Terrano"},
						{value:"patrol", text:"Patrol"},
		      		    {value:"pickup", text:"Pick up"}];
autodb["Opel"] = [{value:"agila", text:"Agila"},
				   		{value:"corsa", text:"Corsa"},
						{value:"tigra", text:"Tigra"},
						{value:"meriva", text:"Meriva"},
                      	{value:"astra", text:"Astra"},
                     	{value:"speedster", text:"Speedster"},
						{value:"vectra", text:"Vectra"},
						{value:"signum", text:"Signum"},
						{value:"combotour", text:"Combo Tour"},
						{value:"zafira", text:"Zafira"},
						{value:"omega", text:"Omega"},
		      		    {value:"frontera", text:"Frontera"}];
autodb["Peugeot"] = [{value:"106", text:"106"},
					 	{value:"206", text:"206"},
						{value:"306", text:"306"},
				   		{value:"307", text:"307"},
						{value:"406", text:"406"},
						{value:"407", text:"407"},
						{value:"607", text:"607"},
						{value:"806", text:"806"},
                      	{value:"807", text:"807"},
                     	{value:"ranch", text:"Ranch"}];
autodb["Porsche"] = [{value:"boxster", text:"Boxster"},
					 	{value:"carrera", text:"Carrera"},
						{value:"cayenne", text:"Cayenne"}];
autodb["Renault"] = [{value:"twingo", text:"Twingo"},
					 	{value:"clio", text:"Clio"},
						{value:"modus", text:"Modus"},
				   		{value:"megane", text:"Mègane"},
						{value:"laguna", text:"Laguna"},
						{value:"velsatin", text:"Vel Satin"},
						{value:"kangoo", text:"Kangoo"},
						{value:"scenic", text:"Scènic"},
                      	{value:"espace", text:"Espace"}];
autodb["Rover"] = [{value:"25", text:"25"},
					 	{value:"streetwise", text:"Streetwise"},
						{value:"45", text:"45"},
				   		{value:"75", text:"75"},
						{value:"200", text:"200"},
						{value:"407", text:"407"},
						{value:"600", text:"600"}];
autodb["Saab"] = [{value:"9-3", text:"9-3"},
		      		    {value:"9-5", text:"9-5"}];
autodb["Seat"] = [{value:"arosa", text:"arosa"},
					 	{value:"ibiza", text:"Ibiza"},
						{value:"cordoba", text:"Cordoba"},
				   		{value:"leon", text:"Leon"},
						{value:"toledo", text:"Toledo"},
						{value:"altea", text:"Altea"},
						{value:"alhambra", text:"Alhambra"}];
autodb["Skoda"] = [{value:"fabia", text:"Fabia"},
					 	{value:"octavia", text:"Octavia"},
						{value:"superb", text:"Superb"}];
autodb["Smart"] = [{value:"fortwo", text:"Fortwo"},
					 	{value:"forfour", text:"Forfour"},
						{value:"roadster", text:"Roadster"}];
autodb["Ssangyong"] = [{value:"korando", text:"Korando"},
					   	{value:"musso", text:"Musso"},
						{value:"rexton", text:"Rexton"}];
autodb["Subaru"] = [{value:"justy", text:"Justy"},
					 	{value:"impreza", text:"Impreza"},
						{value:"legacy", text:"Legacy"},
				   		{value:"outback", text:"Outback"},
						{value:"forester", text:"Forester"}];
autodb["Suzuki"] = [{value:"alto", text:"Alto"},
					 	{value:"wagonr", text:"Wagon R+"},
						{value:"ignis", text:"Ignis"},
				   		{value:"liana", text:"Liana"},
						{value:"jimny", text:"Jimny"},
						{value:"baleno", text:"Baleno"},
						{value:"grandvitara", text:"Grand Vitara"}];
autodb["Tata"] = [{value:"indica", text:"Indica"},
					 	{value:"indigo", text:"Indigo"},
						{value:"safari", text:"Safari"},
						{value:"pickup", text:"Pick Up"}];
autodb["Toyota"] = [{value:"yaris", text:"Yaris"},
					 	{value:"corolla", text:"Corolla"},
						{value:"prius", text:"Prius"},
				   		{value:"avensis", text:"Avensis"},
						{value:"mr2", text:"MR2"},
						{value:"previa", text:"Previa"},
						{value:"rav4", text:"Rav 4"},
						{value:"landcruiser", text:"Land Cruiser"},
						{value:"hilux", text:"Hilux"}];
autodb["Volkswagen"] = [{value:"lupo", text:"Lupo"},
				   		{value:"polo", text:"Polo"},
						{value:"fox", text:"Fox"},
						{value:"golf", text:"Golf"},
						{value:"newbeetle", text:"New Beetle"},
						{value:"passat", text:"Passat"},
						{value:"bora", text:"Bora"},
						{value:"phaèton", text:"Phaèton"},
						{value:"touran", text:"Touran"},
						{value:"sharan", text:"Sharan"},
						{value:"touareg", text:"Touareg"}];
autodb["Volvo"] = [{value:"s40", text:"S40"},
				   		{value:"s60", text:"S60"},
						{value:"s70", text:"S70"},
						{value:"s80", text:"S80"},
						{value:"c70", text:"C70"},
						{value:"v40", text:"V40"},
						{value:"v50", text:"V50"},
						{value:"v70", text:"V70"},
						{value:"xc70", text:"XC70"},
		      		    {value:"xc90", text:"XC90"}];

function SetModello(chooser) {
    var newElem;
    var where = (navigator.appName == "Microsoft Internet Explorer") ? -1 : null;
    var SceltaModello = chooser.form.elements["modelli"];
    while (SceltaModello.options.length) {
        SceltaModello.remove(0);
    }
    var choice = chooser.options[chooser.selectedIndex].value;
    var db = autodb[choice];
    newElem = document.createElement("option");
    newElem.text = "Seleziona un modello:";
    newElem.value = "";
    SceltaModello.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;
            SceltaModello.add(newElem, where);
        }
    }
}






