function overlay2() { el = document.getElementById("overlay2");el.style.display = (el.style.display == "block") ? "none" : "block";}

function switchBuy(divId){document.getElementById("used").style.display="none";document.getElementById("new").style.display="none";document.getElementById("lease").style.display="none";document.getElementById("research").style.display="none";var div=document.getElementById(divId);div.style.display=(div.style.display=="block"?"none":"block");}


function switchSell(divId){document.getElementById("valuationbig").style.display="none";document.getElementById("sellbig").style.display="none";var div=document.getElementById(divId);div.style.display=(div.style.display=="block"?"none":"block");}


function gotorewrite(){
	var firstURL = document.NewManForm.manufacturer.value;
	var makeURL= "/new-cars/"+firstURL;
	makeURL=makeURL.toLowerCase();
	this.location.href = makeURL;	
}

function gotorewriteUsed(){
	var firstURL = document.UsedManForm.manufacturer.value;
	var makeURL= "/used-cars/"+firstURL;
	makeURL=makeURL.toLowerCase();
	this.location.href = makeURL;
}

function gotorewriteVans(){
	var firstURL = document.UsedManForm.manufacturer.value;
	var makeURL= "/new-used-vans/"+firstURL;
	makeURL=makeURL.toLowerCase();
	this.location.href = makeURL;
}

function gotorewriteFinance(){
	var firstURL = document.LeaseManForm.manufacturer.value;
	var makeURL= "/car-finance/"+firstURL;
	makeURL=makeURL.toLowerCase();
	this.location.href = makeURL;	
}

function gotorewriteResearch(){
	var firstURL = document.ResearchManForm.manufacturer.value;
	var makeURL= "/research-cars/"+firstURL;
	makeURL=makeURL.toLowerCase();
	this.location.href = makeURL;	
}
























