function checkscript()
{
		
		if (document.getElementById('company').value == '' || document.getElementById('company').value == 'Company')
		{
			alert('Please enter your company name');
			return false;
		}else if (document.getElementById('forename').value == '' || document.getElementById('forename').value == 'Forename')
		{
			alert('Please enter your forename');
			return false;
		}else if (document.getElementById('surname').value == '' || document.getElementById('surname').value == 'Surname')
		{
			alert('Please enter your surname');
			return false;
		}else if (document.getElementById('postcode').value == '' || document.getElementById('postcode').value == 'Postcode')
		{
			alert('Please enter your postcode');
			return false;		
		}else if (document.getElementById('tel').value == '' || document.getElementById('tel').value == 'Telephone Number')
		{
			alert('Please enter your telephone number');
			return false;
		}else if (document.getElementById('email').value == '' || document.getElementById('email').value == 'Email' )
		{
			alert('Please enter your email address');
			return false;
		}else if (document.getElementById('email').value != '' )
		{
			return CyJS_Utils_IsEmailValidcf (document.getElementById('email').value);
		} 
}


function CyJS_Utils_IsEmailValidcf(checkThisEmail)
{
	var myEMailIsValid = true;
	var myAtSymbolAt = checkThisEmail.indexOf('@');
	var myLastDotAt = checkThisEmail.lastIndexOf('.');
	var mySpaceAt = checkThisEmail.indexOf(' ');
	var myLength = checkThisEmail.length;


	// at least one @ must be present and not before position 2
	// @yellow.com : NOT valid
	// x@yellow.com : VALID

	if (myAtSymbolAt < 1 )
 		{myEMailIsValid = false}


	// at least one . (dot) afer the @ is required
	// x@yellow : NOT valid
	// x.y@yellow : NOT valid
	// x@yellow.org : VALID

	if (myLastDotAt < myAtSymbolAt)
	 {myEMailIsValid = false}

	// at least two characters [com, uk, fr, ...] must occur after the last . (dot)
	// x.y@yellow. : NOT valid
	// x.y@yellow.a : NOT valid
	// x.y@yellow.ca : VALID

	if (myLength - myLastDotAt <= 2)
	 {myEMailIsValid = false}


	// no empty space " " is permitted (one may trim the email)
	// x.y@yell ow.com : NOT valid

	if (mySpaceAt != -1)
	 {myEMailIsValid = false}


	if (myEMailIsValid == true)
	 {
		
	if (document.getElementById('enquiry').value == '' || document.getElementById('enquiry').value == 'Enter enquiry here')
		{
			alert('Please enter your enquiry');
			return false;
		}else if (document.getElementById('marketing').value == '' || document.getElementById('marketing').value == 'please select')
		{
			alert('Please select where you heard about us');
			return false;
		}else 
		
		{
		
  return true
  
		}
		
			 
	}
	else
	 {alert("Please check that your email address is entered correctly")
	 return false;}

}
