<script language="JavaScript">
function BuyButtonCategory(productID,catid){var noRows, validchoice;validchoice = true;if (!(document && document.forms[0] &&  document.forms[0].hMVCount)){}else{noRows = document.forms[0].hMVCount.value;}if (!(document && document.forms[0] &&  document.forms[0].hCanBuy)){document.forms[0].action = "productdetail.aspx?pid=" + productID + "&loc=P&add=1&catid=" + catid;	document.forms[0].submit(this);}else{if(document.forms[0].hCanBuy.value == "N"){alert('There is no product available for these options.\n\nPlease choose again.');}else{for(i=0; i < noRows; i++){thisDropDown = "document.forms[0].mv_" + i + "[document.forms[0].mv_" + i + ".selectedIndex].value";thisDropDown = eval(thisDropDown);if(thisDropDown == "none"){validchoice = false;}}	if (validchoice == true){document.forms[0].action = "productdetail.aspx?pid=" + productID + "&loc=P&add=1&catid=" + catid;	document.forms[0].submit(this);}else{alert('Please select your preferred option(s)');}}}}
function MoreDetail(productID,catID){var catpage ="";if (!(document && document.forms[0] &&  document.forms[0].hCatId)){}else{catpage = document.forms[0].hCatId.value;}if(catID == ""){catID = catpage;}document.location.href = "productdetail.aspx?pid=" + productID + "&loc=P&catid=" + catID;}
function SmallBasketRemove(basketid){var rExp = /&/gi;var url = document.location.href;url = url.replace(rExp,"||");document.location.href="basket.aspx?loc=B&a=4&bid=" + basketid  + "&url=" + url ;	}
function MoreFromCategory(productID){document.location.href = "shopping.aspx?catid=" + productID + "&loc=C";}
function ViewRange(categoryID,type){if(type == "cat"){document.location.href = "category.aspx?catid=" + categoryID + "&loc=R";}if(type == "list"){document.location.href = "shopping.aspx?catid=" + categoryID + "&loc=C";}	}
function MM_selected() 
{
	var selected;
	
	selected = document.forms[0].selected_image.value;
	
	if(selected != null && selected != "undefined")
	{
		if (selected == "wired")
		{
			document.forms[0].wired.src = 'images/nav-wired-over.gif';
		}
		else if (selected == "wireless")
		{
			document.forms[0].wireless.src = 'images/nav-wireless-over.gif';
		}
		else if (selected == "whatever")
		{
			document.forms[0].whatever.src = 'images/nav-whatever-over.gif';
		}
		else if (selected == "latest products")
		{
			document.forms[0].latest.src = 'images/nav-latest-over.gif';
		}
		else if (selected == "special offers")
		{
			document.forms[0].special.src = 'images/nav-special-over.gif';
		}
		else if (selected == "buying advice")
		{
			document.forms[0].buying.src = 'images/nav-buying-over.gif';
		}
	}
}
</script>
