function get_makes() {
   var dropDown = document.atsearch.make;
   selectedIndex = 0;
	dropDown.length = 0;
	for ( index = 0; index < make_d.length; index++ ) {
		dropDown[ index ] = new Option( make_d[ index ], make_v[ index ]);
	}
	dropDown.options[ selectedIndex ].selected = true;
	get_range( _model[0] );
 }

 function get_range( ranges ) {
   selectedIndex = 0;
   var dropDown = document.atsearch.model;
	dropDown.length = 0;
	for ( index = 0; index < ranges.length; index++ ) {
		dropDown[ index ] = new Option( ranges[ index ],ranges[ index ]);
	}
	dropDown.options[ selectedIndex ].selected = true;
 }

// Validate all Motor and Bike AutoTrader Searches

 function checkPrice() {

  var minSelect = document.atsearch.min_pr;
  var maxSelect = document.atsearch.max_pr;
  var pcode=atsearch.POSTCODE.value;
  var minVal = minSelect.options[ minSelect.selectedIndex ].value;
  var maxVal = maxSelect.options[ maxSelect.selectedIndex ].value;

   if (document.atsearch.make.selectedIndex == 0)
    	{
    	alert("Please select a Make of car");
    	document.atsearch.make.focus();
    	return (false);
   }

   if (pcode == ""){
	alert('Please enter a postcode');
	document.atsearch.POSTCODE.focus();
	return false;
   }

   if ( parseInt( maxVal ) < 0 ) {
	return true;
   }

   if ( parseInt( minVal ) > parseInt( maxVal )) {
	alert('You have selected a minimum price which is greater than the maximum price.');
	document.atsearch.min_pr.focus();
	return false;
   }
 }