
	function StoreSearch() {
		theKeywordField		= document.getElementById("store_query");
		
		if (theKeywordField.value == "Search the store" || theKeywordField.value == "") {
			theKeywordField.focus();
		
		} else {
			window.document.storeSearchForm.submit();
		}
	}
	
	function ToggleCategory(aCategory) {
		if (aCategory != "") {
			theCategory	= document.getElementById(aCategory + "_heading");
			theList		= document.getElementById(aCategory + "_list");
			theArrow	= document.getElementById(aCategory + "_arrow");
			
			// Results are Visible; hide them
			if (theList.title == "hide") {
			
				HideAnObject(theList);
				theList.title	= "show";
				
				theArrow.title	= "show";
				theArrow.setAttribute("src", "/images/arrows/arrow_right.gif");
			
			// Results are Hidden; show them
			} else {
			
				ShowAnObject(theList);
				theList.title	= "hide";
				
				theArrow.title	= "hide";
				theArrow.setAttribute("src", "/images/arrows/arrow_down.gif");
				
				// Hide all other lists
				theLists	= document.getElementsByTagName("ul");
				
				for (var i = 0; i < theLists.length; i++) {
					if (theLists[i].id) {
						if (theLists[i].id != aCategory + "_list") {
							HideAnObject(theLists[i]);
							theLists[i].title	= "show";
							
							var list = /_list/; // grep pattern to replace "_list" in the theList.id attribute.
							var list_id = theLists[i].id;
							theArrow	= document.getElementById(list_id.replace(list,'') + "_arrow");
							theArrow.title	= "show";
							theArrow.setAttribute("src", "/images/arrows/arrow_right.gif");
						}
					}
				}
			}
		}
	}

