mp_category_dropdown Dropdown Bug

using the shortcode: [mp_category_dropdown] produces the following html:

<select name='cat' id='mp_category_dropdown' class='postform' >
	<option class="level-0" value="6">Ford</option>
	<option class="level-0" value="8">Badges</option>
	<option class="level-0" value="9">Holden</option>
	<option class="level-0" value="12">Interior Accessories</option>
	<option class="level-0" value="13">Windows</option>
	<option class="level-0" value="14">Wheels</option>
	<option class="level-0" value="15">Lights</option>
	<option class="level-0" value="16">Exterior Accessories</option>
	<option class="level-0" value="17">Clips</option>
	<option class="level-0" value="18">Rubbers</option>
	<option class="level-0" value="19">Toyota</option>
	<option class="level-0" value="20">Rubbers</option>
	<option class="level-0" value="21">Rubbers</option>
<script type="text/javascript">
/* <![CDATA[ */
	var dropdown = document.getElementById("mp_category_dropdown");
	function onCatChange() {
		if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
			location.href = "<?php echo home_url(); ?>/?product_category="+dropdown.options[dropdown.selectedIndex].value;
	dropdown.onchange = onCatChange;
/* ]]> */

This then produces a drop down list of categories that link through to invalid URLs such as:

As you can see from the above, the PHP is not executing but simply being echoed as part of the URL string.

Could this be that the previously quoted code is invalid? The javascript uses a PHP command to determine the URL but I'm not sure how that can work since the javascript only gets executed at the client side AFTER the PHP has finished being executed.

Whatever the answer, there's definitely seems to be a problem with this code.

Please advise.