Location.href not working!

Can anyone tell me why the following code is not working please?
The function is called when a user clicks a button.

function goToStock(){
	if (document.getElementById("top_search").value=="used") {
		window.location.replace='http://www.mysite.co.uk/used-cars/';
	}
	else if (document.getElementById("top_search").value=="van") {
		window.location.replace='http://www.mysite.co.uk/used-vans-trucks/';
	} 
	else if (document.getElementById("top_search").value=="bike") {
		window.location.replace='http://www.mysite.co.uk/used-bikes/';
	} 
	else if (document.getElementById("top_search").value=="nearlynew") {
		window.location.replace='http://www.mysite.co.uk/nearly-new-cars/';
	} 
	else if (document.getElementById("top_search").value=="motability") {
		window.location.replace='http://www.mysite.co.uk/motability/';
	} 
}

I’ve been having a look at some other coding and I can get this to work if I put the url into the select option value. Problem is I need to have another value in there to get the rest of the coding to work on the page.
Can anyone tell me how to modify the code below so that I can check to see what value has been selected in the dropdown and then assign a url accordingly?

The code is below. Any help would be greatly appreciated with this.

<script type="text/javascript">
function goTo() {
var sE = null, url;
if(document.getElementById) {
sE = document.getElementById('urlList');
} else if(document.all) {
sE = document.all['urlList'];
}
if(sE && (url = sE.options[sE.selectedIndex].value)) {
location.href = url;
}
}
</script>


<select id="urlList" size="1">
<option value="">Select a link...</option>
<option value="http://www.google.com/">Google</option>
<option value="http://www.mozilla.org/">Mozilla.org</option>
<option value="http://www.opera.com/">Opera.com</option>
</select>
<input type="button" value="Go!" onclick="goTo();">