<!--

// function init ()
// {
// document.forms['example'].onsubmit = function () {
// 		return checkit()
// 	}
	

// This is the check script

function checkit()
{
	// In textstring I gather the data that are finally written to the textarea.

	var textstring = '';

	// First of all, have all the text boxes been filled in?
	// This part is treated in the normal page.
	// I put all boxes and their values in textstring
	// (i=0;i<5;i++)
	
	// document.personal.name
// document.personal.address
// document.personal.city

/// 	NOTE Originally -  var box = document.forms['example'].
	
		var box = document.forms['contact'].message;
		if (!box.value) {
			alert('You haven\'t filled in ' + box.name + '!');
			box.focus()
			return false;
		}
		
		var box = document.forms['contact'].realname;
		if (!box.value) {
			alert('You haven\'t filled in your name!');
			box.focus()
			return false;
		}
		
		var box = document.forms['contact'].teleno;
		if (!box.value) {
			alert('You haven\'t filled in your telephone number!');
			box.focus()
			return false;
		}
			var box = document.forms['contact'].email;	
		if (!box.value) {
			alert('You haven\'t filled in a valid email address');
			box.focus()
			return false;
		}
	
	var x = document.forms['contact'].elements;
	for (var i=0;i<x.length;i++) {
		if (!x[i].value)
			writeError(x[i],'This field is required');
	}
	if (x['email'].value.indexOf('@') == -1)
		writeError(x['email'],'This is not a valid email address');
		if (!W3CDOM)
		alert(errorstring);
	if (firstError)
		firstError.focus();
	if (validForm)
		alert('All data is valid!');

	// Get value of the 'Why' radio buttons.

	

	// Get value of the 'How' select box.

	
	// See what checkboxes are checked. They are elements 9-12

	

	// Write textstring to the textarea.

}
// -->
