//pop up menu

function MM_openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);//v2.0  window.open(theURL,winName,features);
  return false;
}

function checkdata(){
	var theMessage = "Please complete the following: \n-----------------------------------\n";
	var noErrors = theMessage
	
	if (document.sample.name.value=="") {
		//alert("Enter your name.");
		theMessage = theMessage + "\n --> Your name";

	}
		if (document.sample.phone.value=="") {
		//alert("Enter  number.");
		theMessage = theMessage + "\n --> Telephone Number";
	}
		if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.sample.email.value)){
		theMessage = theMessage + "\n --> Enter a valid e-mail address";
	}

	
		if (document.sample.address.value=="") {
		//alert("Enter delivery address.");
		theMessage = theMessage + "\n --> Delivery address";
	}
		if (document.sample.postcode.value=="") {
		//alert("Enter the postcode.");
		theMessage = theMessage + "\n --> Postcode";
	}
		if (document.sample.product.value=="") {
		//alert("Enter the sample.");
		theMessage = theMessage + "\n --> Sample";
	}
		if (document.sample.track.value=="") {
		//alert("Enter the sample.");
		theMessage = theMessage + "\n --> How did you hear about us?";
	}
	
		if (!document.sample.agree.checked) {
		//alert("Have you read the terms and conditions?.");
		theMessage = theMessage + "\n --> Have you read the terms and conditions?";
		}
	if (theMessage == noErrors) {
return true;

} else {

alert(theMessage);
return false;
}
}

function validate(){
	var theMessage = "Please complete the following: \n-----------------------------------\n";
	var noErrors = theMessage
	
	if (document.form.name.value=="") {
		//alert("Enter your name.");
		theMessage = theMessage + "\n --> Your name";

	}
		
		if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.form.email.value)){
		theMessage = theMessage + "\n --> A valid e-mail address";
	}

	
		if (document.form.message.value=="") {
		//alert("Enter delivery address.");
		theMessage = theMessage + "\n --> Your message";
	}
		
	if (theMessage == noErrors) {
return true;

} else {

alert(theMessage);
return false;
}
}

function validate_quote(){
	var theMessage = "Please complete the following: \n-----------------------------------\n";
	var noErrors = theMessage
	
	if (document.quote.name.value=="") {
		//alert("Enter your name.");
		theMessage = theMessage + "\n --> Your name";

	}
		if (document.quote.phone.value=="") {
		//alert("Enter  number.");
		theMessage = theMessage + "\n --> Telephone Number";
	}
		if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.quote.email.value)){
		theMessage = theMessage + "\n --> A valid e-mail address";
	}

		if (document.quote.postcode.value=="") {
		//alert("Enter the postcode.");
		theMessage = theMessage + "\n --> Postcode";
	}
		if (document.quote.product.value=="") {
		//alert("Enter the sample.");
		theMessage = theMessage + "\n --> Product";
	}
		if (document.quote.size.value=="") {
		//alert("Enter the sample.");
		theMessage = theMessage + "\n --> Please select size";
	}
	    if (document.quote.quantity.value=="") {
		//alert("Enter the sample.");
		theMessage = theMessage + "\n --> Sqm/Item";
	}
		if (document.quote.track.value=="") {
		//alert("Enter the sample.");
		theMessage = theMessage + "\n --> How did you hear about us?";
	}
	if (!document.quote.agree.checked) {
		//alert("Have you read the terms and conditions?.");
		theMessage = theMessage + "\n --> Have you read the terms and conditions?";
		}
	if (theMessage == noErrors) {
return true;

} else {

alert(theMessage);
return false;
}
}
function go()
{
	box = document.forms[0].list;
	destination = box.options[box.selectedIndex].value;
	if (destination) location.href = destination;
}


/*

function dropvalidate(){
	var theMessage = "Please complete the following: \n-----------------------------------\n";
	var noErrors = theMessage
	
	if (document.quote.size.value=="") {
		//alert("Select a size.");
		theMessage = theMessage + "\n --> Select a size";

	}
	if (document.quote.sqm.value=="") {
		//alert("Select a size.");
		theMessage = theMessage + "\n --> How many sqm/items?";

	}
	if (theMessage == noErrors) {
return true;

} else {

alert(theMessage);
return false;
}
}
function change()
{
	box = document.forms[0].list_product;
	destination = box.options[box.selectedIndex].value;
	if (destination) location.href = destination;
}

*/
	
		