// JavaScript Document

function findlease(frm)
{
	document.frm.cboyearto.value = document.frm.cbofindleaseyear1.value;
	document.frm.cboyear.value = document.frm.cbofindleaseyear.value;
	document.frm.cbomake.value = document.frm.cbofindleasemakeid.value;
	document.frm.cbomodel.value = document.frm.cbofindleasemodelid.value;
	
	document.frm.action = "leasecarlist.php";
	document.frm.submit();	
}

function findbuy(frm)
{
	if((trim(document.frm.txtrange.value) != '' && trim(document.frm.txtrange.value) !=null) && (trim(document.frm.txtzipcode.value) == '' || trim(document.frm.txtzipcode.value )== null ))
	{
		alert("Please enter zipcode to find area range");
		document.frm.txtzipcode.focus();
		return false;
	}

	//document.frm.cboyearto.value = document.frm.cbofindybuyyear1.value;
	//document.frm.cboyear.value = document.frm.cbofindybuyyear.value;
	document.frm.cbomake.value = document.frm.cbofindbuymakeid.value;
	document.frm.cbomodel.value = document.frm.cbofindbuymodelid.value;

	document.frm.action = "carlist.php";
	document.frm.submit();	
}

function exitlease()
{
	document.frm.action = "leasecar1.php";
	document.frm.submit();		
}

function sellcar(a)
{
	var p = "";
	
	if (a == 0)
		p = "login.php";
	else if (a == 3)
		p = "newcar.php";
	else 
		p = "sellcar.php";
		
	
	document.frm.action = p;
	document.frm.submit();		
}
function viewfeaturedauto()
{
	document.frm.radiocartype.value=0;
	document.frm.hdnfeaturedauto.value = "1";
	document.frm.action = "carlist.php";
	document.frm.submit();
}
