function buycheck(product,formname) {
if (document.buy.option.value == '') {
alert('please what type of ' + product + ' you wish to buy');
} else {
document.buy.submit();
}
}
var answer;
function quantity(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function delcheck(deltype,url) 
{ 
answer = confirm("You have selected "+deltype+"\n Is this correct?")
if (answer !=0) 
{ 
location = url; 
} 
}
function detailaddress () {
}
function popup2(url,width,height)
{
	newwindow=window.open(url,'name','height='+height+',width='+width+',scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}
function checkform()
{
	if(!document.details.name.value) {
		alert ("Please fill in your name");
		document.details.name.focus()
		return false;
	} else if(!document.details.email.value) {
		alert ("Please fill in your email address");
		document.details.email.focus()
		return false;
	} else if(!document.details.address1.value) {
		alert ("Please fill in your address");
		document.details.address1.focus()
		return false;
	} else if(!document.details.city.value) {
		alert ("Please fill in your city");
		document.details.city.focus()
		return false;
	} else if(!document.details.country.value) {
		alert ("Please select a country");
		return false;
	} else if(!document.details.postcode.value) {
		alert ("Please fill in your postcode");
		document.details.postcode.focus()
		return false;
	} else { 
	return true;
	}
	return false;
}
var xmlhttp=false; 
/*@cc_on @*/ 
/*@if (@_jscript_version >= 5) 
// JScript gives us Conditional compilation, we can cope with old IE versions. 
// and security blocked creation of the objects. 
  try { 
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
  } catch (e) { 
   try { 
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
   } catch (E) { 
    xmlhttp = false; 
   } 
  } 
@end @*/ 
if (!xmlhttp && typeof XMLHttpRequest!='undefined') { 
  xmlhttp = new XMLHttpRequest(); 
} 
function quickadd(prod,sp,cat_num) {
		day = new Date();
	id = day.getTime();
	var url = "includes/quickadd.php?cartnum="+cat_num+"&prodnum="+prod+"&time="+id;
	
		 xmlhttp.open("GET", url); 
    xmlhttp.onreadystatechange = function() { 
      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 
	   if (!xmlhttp.responseText) {
		document.getElementById(sp).innerHTML = "<a href=\"cart.php\" style=\"text-transform:none; color:#333333;\">Added to Cart</a>";
	  } else {
		  alert (xmlhttp.responseText) }
	}	 
	}
    xmlhttp.send(null);

}
function subform1() {
	document.step1.action = "detailcollect.php?fp=1";
	var emailfilter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

		if (!document.getElementById("got_email").value) {
			alert ("Please enter an email address");
			document.getElementById("got_email").focus();
			return false;
		} else if (!emailfilter.test(document.getElementById("got_email").value)) {
		alert ("Please enter a valid email address");
		document.getElementById("got_email").focus();
		return false;
			} else {
				
			document.step1.submit();
		}
		return false;	
}
function subform2() {
	document.step1.action = "detailcollect.php?si=1";
		var emailfilter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (!document.getElementById("got_email").value) {
			alert ("Please enter an email address");
			document.getElementById("got_email").focus();
			return false;
		} else if (!emailfilter.test(document.getElementById("got_email").value) && document.getElementById("got_email").value != "admin") {
		alert ("Please enter a valid email address");
		document.getElementById("got_email").focus();
		return false;
			}else if (!document.getElementById("got_password").value) {
			alert ("Please enter an password");
			document.getElementById("got_password").focus();
			return false;
		} else{
			document.step1.submit();
		}
		
	
}
function subform3() {
	document.step1.action = "detailcollect.php?su=1";
		var emailfilter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (!document.getElementById("new_email").value) {
			alert ("Please enter an email address");
			document.getElementById("new_email").focus();
			return false;
		} else if (!emailfilter.test(document.getElementById("new_email").value)) {
		alert ("Please enter a valid email address");
		document.getElementById("new_email").focus();
		return false;
		}  else if (!document.getElementById("new_fname").value) {
			alert ("Please enter a First Name");
			document.getElementById("new_fname").focus();
			return false;
		} else if (!document.getElementById("new_lname").value) {
			alert ("Please enter a Last Name");
			document.getElementById("new_lname").focus();
			return false;
		} else if (!document.getElementById("new_tel").value) {
			alert ("Please enter a Phone Number");
			document.getElementById("new_tel").focus();
			return false;
		} else if (!document.getElementById("new_pass").value) {
			alert ("Please enter a Password");
			document.getElementById("new_pass").focus();
			return false;
		}  else if (document.getElementById("new_pass").value.length <= 5) {
			alert ("Please enter a password 6 characters or more");
			document.getElementById("new_pass").focus();
			return false;
		} else if (document.getElementById("new_pass").value != document.getElementById("new_confirm").value) {
			alert ("The password does not match the confirmed password");
			document.getElementById("new_pass").focus();
			return false;
		} else if (!document.getElementById("street").value) {
			alert ("Please enter a house number and street name");
			document.getElementById("street").focus();
			return false;
		} else if (!document.getElementById("town").value) {
			alert ("Please enter a town");
			document.getElementById("town").focus();
			return false;
		} else if (!document.getElementById("postcode").value) {
			alert ("Please enter a Postcode");
			document.getElementById("postcode").focus();
			return false;
		}  else if (document.getElementById("street").value.length <= 5) {
		alert ("Please enter a street number and street name over 5 characters");
		document.getElementById("street").focus();
		return false;
	} else {
			document.step1.submit();
		}
}
function subform3a() {
	document.step1.action = "detailcollect-admin.php?su=1";
	document.step1.submit();
}
function subform5() {
	document.step1.action = "customer.php?si=1";
	submain2();
}
function subform6() {
	document.step1.action = "customer.php?fp=1";
	submain2();
}
function subform7() {

		 if (document.getElementById("pass").value.length <= 5 && document.getElementById("pass").value) {
			alert ("Please enter a password 6 characters or more");
			document.getElementById("pass").focus();
			return false;
		} else if (document.getElementById("pass").value != document.getElementById("new_confirm").value && document.getElementById("pass").value) {
			alert ("The password does not match the confirmed password");
			document.getElementById("pass").focus();
			return false;
		} else { return true;}
}
function submain1() {
		var emailfilter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (document.step1.action == "detailcollect.php?fp=1" || document.step1.action == "http://www.scotkilts.co.uk/detailcollect.php?fp=1") {
		if (!document.getElementById("got_email").value) {
			alert ("Please enter an email address");
			document.getElementById("got_email").focus();
			return false;
		} else if (!emailfilter.test(document.getElementById("got_email").value)) {
		alert ("Please enter a valid email address");
		document.getElementById("got_email").focus();
		return false;
			} else {
				
			document.step1.submit();
		}
		return false;	
	} else if (document.step1.action == "detailcollect.php?si=1" || document.step1.action == "http://www.scotkilts.co.uk/detailcollect.php?si=1") {
		if (!document.step1.got_email.value) {
			alert ("Please enter an email address");
			document.step1.got_email.focus();
			return false;
		} else if (!emailfilter.test(document.step1.got_email.value) && document.step1.got_email.value != "admin") {
		alert ("Please enter a valid email address");
		document.step1.got_email.focus();
		return false;
			}else if (!document.step1.got_password.value) {
			alert ("Please enter an password");
			document.step1.got_password.focus();
			return false;
		} else{
			document.step1.submit();
		}
		
	} else if (document.step1.action == "detailcollect.php?su=1" || document.step1.action == "http://www.scotkilts.co.uk/detailcollect.php?su=1") {
		if (!document.step1.new_email.value) {
			alert ("Please enter an email address");
			document.step1.new_email.focus();
			return false;
		} else if (!emailfilter.test(document.step1.new_email.value)) {
		alert ("Please enter a valid email address");
		document.step1.new_email.focus();
		return false;
			}else if (!document.step1.new_fname.value) {
			alert ("Please enter a First Name");
			document.step1.new_fname.focus();
			return false;
		} else if (!document.step1.new_lname.value) {
			alert ("Please enter a Last Name");
			document.step1.new_lname.focus();
			return false;
		} else if (!document.step1.new_tel.value) {
			alert ("Please enter a Phone Number");
			document.step1.new_tel.focus();
			return false;
		} else if (!document.step1.new_pass.value) {
			alert ("Please enter a Password");
			document.step1.new_pass.focus();
			return false;
		}  else if (document.step1.new_pass.value.length <= 5) {
			alert ("Please enter a password 6 characters or more");
			document.step1.new_pass.focus();
			return false;
		} else if (document.step1.new_pass.value != document.step1.new_confirm.value) {
			alert ("The password does not match the confirmed password");
			document.step1.new_pass.focus();
			return false;
		} else {
			document.step1.submit();
		}
	} else {
		return false;
	}
	return false;
}
function submain2() {
		var emailfilter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (document.step1.action == "customer.php?fp=1" || document.step1.action == "http://www.scotkilts.co.uk/customer.php?fp=1") {
		if (!document.step1.got_email.value) {
			alert ("Please enter an email address");
			document.step1.got_email.focus();
			return false;
		} else if (!emailfilter.test(document.step1.got_email.value)) {
		alert ("Please enter a valid email address");
		document.step1.got_email.focus();
		return false;
			} else {
			document.step1.submit();
		}
		return false;	
	} else if (document.step1.action == "customer.php?si=1") {
		if (!document.step1.got_email.value) {
			alert ("Please enter an email address");
			document.step1.got_email.focus();
			return false;
		} else if (!emailfilter.test(document.step1.got_email.value) && document.step1.got_email.value != "admin") {
		alert ("Please enter a valid email address");
		document.step1.got_email.focus();
		return false;
			}else if (!document.step1.got_password.value) {
			alert ("Please enter an password");
			document.step1.got_password.focus();
			return false;
		} else{
			document.step1.submit();
		}
		
	} else {
		return false;
	}
	return false;
}
function subbill() {
	if (!document.bill.street.value) {
		alert ("Please enter a House Number & Street");
		document.bill.street.focus();
		return false;
	} else if (!document.bill.town.value) {
		alert ("Please enter a Town");
		document.bill.town.focus();
		return false;
	} else if (!document.bill.county.value) {
		alert ("Please enter a County");
		document.bill.county.focus();
		return false;
	} else if (!document.bill.postcode.value) {
		alert ("Please enter a Postcode");
		document.bill.postcode.focus();
		return false;
	} else {
		return true;
	}
}
function subdel() {

	if (!document.del.street2.value) {
		alert ("Please enter a House Number & Street");
		document.del.street2.focus();
		return false;
	} else if (!document.del.town2.value) {
		alert ("Please enter a Town");
		document.del.town2.focus();
		return false;
	} else if (!document.del.county2.value) {
		alert ("Please enter a County");
		document.del.county.focus();
		return false;
	} else if (!document.del.postcode2.value) {
		alert ("Please enter a Postcode");
		document.del.postcode2.focus();
		return false;
	}   else {
		return true;
	} return false;
}
var newwindow;
function popimage(url, height, width,scrollbars) {
	if (scrollbars == 1) {
		var scrollba = "yes";
	} else {
		var scrollba = "no";
	}
	newWindow = window.open(url,'name','height=' + height + ',width=' + width + ',scrollbars='+scrollba);
}
function popUp(URL) {
day = new Date();
id = day.getTime();
page = window.open(URL, 'search', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=575,height=400,left = 390,top = 312');
}



function popUpInv(form) {
		form.action = "https://www.vn2group.co.uk/invoices/order-invoice.php";
		form.target = "newpopup";
openTarget(form, 'width=570,height=400,resizable=1,scrollbars=1');
	form.submit();
	}

function openTarget (form, features, windowName) {
  if (!windowName) {
    windowName = 'invoice' + (new Date().getTime());
  }
  form.target = windowName;
  open ('', windowName, features);
}








var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
if (checkIt('msie')) {
if (detect.charAt(place + thestring.length) != 7) {
	document.write('<link href="explorer.css" rel="stylesheet" type="text/css">');
}}
function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
function loadmaps() {
document.getElementById("imagemaps").innerHTML = '<map name="Map" id="Map">  <area shape="rect" coords="116,8,130,151" href="javascript:noaction()" onmouseover="frontchange(\'1\',\'2\')"/><area shape="rect" coords="85,9,108,147" href="javascript:noaction()" onmouseover="frontchange(\'1\',\'3\')" /><area shape="rect" coords="57,14,77,148" href="javascript:noaction()" onmouseover="frontchange(\'1\',\'4\')" /><area shape="rect" coords="25,14,48,143" href="javascript:noaction()" onmouseover="frontchange(\'1\',\'5\')" /><area shape="rect" coords="129,1,208,158" href="christmas-impressions.html" /></map><map name="Map2" id="Map2">  <area shape="rect" coords="146,8,170,150" href="javascript:noaction()" onmouseover="frontchange(\'2\',\'1\')" /><area shape="rect" coords="83,15,99,138" href="javascript:noaction()" onmouseover="frontchange(\'2\',\'3\')" /><area shape="rect" coords="56,18,77,137" href="javascript:noaction()" onmouseover="frontchange(\'2\',\'3\')" /><area shape="rect" coords="24,19,50,134" href="javascript:noaction()" onmouseover="frontchange(\'2\',\'4\')" /><area shape="rect" coords="97,3,144,153" href="cool-yule-christmas-collection.html" /></map><map name="Map3" id="Map3">  <area shape="rect" coords="144,8,173,151" href="javascript:noaction()" onmouseover="frontchange(\'3\',\'1\')" /><area shape="rect" coords="114,10,140,145" href="javascript:noaction()" onmouseover="frontchange(\'3\',\'2\')" /><area shape="rect" coords="54,17,68,136" href="javascript:noaction()" onmouseover="frontchange(\'3\',\'4\')" /><area shape="rect" coords="23,20,49,131" href="javascript:noaction()" onmouseover="frontchange(\'3\',\'5\')" /><area shape="rect" coords="68,6,113,147" href="traditional-greetings-christmas-cards.html" /></map><map name="Map4" id="Map4">  <area shape="rect" coords="144,9,173,154" href="javascript:noaction()" onmouseover="frontchange(\'4\',\'1\')" /><area shape="rect" coords="115,9,141,148" href="javascript:noaction()" onmouseover="frontchange(\'4\',\'2\')" /><area shape="rect" coords="83,14,111,145" href="javascript:noaction()" onmouseover="frontchange(\'4\',\'3\')" /><area shape="rect" coords="24,20,37,133" href="javascript:noaction()" onmouseover="frontchange(\'4\',\'5\')" /><area shape="rect" coords="40,9,80,147" href="help-christmas-cards.html" /></map><map name="Map5" id="Map5">  <area shape="rect" coords="55,17,78,138" href="javascript:noaction()" onmouseover="frontchange(\'5\',\'4\')" /><area shape="rect" coords="83,13,110,142" href="javascript:noaction()" onmouseover="frontchange(\'5\',\'3\')" /><area shape="rect" coords="114,11,141,144" href="javascript:noaction()" onmouseover="frontchange(\'5\',\'2\')" /><area shape="rect" coords="145,7,170,150" href="javascript:noaction()" onmouseover="frontchange(\'5\',\'1\')" /><area shape="rect" coords="9,11,51,138" href="noel-christmas-card-collection.html" /></map>';
}
function getcol() {

	if (document.getElementById("collection")) {	
	if (document.getElementById("frontbooks")) {
loadmaps();
document.getElementById("col").style.height="200px";
document.getElementById("book2").style.display="none";
document.getElementById("book3").style.display="none";
document.getElementById("book4").style.display="none";
document.getElementById("book5").style.display="none";
document.getElementById("text2").style.display="none";
document.getElementById("text3").style.display="none";
document.getElementById("text4").style.display="none";
document.getElementById("text5").style.display="none";
document.getElementById("cover2").style.display="none";
document.getElementById("cover3").style.display="none";
document.getElementById("cover4").style.display="none";
document.getElementById("cover5").style.display="none";
	}
document.getElementById("tempdiv").style.display="none";

document.getElementById("col").innerHTML = document.getElementById("collection").innerHTML;

document.getElementById("col").style.display="block";
	} 

	}
	
window.onload=function(){getcol(); if (document.getElementById("delview")) { fullViewMenu('delview'); } };	
function clearloginemail() {
	if (document.quicksignin.got_email.value == "Email Address") {
		document.quicksignin.got_email.value = "";
		document.quicksignin.got_email.focus();
	}
}
function clearloginpassword() {
document.getElementById("loginpass").innerHTML = "<input name=\"got_password\" type=\"password\" style=\"width:150px; font-size:11px;\">";
//document.getElementById("rightpass").focus();
document.quicksignin.got_password.focus();
document.quicksignin.got_password.select();
}


	
function frontchange(fromold,tonew) {
document.getElementById("book"+fromold).style.display="none";
document.getElementById("text"+fromold).style.display="none";
document.getElementById("cover"+fromold).style.display="none";
document.getElementById("book"+tonew).style.display="block";
document.getElementById("text"+tonew).style.display="block";
document.getElementById("cover"+tonew).style.display="block";
	}
	function checksearch() {
		if (!document.getElementById("search").value) {
			alert ("Please enter a search keyword");
			return false;
		} else if(document.getElementById("search").value.length <= 2) {
			alert ("Please enter at least 3 characters");
			return false;
		}else {return true;}
		return false;
	}
	function expandfilter() {
	if (document.getElementById("f1").style.display == "" || document.getElementById("f1").style.display == "none") {
		document.getElementById("f1").style.display = "block";
		document.getElementById("exprem").innerHTML = "not send feedback to us on this product.";
	} else {
		document.getElementById("f1").style.display = "none";
		document.getElementById("exprem").innerHTML = "send feedback to us on this product.";
	}
}
function frontchange(fromold,tonew) {
document.getElementById("book"+fromold).style.display="none";
document.getElementById("text"+fromold).style.display="none";
document.getElementById("cover"+fromold).style.display="none";
document.getElementById("book"+tonew).style.display="block";
document.getElementById("text"+tonew).style.display="block";
document.getElementById("cover"+tonew).style.display="block";
	}

	function chekforoptions() {
	if (!document.buyform.option.value) {
		alert ("Please Select a Product Option");
		return false;
	} else {
		return true;
	}
	return false;
}
			function fullViewMenu(id, right, force)
{
	// Does the browser need this hack?
	var browserNeedsHack =
	(
		(navigator.platform == 'Win32')
		&&
		(
			(navigator.appName == 'Microsoft Internet Explorer')
			||
			(navigator.userAgent.toLowerCase().indexOf('opera') >= 0)
		)
	);
	
	// Is this a browser that can't handle this hack?
	var browserCantHandleHack =
	(
		(navigator.platform.indexOf('Mac') >= 0)
		&&
		(
			(navigator.appName == 'Microsoft Internet Explorer')
			||
			(navigator.userAgent.toLowerCase().indexOf('camino') >= 0)
		)
	);
	
	// Should we in fact proceed with the hack?
	var proceed = 
	(
		// proceed if either (a) the browser needs the 
		// hack, or (b) we don't care whether it needs it...
		(browserNeedsHack || force)
		&&
		// but not if we know the browser can't handle it.
		(!browserCantHandleHack)
	);
	
	// decide f'real
	if (!proceed)
	{
		return;
	}
	
	// Get the container and the select menu
	var container = document.getElementById(id);
	var select = container.getElementsByTagName("select");
	if (select.length == 0)
	{
		// Why are there are no select menus in the container?  Are you nuts?!
		return;
	}
	// OK, got it.
	select = select[0];
	
	// Shortcuts to their respective styles
	var c = container.style;
	var s = select.style;
	var big = c.width;
	var small = s.width;
	var z = c.zIndex;
	
	// set up the container
	c.position = "relative";
	c.top = "0px";
	c[right?"right":"left"] = "0px";
	c.width = small;
	c.height = s.height;
	
	// set up the menu
	s.position = "absolute";
	s.top = "0px";
	s[right?"right":"left"] = "0px";
	
	// runtime stuff:
	
	var hasFocus = false;
	var enable = true;
	var lastEnlarge = 0;
	
	function enlarge()
	{
		if (enable)
		{
			s.width = big;
			c.zIndex = 5000;
			
			// stamp this as the most recent time the menu was enlarged
			lastEnlarge = (new Date()).getTime();
		}
	}
	
	function shrink()
	{
		var span = (new Date()).getTime() - lastEnlarge;
	
		if (enable)
		{
			s.width = small;
			c.zIndex = z;
	
			// if we're re-shrinking the menu amost immediately
			// after enlarging it, assume that we've got the sizes 
			// backwards (the menu would naturally be smaller than 
			// it is), so disable the shrinking/expanding for a little while
			if (span < 20)
			{
				enable = false;
			}
		}
		// just in case it was disabled by accident (by the mouse 
		// passing over it momentarily), re-enable it after another 
		// short period of time.
		else if (span > 250)
		{
			enable = true;
		}
	}

	select.onfocus = function()
	{
		hasFocus = true;
		enlarge();
	};
	select.onblur = function()
	{
		hasFocus = false;
		shrink();
	};
	select.onmouseover = function()
	{
		enlarge();
	};
	select.onmouseout = function()
	{
		if (!hasFocus)
		{
			shrink();
		}
	};
	
} // fullViewMenu	  
	  function subform33() {
	document.step1.action = "register.php?su=1";
		var emailfilter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (!document.getElementById("new_email").value) {
			alert ("Please enter an email address");
			document.getElementById("new_email").focus();
			return false;
		} else if (!emailfilter.test(document.getElementById("new_email").value)) {
		alert ("Please enter a valid email address");
		document.getElementById("new_email").focus();
		return false;
			}else if (!document.getElementById("new_fname").value) {
			alert ("Please enter a First Name");
			document.getElementById("new_fname").focus();
			return false;
		} else if (!document.getElementById("new_lname").value) {
			alert ("Please enter a Last Name");
			document.getElementById("new_lname").focus();
			return false;
		} else if (!document.getElementById("new_tel").value) {
			alert ("Please enter a Phone Number");
			document.getElementById("new_tel").focus();
			return false;
		} else if (!document.getElementById("new_pass").value) {
			alert ("Please enter a Password");
			document.getElementById("new_pass").focus();
			return false;
		}  else if (document.getElementById("new_pass").value.length <= 5) {
			alert ("Please enter a password 6 characters or more");
			document.getElementById("new_pass").focus();
			return false;
		} else if (document.getElementById("new_pass").value != document.getElementById("new_confirm").value) {
			alert ("The password does not match the confirmed password");
			document.getElementById("new_pass").focus();
			return false;
		}	else {
			document.step1.submit();
		}
}

function checkwedform() {
var emailfilter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
var datefilter  = /^[0-9][0-9]\/[0-9][0-9]\/[0-9][0-9][0-9][0-9]$/;
	if (!document.listsignup.list_bname.value) {
		alert("Please enter the Bride's name");
		document.listsignup.list_bname.focus();
		return false;
	}
	else if (!document.listsignup.list_gname.value) {
		alert("Please enter the Groom's name");
		document.listsignup.list_gname.focus();
		return false;
	}
	else if (document.listsignup.list_date.value=="dd/mm/yyy" || !document.listsignup.list_date.value) {
		alert("Please enter the Groom's name");
		document.listsignup.list_gname.focus();
		return false;
	}
	else if (!document.listsignup.list_email.value) {
			alert ("Please enter an email address");
			document.listsignup.list_email.focus();
			return false;
	}
	else if (!emailfilter.test(document.listsignup.list_email.value)) {
		alert ("Please enter a valid email address");
		document.listsignup.list_email.focus();
		return false;
		}
	else if (!document.listsignup.list_pass.value) {
			alert ("Please enter a password");
			document.listsignup.list_pass.focus();
			return false;
	}
	else if (document.listsignup.list_date.value=="dd/mm/yyy" && !document.listsignup.list_date.value) {
		alert("Please enter the wedding date");
		document.listsignup.list_date.focus();
		return false;
		}
	else if (!datefilter.test(document.listsignup.list_date.value)) {
		alert ("Please enter a wedding date");
		document.listsignup.list_date.focus();
		return false;
		}
	else if (document.listsignup.list_pass.value.length <= 5 && document.listsignup.list_pass.value) {
			alert ("Please enter a password 6 characters or more");
			document.listsignup.list_pass.focus();
			return false;
		}
	else if (document.listsignup.list_pass.value != document.listsignup.list_confirm.value && document.listsignup.list_pass.value) {
			alert ("The password does not match the confirmed password");
			document.listsignup.list_pass.focus();
			return false;
		}
	else if (!document.listsignup.list_name.value) {
		alert("Please enter the wedding list name");
		document.listsignup.list_name.focus();
		return false;
	}
	else if (!document.listsignup.list_code.value) {
		alert("Please enter the wedding list pass code");
		document.listsignup.list_code.focus();
		return false;
	}
	else if (document.listsignup.list_code.value == document.listsignup.list_pass.value) {
		alert("Please enter a code different to your password");
		document.listsignup.list_code.focus();
		return false;
	}
	else if (!document.getElementById("town").value) {
		alert("Please enter the town name");
		return false;
	}
	else if (!document.getElementById("county").value) {
		alert("Please enter the county name");
		return false;
	}
	else if (!document.getElementById("postcode").value) {
		alert("Please enter the postcode name");
		return false;
	} 
	else if (!document.getElementById("street").value) {
		alert("Please enter the street name");
		return false;
	}
	else {
		return true;
	} return false;	} 	  	  
