/////////////////////////////
//
//Site submission form check.
//
	function RegVal(theForm) {
		with(theForm){
			if (contact.value.length < 4) {
				alert ("Please enter your name in the box provided.");
				contact.focus();
				return (false);
			}
			if (email.value.length < 5 || email.value.indexOf("@") < 2) {
				alert ("Please enter your Email Address in the box provided.");
				email.focus();
				return (false);
			}
			if (webaddress.value.length < 5 || webaddress.value=="www.yoursite.com") {
				alert ("Please enter a valid URL in the box provided.");
				webaddress.focus();
				return (false);
			}
			if (title.value.length < 2) {
				alert ("Please a Title for this Web Site in the box provided.");
				title.focus();
				return (false);
			}
			if (description.value.length < 4 || description.value=="Please enter a short description of your site here. Please be concise and accurate.") {
				alert ("Please enter a site description in the box provided.");
				description.focus();
				return (false);
			}
		}
	}

/////////////////////////////
//
//Site submission form check.
//
	function check_contact_form(theForm) {
		with(theForm){
			if (contact.value.length < 4) {
				alert ("Please enter your name in the box provided.");
				contact.focus();
				return (false);
			}
			if (email.value.length < 5 || email.value.indexOf("@") < 2) {
				alert ("Please enter your Email Address in the box provided.");
				email.focus();
				return (false);
			}
		}
	}

	function check_club_form(theForm, actionToTake) {
		with(theForm){
			if (actionToTake != "Previous") {
				if (clubname.value.length < 4) {
					alert ("Please enter the name of this club in the box provided.");
					clubname.focus();
					return (false);
				}
			} else {
				submissionStep.value="submission0";
				backNext.value="Back";
				return (true);
			}
		}
	}

	function check_hotel_form(theForm, actionToTake) {
		with(theForm){
			if (actionToTake != "Previous") {
				if (hotelname.value.length < 4) {
					alert ("Please enter the name of this hotel in the box provided.");
					hotelname.focus();
					return (false);
				}
			} else {
				submissionStep.value="submission0";
				backNext.value="Back";
				return (true);
			}
		}
	}

	function check_facilities_form(theForm, actionToTake) {
		with(theForm){
			if (actionToTake == "Previous") {
				submissionStep.value="submission1";
				backNext.value="Back";
			}
		}
		return (true);
	}

	function check_desc_form(theForm, actionToTake) {
		with(theForm){
			if(description.value.length > 255) {
				alert("Please keep the description to a maximum of 255 characters, about 30-40 words. Your description is currently "+description.value.length+" characters in length.")
				return (false);
			}
			if (actionToTake == "Previous") {
				submissionStep.value="submission2";
				backNext.value="Back";
			}
		}
		return (true);
	}

	function check_comment_form(theForm, actionToTake) {
		with(theForm){
			if(comments.value.length > 255) {
				alert("Please keep your comments to a maximum of 255 characters, about 30-40 words. Your comment is current "+comments.value.length+" characters in length.")
				return (false);
			}
			if (actionToTake == "Previous") {
				submissionStep.value="submission3";
				backNext.value="Back";
			}
		}
		return (true);
	}

	function check_final_form(theForm, actionToTake) {
		with(theForm){
			if (actionToTake == "Previous") {
				submissionStep.value="submission4";
				backNext.value="Back";
			}
		}
		return (true);
	}
