
// General Mainly Wine & Whisky functions - developed by estona.com

// Go to href
function go(url){
	document.location.href=url;
}

// Open link in a new window
function nW(thisLink){
	window.open(thisLink.href);
	return false;
}

// Search form checks

function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}

function validate_search(thisform){
	with (thisform){					
		if (srctxt.value==null||srctxt.value==""){
			alert("Please enter some text for the search and try again.");
			srctxt.focus();
			return false;
		}

		if (srctxt.value.length<4){
			alert("Sorry, but your search term needs to be at least 4 characters long.");
			srctxt.focus();
			return false;
		}

		return true;
	}
}