<!--

// -------------------------------------
// Andrew Scott - 03/02/06
// -------------------------------------
//	function to control Nav
// -------------------------------------

function showNav(navID,linkName){

	var navID = document.getElementById(navID);
	var linkName = document.getElementById(linkName);
	
	// get an Array of all Nav IDs used
	var navArray = new Array(new Array('balls','button0'),
		new Array('protection','button1'),
		new Array("accessories","button2"),
		new Array("bags","button3")
	);
		var i=0; 
		
		// This gets the current Class of the selected Nav. This is to work out whether to close the menu or open it
		var currentState = navID.className;
		
		// Firstly, close all navs - we will then determine what to do
		for (i=0; i<4; i++) { 
			// if the array nav to change is the same as the one which has been clicked then don't do this bit
			
			if(navArray[i][0]!=navID){
				document.getElementById(navArray[i][0]).className = 'hidden';
				document.getElementById(navArray[i][1]).className = '';
			}
		} 
	// if the nav class is 'display (i.e. it is open) then set it to 'hidden' (i.e. closed)
		if (currentState == 'display'){
			navID.className = 'hidden';
			linkName.className = 'a';
		}else{
			navID.className = 'display';
			linkName.className = 'currentItem';
		}
}
	function checkSearch(){
	txtKeywordAd = document.fmSearch.txtKeywordAd
	
	
	if (txtKeywordAd.value == "" || txtKeywordAd.value == "Product Search"){
		alert("Please enter a search term")
		return(false);
	}else{
		document.fmSearch.submit();	
	}
}

//-->
