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("WordList", "Please enter words into the word list.");
if (!CanSubmit) return;
	
//Check there are no more than 35 words - if there are more than 35,
//POST the information rather tha using GET

	//Grab the word list text
	var wordList = document.getElementById("WordList").value;
	//Split the word list into individual words
	var words = wordList.split(/\s/);
	if (words.length>35)
	{
		document.LayoutAnagram.method = "post";		
		document.LayoutAnagram.VarsPosted.value = "true";
	}
	
	
//If fields have been entered correctly, submit the form
document.LayoutAnagram.submit();

} //end function


