
//
// Verification script
//
// copyright © 2003 agitprop_mainman
//
// This is a free script by agitprop_mainman that is  released under the
// Open Source Software copyright conventions.
//
// Please note that NO technical assistance is  offered with this script.
//
//--------------------------------------------------------------------------
//
//Paste the script into the head of your page

function verify()
{
// This section just uses a simple regular expression to check the name
// input box. It checks for one or more characters, a space and another
// group of characters.

// name

if (document.form.name.value.search(/^.+.+$/))
     {
     alert("Please make sure you have included your name!")
     return
     }

// position		 
		 
if (document.form.position.value.search(/^.+.+$/))
     {
     alert("Please make sure you have included your position!")
     return
     }
		 
// organisation
		 
if (document.form.org.value.search(/^.+.+$/))
     {
     alert("Please make sure you have included the name of your organisation!")
     return
     }		 

// address1
		 
if (document.form.address1.value.search(/^.+.+$/))
     {
     alert("Please make sure you have included your address")
     return
     }		 
		 
// city
		 
if (document.form.city.value.search(/^.+.+$/))
     {
     alert("Please make sure you have included the name of your city")
     return
     }		 
		 
// postcode
		 
if (document.form.postcode.value.search(/^.+.+$/))
     {
     alert("Please make sure you have included your postcode")
     return
     }		 
		 
// country
		 
if (document.form.country.value.search(/^.+.+$/))
     {
     alert("Please make sure you have included the name of your country")
     return
     }		 
		 
// phone
		 
if (document.form.phone.value.search(/^.+.+$/))
     {
     alert("Please make sure you have included your phone number")
     return
     }		 
		 

		 
// This section also uses a regular expression to check the email  input box.
// It checks for one or more characters, then it checks for the email @
// signifier, then another group of characters, then a full stop or period (.),
// then for another group of characters.

if (document.form.email.value.search(/^.+@.+\..+$/))
     {
     alert("Please include a valid email address!")
     return
     }
else
     {
// If the form is correctly filled out you can submit the form to your mail cgi
// by deleting the next line, and uncommenting the following two lines.
		document.form.submit()
		return;
     }
}


