function returnToTop() {
	window.scrollTo(0,0);
}

function resetList(){
	makeMenu	= document.getElementById("old-make-menu");
	makeMenu.options[makeMenu.selectedIndex].value = 0;
}

function updateModel(){
	makeMenu	= document.getElementById("old-make-menu");
	makeOption	= makeMenu.options[makeMenu.selectedIndex].value;
	makePath	= 'includes/old-vehicle-models.php?make='+makeOption;
	makePath	= makePath.replace("&","%26");
	insertPage(makePath, 'old-reviews-model');

	
	


//	modelMenu	= document.getElementById("old-model-menu");
//	modelOption	= modelMenu.options[1].value;
//	alert(modelMenu.options[1].value);
//	modelOption	= modelOption.replace("&","%26");
//	modelPath	= 'includes/old-vehicle-years.php?make='+makeOption+'&model='+modelOption;
//	insertPage(modelPath, 'old-reviews-year');
	setTimeout("updateYear()", 400);
}

function updateNewModel(){
	makeMenu	= document.getElementById("new-make-menu");
	makeOption	= makeMenu.options[makeMenu.selectedIndex].value;
	makePath	= 'includes/new-vehicle-models.php?make='+makeOption;
	makePath	= makePath.replace("&","%26");
	insertPage(makePath, 'new-reviews-model');
}

function updateYear(){
	makemenu	= document.getElementById("old-make-menu");
	makeoption	= makemenu.options[makemenu.selectedIndex].value;
	makeoption	= makeoption.replace("&","%26");

	modelmenu	= document.getElementById("old-model-menu");
	modeloption	= modelmenu.options[modelmenu.selectedIndex].value;
	modeloption	= modeloption.replace("&","%26");

	if (modeloption == 'null'){
		insertoption	= 'includes/old-vehicle-years.php?make='+makeoption;
	}else{
		insertoption	= 'includes/old-vehicle-years.php?make='+makeoption+'&model='+modeloption;
	}
	insertPage(insertoption, 'old-reviews-year');
}


function submitSearch(){
	makemenu	= document.getElementById("old-make-menu");
	makeoption	= makemenu.options[makemenu.selectedIndex].value;
	makeoption	= makeoption.replace("&","%26");

	modelmenu	= document.getElementById("old-model-menu");
	modeloption	= modelmenu.options[modelmenu.selectedIndex].value;
	modeloption	= modeloption.replace("&","%26");

	yearmenu	= document.getElementById("old-year-menu");
	yearoption	= yearmenu.options[yearmenu.selectedIndex].value;
	yearoption	= yearoption.replace("&","%26");

	insertoption	= 'review-results.html?make='+makeoption+'&model='+modeloption+'&year='+yearoption;
	window.location.replace(insertoption);

}
