	function topicChanged(thisForm)
	{
		if(thisForm.Topic.value == "Other")
		{
			thisForm.Other.disabled = false;
			thisForm.Other.value = "";
		}
		else
		{
			thisForm.Other.disabled = true;
			thisForm.Other.value = "N/A";
		}
	}

	function validForm(thisForm)
	{
		if(validRequestedBy(thisForm.RequestedBy) && validOrganization(thisForm.Organization) && validPhoneNumber(thisForm.AreaCode, thisForm.FirstThree, thisForm.LastFour) && validEmail(thisForm.Email.value, thisForm.Email) && validTopic(thisForm.Topic) && validLocation(thisForm.Location) && validNumPeople(thisForm.NumPeople) && validFirstChoice(thisForm) && validSecondChoice(thisForm) && agree(thisForm.agree))
			return true;
		else
			return false;
	}

	function validRequestedBy(RequestedBy)
	{
		if(RequestedBy.value != "")
			return true;
		else
		{
			alert("Requested By field cannot be blank");
			RequestedBy.focus();
			return false;
		}
	}

	function validOrganization(organization)
	{
		if(organization.value != "")
			return true;
		else
		{
			alert("Organization field cannot be blank");
			organization.focus();
			return false;
		}
	}

	function validPhoneNumber(AreaCode, FirstThree, LastFour)
	{
		if(AreaCode.value.length != 3 || FirstThree.value.length != 3 || LastFour.value.length != 4)
		{
			alert("Phone number is the wrong length or blank")
			AreaCode.focus();
			return false;
		}
		else if(isNaN(AreaCode.value) || isNaN(FirstThree.value) || isNaN(LastFour.value))
		{
			alert("Phone number can only contain numbers")
			AreaCode.focus();
			return false;
		}
		else
			return true;
	}

	function validEmail(email, focus)
	{
		invalidChars = " /:,;"

		if (email == "")    // cannot be empty
		{
			alert("Invalid email address");
			focus.focus();
			return false;
		}
		else if (email == "none")    // it can be 'none'
		{
			form.Email2.value = "none";
			return true;
		}
		for (i=0; i<invalidChars.length; i++)// does it contain any invalid characters?
		{
			badChar = invalidChars.charAt(i);

			if (email.indexOf(badChar,0) > -1)
			{
				alert("Invalid email address");
				focus.focus();
				return false;
			}
		}

		atPos = email.indexOf("@",1);                // there must be one "@" symbol

		if (atPos == -1)
		{
			alert("Invalid email address");
			focus.focus();
			return false;
		}
		else if (email.indexOf("@",atPos+1) != -1)   // and only one "@" symbol
		{
			alert("Invalid email address");
			focus.focus();
			return false;
		}

		periodPos = email.indexOf(".",atPos);

		if (periodPos == -1)        // and at least one "." after the "@"
		{
			alert("Invalid email address");
			focus.focus();
			return false;
		}
		else if (periodPos+3 > email.length)            // must be at least 2 characters after the "."
		{
			alert("Invalid email address");
			focus.focus();
			return false;
		}
		else
			return true;
	}

	function validTopic(Topic)
	{
		if(Topic.value != "" && Topic.value != "Other")
			return true;
		else if(Topic.value == "Other")
		{
			if(document.contract.Other.value != "N/A" && document.contract.Other.value != "")
				return true;
			else
			{
				alert("Other field cannot be blank");
				document.contract.Other.focus();
				return false;
			}
		}
		else
		{
			alert("Please select a topic from the drop down menu");
			Topic.focus();
			return false;
		}
	}

	function validLocation(Location)
	{
		if(Location.value != "")
			return true;
		else
		{
			alert("Location field cannot be blank");
			Location.focus();
			return false;
		}
	}

	function validNumPeople(NumPeople)
	{
		if(NumPeople.value == "")
		{
			alert("Approximate number of people field cannot be blank")
			NumPeople.focus();
			return false;
		}
		else if(isNaN(NumPeople.value))
		{
			alert("Approximate number of people filed can only contain numbers")
			NumPeople.focus();
			return false;
		}
		else
			return true;
	}

	function validFirstChoice(thisForm)
	{
		if(thisForm.FirstMonth.value == "" || thisForm.FirstMonth.value.length != 2 || thisForm.FirstDay.value == "" || thisForm.FirstDay.value.length != 2 || thisForm.FirstYear.value == "" || thisForm.FirstYear.value.length != 4 || thisForm.FirstHour.value == "" || thisForm.FirstHour.value.length != 2 || thisForm.FirstMinute.value == "" || thisForm.FirstMinute.value.length != 2 || !(thisForm.FirstAMorPM[0].checked || thisForm.FirstAMorPM[1].checked))
		{
			alert("First choice field is not completely filled out");
			thisForm.FirstMonth.focus();
			return false;
		}
		else if(isNaN(thisForm.FirstMonth.value) || isNaN(thisForm.FirstDay.value) || isNaN(thisForm.FirstYear.value) || isNaN(thisForm.FirstHour.value) || isNaN(thisForm.FirstMinute.value))
		{
			alert("First choice field can only contain numbers");
			thisForm.FirstMonth.focus();
			return false;
		}
		else
			return true;
	}

	function validSecondChoice(thisForm)
	{
		if(thisForm.SecondMonth.value == "" || thisForm.SecondMonth.value.length != 2 || thisForm.SecondDay.value == "" || thisForm.SecondDay.value.length != 2 || thisForm.SecondYear.value == "" || thisForm.SecondYear.value.length != 4 || thisForm.SecondHour.value == "" || thisForm.SecondHour.value.length != 2 || thisForm.SecondMinute.value == "" || thisForm.SecondMinute.value.length != 2 || !(thisForm.SecondAMorPM[0].checked || thisForm.SecondAMorPM[1].checked))
		{
			alert("Second choice field is not completely filled out");
			thisForm.SecondMonth.focus();
			return false;
		}
		else if(isNaN(thisForm.SecondMonth.value) || isNaN(thisForm.SecondDay.value) || isNaN(thisForm.SecondYear.value) || isNaN(thisForm.SecondHour.value) || isNaN(thisForm.SecondMinute.value))
		{
			alert("Second choice field can only contain numbers");
			thisForm.SecondMonth.focus();
			return false;
		}
		else
			return true;
	}

	function agree(agree)
	{
		if(agree.checked)
			return true;
		else
		{
			alert("You must agree to the terms");
			agree.focus();
			return false;
		}
	}