<!-- //hide the script
function clearBox(obj, defaultText) {
    if (obj.value == defaultText) {
        obj.value = "";
    }
}

function checkEmail(strng) {
	var error = "";

	var emailFilter=/^.+@.+\..{2,6}$/;

	if (!(emailFilter.test(strng))) {
		return false;
	}

	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\] ']/

	if (strng.match(illegalChars)) {
		return false;
	}

	return true;
}


function form_validation(theForm)
{

 	if(theForm.sender.value == "") {
 		 alert("Please enter your Full Name.");
 		 theForm.sender.focus();
 		 return(false);
 	}

		if(theForm.sender.value == "Enter your full name here") {
			 alert("Please enter your Full Name.");
			 theForm.sender.focus();
			 return(false);
		}

 	if(theForm.address.value == "") {
 		 alert("Please enter your Address.");
 		 theForm.address.focus();
 		 return(false);
 	}

		if(theForm.address.value == "Enter your address here (don’t forget to include Your house/flat number)") {
			 alert("Please enter your Address.");
			 theForm.address.focus();
			 return(false);
		}


	if(!checkEmail(theForm.email.value)) {
		 alert("Please enter a valid Email Address");
		theForm.email.focus();
		 return false;
	}

 	if(theForm.when.value == "") {
 		 alert("Please enter when the incident happened.");
 		 theForm.when.focus();
 		 return(false);
 	}

		if(theForm.when.value == "Enter when the incident happened") {
			alert("Please enter when the incident happened.");
			 theForm.when.focus();
			 return(false);
		}

 	if(theForm.timestart.value == "") {
 		 alert("Please enter the time that the incident began.");
 		 theForm.timestart.focus();
 		 return(false);
 	}

		if(theForm.timestart.value == "Enter the time that the incident began") {
			alert("Please enter the time that the incident began.");
			 theForm.timestart.focus();
			 return(false);
		}

 	if(theForm.timeend.value == "") {
 		 alert("Please enter the time that the incident ended.");
 		 theForm.timeend.focus();
 		 return(false);
 	}

		if(theForm.timeend.value == "Enter the time that the incident ended") {
			 alert("Please enter the time that the incident ended.");
			 theForm.timeend.focus();
			 return(false);
		}

    if(theForm.where.value == "") {
 		 alert("Please enter the location the incident took place.");
 		 theForm.where.focus();
 		 return(false);
 	}

		if(theForm.where.value == "Enter the location where the incident took place") {
			 alert("Please enter the location the incident took place.");
			 theForm.where.focus();
			 return(false);
		}
		
	if(theForm.what.value == "") {
 		 alert("Please enter what happened.");
 		 theForm.where.focus();
 		 return(false);
 	}

		if(theForm.what.value == "Enter what happened") {
			 alert("Please enter what happened.");
			 theForm.where.focus();
			 return(false);
		}
		
	if(theForm.who.value == "") {
 		 alert("Please enter who was involved.");
 		 theForm.who.focus();
 		 return(false);
 	}

		if(theForm.who.value == "Enter who was involved") {
			 alert("Please enter who was involved.");
			 theForm.who.focus();
			 return(false);
		}
		
	if(theForm.contactyou.value == "") {
 		 alert("Please enter your preferred contact method.");
 		 theForm.contactyou.focus();
 		 return(false);
 	}

		if(theForm.contactyou.value == "Enter your preferred contact method") {
			 alert("Please enter your preferred contact method.");
			 theForm.contactyou.focus();
			 return(false);
		}

	return (true);
}
// end script hiding -->
