var thisMake = '';
var thisModel = '';
var currYear = '';

function sendRev(){
if (document.RevForm.modelid.value == '')
    return false;
if (document.RevForm.year.value == '')
    return false;
if (document.RevForm.makeid.value == '')
    return false;
document.RevForm.action='http://research.cars.com/go/crp/research.jsp';
document.RevForm.method='get';
	return true;
}

function submitRev()
{
	if (!sendRev())
	{
		return false;
	}
	if (!getReview())
	{
		return false;
	}
	document.RevForm.submit();
}


var nModelPrevSelected = new Number(0);
var nMakePrevSelected = new Number(0);
var nYearPrevSelected = new Number(0);


function PopulateMakes(listBox, prevSelected)
{
var selectedValue = new String(listBox.options[listBox.selectedIndex].value);
with (document.RevForm)
{
listBox.options[prevSelected].selected = true;
}
}
function PopulateModels(listBox, prevSelected)
{
var selectedValue = new String(listBox.options[listBox.selectedIndex].value);
with (document.RevForm)
{
listBox.options[prevSelected].selected = true;
}
}
function getReview()
{
with (document.RevForm)
{
if(year.options[year.selectedIndex].value == "")
{ 
alert("There are no reports for this Make and Model combination.  Please select a different combination.");
return false;
}

return true;
}
}
function validateYear()
{
with (document.RevForm)
{
if(year.options[year.selectedIndex].value == "")
year.options[nYearPrevSelected].selected = true;
}
}