function ValidateData() {

//Submission variable
var CanSubmit = false;

//Check to make sure that the worksheet title field is not empty.
CanSubmit = ForceEntry("WorksheetTitle", "Please enter a title for the worksheet.");
if (!CanSubmit) return;


//Check there is something entered into the word list
CanSubmit = ForceEntry("Text", "Please enter some text to print on the worksheet.");
if (!CanSubmit) return;

// check font size has been supplied
CanSubmit = ForceNumber("HWFontSize", "Font size");
if (!CanSubmit) return;

//If instructions and text over run,	
//POST the information rather tha using GET

	//Grab the word list text
	var textList = document.getElementById("Text").value;
	//If the list is over 200 characters long, post the vars
	if (textList.length > 200)
	{
		document.LayoutHW.method = "post";		
		document.LayoutHW.VarsPosted.value = "true";
	}

//Settings are initially organised for a copy under worksheet - adjust if necessary
if (document.LayoutHW.WType[0].checked) {
	document.LayoutHW.CopyUnder.value = "copyunder_extra";
	document.LayoutHW.GreyOut.value = "false";	
}
if (document.LayoutHW.WType[1].checked) {
	document.LayoutHW.CopyUnder.value = "none";
	document.LayoutHW.GreyOut.value = "true";	
}

//If fields have been entered correctly, submit the form
document.LayoutHW.submit();

} //end function

