var insideDelete=0; var searches=0; var alls=0; var make=""; var model=""; count=0; countM=0; boxCount=1; function fb(f) { if (f.vehicle.length == 1 && f.vehicle[0].value == '') { return true; } return false; } function setMake(){ //addMM(); if (document.inventory_form.make){ //alert("setMake1->make" + make) document.inventory_form.feature_includes_make.value=make;} if (document.inventory_form.model){ //alert("setMake2->bang!!" + model) if(model==",") { model=""; } document.inventory_form.fmodel.value=model; if (searches == alls){ document.inventory_form.fmodel.value=""; } } document.inventory_form.make.value=""; document.inventory_form.model.value=""; document.inventory_form.vehicle.value=""; } /** *This function returns all vehicle models for the make *identified by the make index. *@param makeIndex -> the index of the appropriate make *@return mdAllMod all the models. */ function getAllModels(makeIndex){ var numModels = Makesv[makeIndex].length; var mdAllMod = ""; for(i = 0; i < numModels; i++){ //alert("bang!!!"); mdAllMod = mdAllMod + "," + Makesv[makeIndex][i]; } return mdAllMod; } function set_models(Num) { document.inventory_form.fmodel.length=0; var i; document.inventory_form.fmodel.options[document.inventory_form.fmodel.length] = new Option("Select a Model",""); var model_all = 0; if(Num > 0) { for(i in Makes[Num]) { if(Makes[Num][i] == 'All') { model_all = 1; } document.inventory_form.fmodel.options[document.inventory_form.fmodel.length] = new Option(Makes[Num][i],Makesv[Num][i]); } var lcnt; if(model_all == 1) { lcnt = Makes[Num].length+1; } else { lcnt = Makes[Num].length; } document.inventory_form.fmodel.selectedIndex = 0; document.inventory_form.fmodel.length = lcnt; } } function set_modelsAS(Num) { document.inventory_form.model.length=0; var i; document.inventory_form.model.options[document.inventory_form.model.length] = new Option("Select a Model",""); var model_all = 0; if(Num > 0) { for(i in Makes[Num]) { if(Makes[Num][i] == 'All') { model_all = 1; } document.inventory_form.model.options[document.inventory_form.model.length] = new Option(Makes[Num][i],Makesv[Num][i]); } var lcnt; if(model_all == 1) { lcnt = Makes[Num].length+1; } else { lcnt = Makes[Num].length; } document.inventory_form.model.selectedIndex = 0; document.inventory_form.model.length = lcnt; } } function getModelLength(f){ return f.fmodel.value.length; } function changeSubMethod(f){ if (getModelLength(f) >= 2050){ f.method="post"; return; } return; } function build_makesAS(f) { f.make.length=0; f.make.options[0] = new Option("Select a Make",""); for (i=1; i= 6) { alert("6 is the maximum number to search for."); return; } } } // check for duplicates j=0; for(i = 0; i