function RTrim(VALUE){
var w_space = String.fromCharCode(32);
var v_length = VALUE.length;
var strTemp = "";
if(v_length < 0){
return"";
}
var iTemp = v_length -1;

while(iTemp > -1){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(0,iTemp +1);
break;
}
iTemp = iTemp-1;

} //End While
return strTemp;

} //End Function
function valid()
{

	var year = document.searchform.year.value;
	var make = RTrim(document.searchform.make.value);
	MakeOne = make.replace(/\s/g,"-");
	URL = 'http://www.discountacparts.com/selectmodel~year~'+year+'~make~'+MakeOne+'.asp';
	window.location.replace(URL);
	return false;
}
function validsearch()
{

	var year = document.form1.year.value;
	var make = RTrim(document.form1.make.value);
	MakeOne = make.replace(/\s/g,"-");
	URL = 'http://www.discountacparts.com/selectmodel~year~'+year+'~make~'+MakeOne+'.asp';
	window.location.replace(URL);
	return false;
}


