var dealersNEW = new Array(); dealersNEW["ALL"] = new Array(); dealersNEW["ALL"]["makes"] = new Array (); dealersNEW["ALL"]["makes"]["BUICK"] = new Array ("","ENCLAVE","LACROSSE","LUCERNE"); dealersNEW["ALL"]["makes"]["CHEVROLET"] = new Array ("","AVALANCHE","AVEO","COBALT","COLORADO","CORVETTE","EQUINOX","G10","HHR","IMPALA","MALIBU","SILVERADO","SUBURBAN","TAHOE","TRAILBLAZER"); dealersNEW["ALL"]["makes"]["GMC"] = new Array ("1500","2500","ACADIA","C1500","CANYON","DENALI AWD","ENVOY","SAVANA","SIERRA","YUKON"); dealersNEW["ALL"]["makes"]["NISSAN"] = new Array ("350Z","ALTIMA","ARMADA","FRONTIER","MAXIMA","MURANO","PATHFINDER","QUEST","ROGUE","SENTRA","TITAN","VERSA","XTERRA"); dealersNEW["ALL"]["makes"]["PONTIAC"] = new Array ("","G5","G6","G8","GRAND PRIX","SOLSTICE","TORRENT","VIBE"); dealersNEW["ALL"]["makes"]["TOYOTA"] = new Array ("","4 RUNNER","AVALON","CAMRY","CAMRY SOLARA","COROLLA","FJ CRUISER","HIGHLANDER","MATRIX","PRIUS","RAV4","RAV4 NEWGENER","SCION","SCION XB","SEQUIOA","SEQUOIA","SIENNA","TACOMA","TUNDRA","YARIS"); function setMakesNEW(formName,dealer) { formName.Make.length = 0; formName.Make.options[0] = new Option("All Makes", "ALL_MAKES", 1, 1); if(dealer) { for (make in dealersNEW[dealer]["makes"]) { formName.Make.options[formName.Make.options.length] = new Option(make,make) } } else { for(dealer in dealersNEW) { for(make in dealersNEW[dealer]["makes"]) { document.searchForm.Make.options[document.searchForm.Make.options.length] = new Option(make,make); } } } } function setModelsNEW(formName,make) { if(make=="ALL_MAKES") { formName.BaseModel.length = 0; formName.BaseModel.options[0] = new Option("All Models", "ALL_MODELS", 1, 1) formName.BaseModel.disabled = true; return; } else { formName.BaseModel.length = 0; formName.BaseModel.options[0] = new Option("All Models", "ALL_MODELS", 1, 1) formName.BaseModel.disabled = false; } for(DealerID in dealersNEW) { if(dealersNEW[DealerID]["makes"][make]) { for (i=0; i< dealersNEW[DealerID]["makes"][make].length; i++) { formName.BaseModel.options[formName.BaseModel.options.length] = new Option(dealersNEW[DealerID]["makes"][make][i],dealersNEW[DealerID]["makes"][make][i]) } } } } function selectLastSearchNEW(formName, myDealer, myMake, myModel) { setMakes(formName, myDealer); var i=0; for(dealer in dealers) { for(make in dealers[dealer]["makes"]) { if(make==myMake) { formName.Make.selectedIndex = i+1; myDealer = dealer; break; } i++; } } setModelsNEW(formName, myMake); if(myMake!="ALL_MAKES") { for(var i=0;i