function checkForm(form, type) {
	if (type) {
		form.submit();
	} else {
		if (form.makeId.selectedIndex == 0) {
			alert("Please choose a make from the list.");
			form.makeId.focus();
		} else {
			form.submit();
		}
	}
}

function checkForm2(form) {
	if (form.co2.selectedIndex == 0) {
		alert("Please choose the CO2 emissions level you wish to search for.");
		form.co2.focus();
	} else if (form.bodyTypeId.selectedIndex == 0) {
		alert("Please choose the body type you wish to search for.");
		form.bodyTypeId.focus();
	} else {
		form.submit();
	}
}

function checkForm3(form) {
	if (form.monthlyFinance.selectedIndex == 0) {
		alert("Please choose the finance amount you wish to search for.");
		form.monthlyFinance.focus();
	} else if (form.bodyTypeId.selectedIndex == 0) {
		alert("Please choose the body type you wish to search for.");
		form.bodyTypeId.focus();
	} else {
		form.submit();
	}
}
