	function ValidateForm() {

		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		var address = document.forms['postform'].elements['email'].value;
		if(reg.test(address) == false) {
			alert('Invalid E-mail address, please correct it and try again.');
			return false;
		}	
		
		var content = document.forms['postform'].elements['suggestiontext'].value;
		if  (trim(content) == "") {
			alert('Please provide a text.');
			return false;
		}
	
		return true;
	}
	
	function trim(str, chars) {
	
		return ltrim(rtrim(str, chars), chars);
	}

	function ltrim(str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
	}

	function rtrim(str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
	}
