function get_makes(req_make)	{
	var dropDown;
	selectedIndex = 0;

	if (document.qSearch && document.qSearch.make)  {
		dropDown = document.qSearch.make;
	}
	else if(document.search && document.search.make)  {
		dropDown=document.search.make;
	}
	else if (document.forms[0] && document.forms[0].make)  {
		dropDown = document.forms[0].make;
	}

	if (dropDown)  {
			dropDown.length = 0;

			for(index=0; index<make_d.length; index++)	{

				dropDown[index] = new Option(make_d[index],make_v[index]);

				if (make_d[index]=="Make" || make_d[index]=="MAKE")  {
					dropDown[index] = new Option(make_d[index],"");
				  }

				if (make_d[index]=="ANY MAKE")  {
					dropDown[index] = new Option(make_d[index],"ANY");
				  }


				if(make_v[index].toUpperCase() == req_make){
					selectedIndex = index;

				}
			  }
			dropDown.options[selectedIndex].selected = true;
		}
		select_make(req_make);
}

function get_range(ranges,req_model)	{

	selectedIndex = 0;
	var dropDown;

	if (document.qSearch && document.qSearch.model)  {
		dropDown = document.qSearch.model;
	}
	else if(document.search && document.search.model)  {
		dropDown=document.search.model;
	}
	else if (document.forms[0] && document.forms[0].model)  {
		dropDown = document.forms[0].model;
	}

	if (dropDown)  {

		dropDown.length = 0;

		for(index=0; index<ranges.length; index++)	{

			dropDown[index] = new Option(ranges[index],ranges[index]);

			if (ranges[index]=="Model" || ranges[index]=="MODEL")  {
				dropDown[index] = new Option(ranges[index],"");
			  }

			  if (ranges[index]=="ANY MODEL")  {
				dropDown[index] = new Option(ranges[index],"ANY");
			  }

			if(ranges[index].toUpperCase() == req_model){
				selectedIndex = index;
			}
			else if (ranges[index].toUpperCase() == "ANY MODEL" && req_model == "ANY")  {
				selectedIndex = index;
			}
		}
		dropDown.options[selectedIndex].selected = true;
	}
}

function select_make(req_make)  {
	var dropDown;

	if (req_make == null)  {
		req_make="";
	}

	if (document.qSearch && document.qSearch.make)  {
		dropDown = document.qSearch.make;
	}
	else if(document.search && document.search.make)  {
		dropDown=document.search.make;
	}
	else if (document.forms[0] && document.forms[0].make)  {
		dropDown = document.forms[0].make;
	}

	if (dropDown)  {
		for (x=0; x<dropDown.length; x++)  {
			mk=dropDown.options[x].value;
			if ( mk.toUpperCase()==req_make)  {
				if (dropDown.options[x].selected==false)   {
					dropDown.options[x].selected=true;
				}
			}
		}
	}
}

