	//Check entire form
			
	//alert('Testy McTesterson');
			
			function checkWholeForm() {
				var why = "";
				why += isEmpty('Name');
				why += isEmpty('Company');
				why += isEmpty('Comments');
				why += checkEmail('Email');
				why += isEmpty('r-u');
				
				if (why != "") {
				   alert(why);
				   return false;
				}
			return true;
			}

			// email
			function checkEmail (eid) {
			var error="";
			var x = document.getElementById(eid);
			var xn = x.name;
			var emailFilter=/^.+@.+\..{2,3}$/;
			var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/;
			
				if (x.value.length == 0) {
					error = "The "+xn+" field is required.\n";
					x.className="error-input";
				} else if (!(emailFilter.test(x.value))) {
					error = "Please enter a valid email address.\n";
					x.className="error-input";
				} else if (x.value.match(illegalChars)) {
					error = "The email address contains illegal characters.\n";
					x.className="error-input";
				} else {
					x.className="";
				}
				
			return error;    
			}   
			
			// non-empty textbox
			function isEmpty (eid) {
			var error = "";
			var x = document.getElementById(eid);
			var xtitle = x.title;
			  if (x.value.length == 0) {
				  error = "The " + xtitle + " field is required.\n";
				  x.className="error-input";
			  } else {x.className="";}
			return error;	  
			}