function display_div(which, ele){
	if (document.getElementById && document.createTextNode){
		m=document.getElementById(ele);
		trig=m.getElementsByTagName("div").item(which).style.display;
		if (trig=="block") trig="none";
		else if (trig=="" || trig=="none") trig="block";
		m.getElementsByTagName("div").item(which).style.display=trig;
		var	highlighttext="^";
		var	normaltext="+";
		t=m.getElementsByTagName("h3").item(which);
		h=t.getElementsByTagName("a").item(0).firstChild;
		if (trig=="none"){h.nodeValue=h.nodeValue.replace(highlighttext,normaltext);}
		else {h.nodeValue=h.nodeValue.replace(normaltext,highlighttext);}
	}
} 
//-->
function mailMe(name) { //v2.0
var string1 = name;
var string2 = "@";
var string3 = "terramar";
var string4 = ".co.uk";
var string5 = string1 + string2 + string3 + string4;
mailMeWindow=window.open('','name','height=200,width=200');
var tmp = mailMeWindow.document;
tmp.write("<p>");
tmp.write("To send an email to "+ string1 +" using your own mail client click on the link below:");
tmp.write("</p><p>");
tmp.write("<a href=" + "mail" + "to:" + string5 +">" + string5 + "</a>");
tmp.write("</p>");
tmp.close();
}
function colourSwatch(colour) { //v2.0
var string1 = colour;
colourWindow=window.open('','name','height=300,width=200');
var temp = colourWindow.document;
temp.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \n \"http://www.w3.org/TR/html4/loose.dtd\">\n");
temp.write("<html>\n<body>\n<div style=\"text-align:center;\"><p>\n");
temp.write("Colour: "+ string1 +"");
temp.write("</p>\n<p>");
temp.write("<img src=\"http://www.terramar.co.uk/media/productIMG/colourswatches/150/"+string1+".jpg\" alt=\"colour: "+ string1 +"\" />");
temp.write("</p>\n<p><a href=\"javascript:window.close();\">Close This Window</a></p></div>\n");
temp.write("</body>\n</html>\n");
temp.close();
}
function openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function validateNews() {
	if (document.news_subscribe.full_name.value.length < 1) {
		alert("Please complete the name field");
		document.news_subscribe.full_name.focus();
		return false;
	}
	if (document.news_subscribe.email.value.length < 3) {
		alert("Please complete the email field");
		document.news_subscribe.email.focus();
		return false;
	}
	return true;
}
function validateForm() {
	if (document.form_mail_results.full_name.value.length < 1) {
		alert("Please complete the name field");
		document.form_mail_results.full_name.focus();
		return false;
	}
	if (document.form_mail_results.email.value.length < 3) {
		alert("Please complete the email field");
		document.form_mail_results.email.focus();
		return false;
	}
	if (document.form_mail_results.message.value.length < 5) {
		alert("Please add a message");
		document.form_mail_results.message.focus();
		return false;
	}
	return true;
}
function validateRequest() {
	if (document.consumer_catalogue.full_name.value.length < 1) {
		alert("Please complete the name field");
		document.consumer_catalogue.full_name.focus();
		return false;
	}
	if (document.consumer_catalogue.email.value.length < 5) {
		alert("Please complete the email field");
		document.consumer_catalogue.email.focus();
		return false;
	}
	if (document.consumer_catalogue.address_1.value.length < 10) {
		alert("Please add your address");
		document.consumer_catalogue.address_1.focus();
		return false;
	}
	if (document.consumer_catalogue.postcode.value.length < 4) {
		alert("Please add your postcode");
		document.consumer_catalogue.postcode.focus();
		return false;
	}
	return true;
}
<!-- Begin location for category quick jump menu
function place(){
	var picked = document.cat_menu.sel_cat.value;
	var url = 'page/links/';
	location.href=url + picked+'/';
	}
//  End -->
