// To check if all the fields in the form are correctly filled.
// Validation - Reports if all the fields are filled out correctly

function checksearchbike()
{
 if (testformsearchbike()) return true;
 else return false;	
}		

function testformsearchbike()
{

 var model = document.searchbike.model.selectedIndex;
 if (document.searchbike.model.options[model].value == '')
 {
  alert('Please select the bike make you are searching for');       				
  document.searchbike.model.focus();
  return false;
 }

 var place = document.searchbike.place.selectedIndex;
 if (document.searchbike.place.options[place].value == '')
 {
  alert('Please select the location in which you would like to search');       				
  document.searchbike.place.focus();
  return false;
 }

 var year = document.searchbike.year.selectedIndex;
 if (document.searchbike.year.options[year].value == '')
 {
  alert('Please select the cutoff year of manufacture');       				
  document.searchbike.year.focus();
  return false;
 }
	
 return true;
}

