// Setup and Validation for event registration submitted by user

function storySetup() {
	document.forms.register.reset();	
	document.forms.register.name.focus()	
}

function validateStory() {
	
	// Check email
	if(document.forms.shareStory.email.value=="")
	{
		alert ("Please enter a contact email address.");
		document.forms.shareStory.email.focus();
		return false;
	} 
	
	// Check story
	if(document.forms.shareStory.story.value=="")
	{
		alert ("Please enter your story.");
		document.forms.shareStory.story.focus();
		return false;
	} 
	
	// Check for user approval that the story may appear on this website
	if(document.forms.shareStory.approval.checked!=1)
	{
		alert ("Please confirm that you understand the story may appear on this website for all the world to see.");
		return false;
	} 
	
	// Check question
	if(document.forms.shareStory.question.value=="")
	{
		alert ("Please answer the question about the color of snow. This helps reduce spam.");
		document.forms.shareStory.question.focus();
		return false;
	} 
	
};
