function Validateideaform(theForm)
	{

		var checktotal;
		var check1 = parseInt(theForm.check1.value);
		var check2 = parseInt(theForm.check2.value);

	
		checktotal = eval(check1 + check2);
		
	
		if (theForm.description.value == "")
		{
		  alert("You have not entered anything to describe your idea.");
		  theForm.description.focus();
		  return (false);
		} /* description */
		
		if (theForm.firstname.value == "")
		{
		  alert("Please enter your name.");
		  theForm.firstname.focus();
		  return (false);
		} /* First_Name */

		if (theForm.email.value == "")
		{
		  alert("Please enter your email address so we can contact you.");
		  theForm.email.focus();
		  return (false);
		} /* email */
		
		
		
	var emailpat;
	emailpat = /^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+$/;
		if( !emailpat.test( theForm.email.value ) ) {
		  alert("Please enter a valid email address.");
      			theForm.email.focus();
      			return (false);
		} /* Email */
		
	if (!(theForm.email.value == theForm.confirmemail.value))
	{
	  alert("Sorry the email addresses entered do not match - please try again, thanks - nearly there!");
	  theForm.email.focus();
	  return (false);
	}
	
	
	if (!(theForm.check.value == checktotal))
	{
	alert('The value entered for ' + check1 + ' plus ' + check2 + ' seems incorrect. Please check.');
	
	return (false);
	}	
	
		if (theForm.termscheck.checked == false)
	{
		alert('Please confirm you accept the terms and conditions of the site');
		return (false);
	}	
		
  
	    return (true);
	    
	} /* Validateideaform */
	
function Validatecontactform(theForm)
	{

		
		if (theForm.firstname.value == "")
		{
		  alert("Please enter your name.");
		  theForm.firstname.focus();
		  return (false);
		} /* First_Name */

		if (theForm.email.value == "")
		{
		  alert("Please enter your email address so we can contact you.");
		  theForm.email.focus();
		  return (false);
		} /* email */
		
		
		
		
	var emailpat;
	emailpat = /^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+$/;
		if( !emailpat.test( theForm.email.value ) ) {
		  alert("Please enter a valid email address.");
      			theForm.email.focus();
      			return (false);
		} /* Email */
		
	
		if (theForm.comments.value == "")
		{
		  alert("Please give a brief description of why you are contacting us.");
		  theForm.comments.focus();
		  return (false);
		} /* comments */
  
	    return (true);
	    
	} /* Validatecontactform */
	
	
	
	
function Validatenewsletterform(theForm)
	{

		
		if (theForm.firstname.value == "")
		{
		  alert("Please enter your name.");
		  theForm.firstname.focus();
		  return (false);
		} /* First_Name */

		if (theForm.email.value == "")
		{
		  alert("Please enter your email address so we can contact you.");
		  theForm.email.focus();
		  return (false);
		} /* email */
		
	var emailpat;
	emailpat = /^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+$/;
		if( !emailpat.test( theForm.email.value ) ) {
		  alert("Please enter a valid email address.");
      			theForm.email.focus();
      			return (false);
		} /* Email */
		
  
	    return (true);
	    
	} /* Validatenewsletterform */
	
	
