 /*	
 	This javascript just contains two functions.
	One which check to make sure that SOMETHING is in every required field, and if so, then is sets the "process" value to true and sends all the information via POST to cyber07submit.php so that it can be processed and sent in an email.  
	The other just resets all the fields when the user clicks a button
 */ 
 
function checkForm(thisForm) {
	
	var forgotten = "";
	
	if(thisForm.sal.value == "")
	{
		forgotten = forgotten + "Salutation\n";
	}
	
	if(thisForm.firstName.value == "")
	{
		forgotten = forgotten + "First Name\n";
	}
	
	if(thisForm.lastName.value == "")
	{
		forgotten = forgotten + "Last Name\n";
	}
	
	if(thisForm.title.value == "")
	{
		forgotten = forgotten + "Title\n";
	}
	
	if(thisForm.org.value == "")
	{
		forgotten = forgotten + "Organization\n";
	}
	
	if((thisForm.street1.value == "") && (thisForm.street2.value == ""))
	{
		forgotten = forgotten + "Street Address\n";
	}
	
	if(thisForm.city.value == "")
	{
		forgotten = forgotten + "City\n";
	}
	
	if(thisForm.state.value == "")
	{
		forgotten = forgotten + "State\n";
	}
	
	if(thisForm.zip.value == "")
	{
		forgotten = forgotten + "Zip Code\n";
	}
	
	if(thisForm.phone.value == "")
	{
		forgotten = forgotten + "Phone Number\n";
	}
	
	if(thisForm.email.value == "")
	{
		forgotten = forgotten + "Email Address\n";
	}
	
	if(forgotten != "")
	{
		alert("You forgot to fill out:\n" + forgotten);
	}
	else 
	{
		thisForm.process.value = "true";
		document.registrationForm.submit();
	}
}

function resetFields(form)
{
	form.sal.value = "";
	form.firstName.value = "";
	form.lastName.value = "";
	form.title.value = "";
	form.org.value = "";
	form.address.value = "";
	form.street1.value = "";
	form.street2.value = "";
	form.city.value = "";
	form.state.value = "";
	form.zip.value = "";
	form.phone.value = "";
	form.email.value = "";
	form.dietary.value = "";
}