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\" class=\"in_cart\"><span class=\"tb\">Added to Cart</span></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 {
			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.verynice2.com/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.verynice2.com/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.verynice2.com/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.verynice2.com/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" || document.step1.action == "http://www.verynice2.com/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.streethn.value) {
		alert ("Please enter a House Number");
		document.bill.streethn.focus();
		return false;
	} else if (!document.bill.street.value) {
		alert ("Please enter a 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() {
var myOption
for (i=document.del.payment_type.length-1; i > -1; i--) {
if (document.del.payment_type[i].checked) {
var myOption = 1;
}
}

	if (!document.del.streethn2.value) {
		alert ("Please enter a House Number");
		document.del.streethn2.focus();
		return false;
	} else if (!document.del.street2.value) {
		alert ("Please enter a 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 if (!document.del.deliveryadd2.checked) {
		alert ("Please accept our terms and conditions");
		document.del.deliveryadd2.focus();
		return false;
	} else if (!document.del.deliveryadd2.checked) {
		alert ("Please accept our terms and conditions");
		document.del.deliveryadd2.focus();
		return false;
	} else if (!document.del.mail[0].checked && !document.del.mail[1].checked) {
		alert ("Please select wheather you would like to receive email updates");
		return false;
	} else if (!myOption) {
		alert("You must select a Payment Type");
		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');
}












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();};	
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:105px; 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 chekforoptions() {
	if (!document.buyform.option.value) {
		alert ("Please Select a Product Option");
		return false;
	} else {
		return true;
	}
	return false;
}
function clearemail() {
	if (document.newslettersignup.newsletter_email.value == "enter email and press >") {
	document.newslettersignup.newsletter_email.value = "";
	}
}  	  	  	
function changecss(theClass,element,value) {
	 var cssRules;
	 if (document.all) {
	  cssRules = 'rules';
	 }
	 else if (document.getElementById) {
	  cssRules = 'cssRules';
	 }
	 for (var S = 0; S < document.styleSheets.length; S++){
	  for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {	   if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
	    document.styleSheets[S][cssRules][R].style[element] = value;
	   }
	  }
	 }	
	}
 function kcomcomments(element,elementlink) {
document.getElementById("kcom_comments_link").style.background = "#F3F3F3";
//document.getElementById("kcom_reviews_link").style.background = "#F3F3F3";
document.getElementById("kcom_qanda_link").style.background = "#F3F3F3";
document.getElementById("kcom_email_link").style.background = "#F3F3F3";
document.getElementById("kcom_form_link").style.background = "#F3F3F3";
//document.getElementById("kcom_notify_link").style.background = "#F3F3F3";
document.getElementById("commentsbox").innerHTML = document.getElementById(element).innerHTML;
document.getElementById(elementlink).style.background = "#F3F3F3";
}
function getXmlHttpRequestObject() {
	if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else if(window.ActiveXObject) {
		return new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		alert("Your Browser Sucks!\nIt's about time to upgrade don't you think?");
	}
}
var insertupdate = getXmlHttpRequestObject();
var insnotify = getXmlHttpRequestObject();
var emailafriend = getXmlHttpRequestObject();
function insertcomment() {
	document.getElementById("kcom_form").innerHTML="";
	document.getElementById("kcom_temp").innerHTML=document.getElementById("commentsbox").innerHTML;
	document.getElementById("commentsbox").innerHTML = "Sending information, please wait...";
	if (insertupdate.readyState == 4 || insertupdate.readyState == 0) {
		day2 = new Date();
ttime2 = day2.getTime();
		insertupdate.open("POST", 'includes/nav-modules/comments.php?i=1&name='+document.commentsform.name.value+'&email='+document.commentsform.email.value+'&prodid='+document.commentsform.prodid.value+'&website='+document.commentsform.website.value+'&type='+document.commentsform.type.value+'&comment='+document.commentsform.enq.value.replace(/\n/g,"|*^|"), true);
		insertupdate.onreadystatechange = insertupdate2; 
		insertupdate.send(null);
	}	
	return false;
}

//Called when the AJAX response is returned.
function insertupdate2() {
	if (insertupdate.readyState == 4) {
if (insertupdate.responseText) {
	alert ("Error: "+insertupdate.responseText);
	document.getElementById("commentsbox").innerHTML=document.getElementById("kcom_temp").innerHTML;
} else {
	document.getElementById("commentsbox").innerHTML = "<p>The Question/Comment has been submitted successfully.</p> <p>It will now be passed to a moderator before appearing on the site.</p>";
	document.getElementById("kcom_form").innerHTML = "<p>The Question/Comment has been submitted successfully.</p> <p>It will now be passed to a moderator before appearing on the site.</p>";

}
	}
}
function emailpagecheck()
{
	
	document.getElementById("kcom_email").innerHTML="";
	 if(!document.emailform.emailfriend.value) {
		alert ("Please fill in the email address you want to send this page to");
		document.getElementById("kcom_email").innerHTML=document.getElementById("commentsbox").innerHTML;
		return false;
	} else	if (!document.emailform.emailname.value) {
		alert ("Please fill in the name of the person you want to send this page to");
		document.getElementById("kcom_email").innerHTML=document.getElementById("commentsbox").innerHTML;
		return false;
	} else	if (!document.emailform.emailfriendfrom.value) {
		alert ("Please fill in the email address you want to send this page from");
		document.getElementById("kcom_email").innerHTML=document.getElementById("commentsbox").innerHTML;
		return false;
	} else	if (!document.emailform.emailnamefrom.value) {
		alert ("Please fill in the name of the person you want to send this page from");
		document.getElementById("kcom_email").innerHTML=document.getElementById("commentsbox").innerHTML;
		return false;
	} else { 
	document.getElementById("kcom_temp").innerHTML=document.getElementById("commentsbox").innerHTML;
	document.getElementById("commentsbox").innerHTML = "Sending information, please wait...";
	if (emailafriend.readyState == 4 || emailafriend.readyState == 0) {
		day2 = new Date();
ttime2 = day2.getTime();
		emailafriend.open("POST", 'includes/nav-modules/comments.php?e=1&prodid='+document.emailform.prodid.value+'&emailname='+document.emailform.emailname.value+'&emailfriend='+document.emailform.emailfriend.value+'&emailname='+document.emailform.emailname.value+'&emailfriendfrom='+document.emailform.emailfriendfrom.value+'&emailnamefrom='+document.emailform.emailnamefrom.value+'&specmessage='+document.emailform.specmessage.value.replace(/\n/g,"|*^|"), true);
		emailafriend.onreadystatechange = emailafriend2; 
		emailafriend.send(null);
	}	
	}
	return false;
}


function emailafriend2() {
	if (emailafriend.readyState == 4) {
if (emailafriend.responseText) {
	alert ("Error: "+emailafriend.responseText);
	document.getElementById("commentsbox").innerHTML=document.getElementById("kcom_temp").innerHTML;
		document.getElementById("kcom_email").innerHTML=document.getElementById("commentsbox").innerHTML;
} else {
	document.getElementById("commentsbox").innerHTML = "<p>A link to this page has been sent to your friend. </p>";
	document.getElementById("kcom_email").innerHTML = "<p>A link to this page has been sent to your friend. </p>";
}
	}
}
function expandfilter() {
	if (document.getElementById("f1").style.display == "" || document.getElementById("f1").style.display == "none") {
		document.getElementById("f1").style.display = "block";
		document.getElementById("f2").style.display = "block";
		document.getElementById("f3").style.display = "block";
		document.getElementById("f4").style.display = "block";
		document.getElementById("f5").style.display = "block";
		document.getElementById("f6").style.display = "block";
		document.getElementById("f7").style.display = "block";
		document.getElementById("exprem").innerHTML = "hide this form.";
	} else {
		document.getElementById("f1").style.display = "none";
		document.getElementById("f2").style.display = "none";
		document.getElementById("f3").style.display = "none";
		document.getElementById("f4").style.display = "none";
		document.getElementById("f5").style.display = "none";
		document.getElementById("f6").style.display = "none";
		document.getElementById("f7").style.display = "none";
		document.getElementById("exprem").innerHTML = "email to a friend.";
	}
}	  
	  function emailchk() {	  
var emailfilter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		 if (!emailfilter.test(document.getElementById("newsletter_email").value) || !document.getElementById("newsletter_email").value) {
		alert ("Please enter a valid email address");
		return false;
} else {
return true;
}
return false;
}
	  

