//PHP drop down
	function lookup(KeywordSearch) {
		if(KeywordSearch.length == 0) {
			// Hide the suggestion box.
			$('#suggestions').hide();
		} else {
		if(KeywordSearch.length > 1) {
				$.post("http://www.westenddj.co.uk/general/PageHeader/searchString.asp", {queryString: ""+KeywordSearch+""}, function(data){
					if(data.length > 0) {
						$('#suggestions').show();
						$('#autoSuggestionsList').html(data);
					}
			});
		} // inputlength > 2
		}
	} // lookup
	
	function fill(thisValue) {
//		Don't set field, but send directly to product
//		$('#KeywordSearch').val(thisValue);
//		setTimeout("$('#suggestions').hide();", 200);
		if(thisValue != ''){
			document.location = "http://www.westenddj.co.uk/KeySearch/" + thisValue + "/";
		}
	}

	function hideList() {
		setTimeout("$('#suggestions').hide();", 200);
	}

//Keyword search
function EmptyField()
	{
	if (document.getElementById('KeywordSearch').value == "search")
		document.getElementById('KeywordSearch').value = "";
	}

function FillField()
	{
	if (document.getElementById('KeywordSearch').value == "")
		document.getElementById('KeywordSearch').value = "search";
	}

function SendKeyForm()
	{
		if(document.getElementById('KeywordSearch').value != "search" && document.getElementById('KeywordSearch').value != "")
		{
			var KeyPhrase = document.getElementById('KeywordSearch').value;
//			KeyPhrase = KeyPhrase.replace(' : ','_:_')
//			KeyPhrase = KeyPhrase.replace(' ','_')
			document.location = "http://www.westenddj.co.uk/KeySearch/" + KeyPhrase + "/";
		}
		else
		{
			alert('Please enter a search phrase.')
		}
	}

function AllowEnterKey(e)
{
//	if(!e)
//	{	var e = window.event }
	
	if(e.keyCode)
	{	code = e.keyCode; 	}
	else if(e.which)
	{ 	code = e.which; 	}

	if(code == 13)
	{ 	SendKeyForm(); 	}

}

