        function checkForm4() {  

       //______________________________
        //Function for checking number fields for empty and nonnumeric values.
        //______________________________
        function isNum(str)	{
	        for(i=0; i <str.length ; i++)	{
		   if(str.charAt(i) > "9")	{
			return false;
	           }
		if (str.charAt(i) < "0")	{
			return false;
	        }

        	}
		return true;
	}

	function validEmail(email) {
		var invalidChars =" /:,;";

		if (email.length == "") {
			alert("Your email address shouldn't be empty!");
			document.feedback.email.focus();
			return false;
		}
   
                for (i=0; i<invalidChars.length; i++) {
			badChar = invalidChars.charAt(i);
			if (email.indexOf(badChar,0) > -1) { 	//it searches invalidChars string
				alert("Your email contains invalid characters!");
				document.feedback.email.focus();
				return false;
			}
		}

		var atPos = email.indexOf("@",1);
		if (atPos == -1) {				 //it checks if email contains any @ character.
			alert("Your email address doesn't contain @ character!");
			document.feedback.email.focus();
			return false;
		}

		if (email.indexOf("@",atPos+1) > -1) {		//it checks if email contains more than one @ character, if there is gives an error message.
			alert("Your email contains more than one @ character!");
			document.feedback.email.focus();
			return false;
		}

		var periodPos = email.indexOf(".",atPos);
		if (periodPos == -1) {				//it checks that there is a period after the @ sign, if not gives an error message.
			alert("Your email doesn't contain dot character after the @ character!");
			document.feedback.email.focus();
			return false;
		}

		if (periodPos+3 > email.length) {		//it checks if is there at least two characters after the dot character.
			alert("Your email should contain at least two characters after the dot character.");
			document.feedback.email.focus();
			return false;
		}
		return true;
	}
	


	   	    
		var name = document.feedback.name.value;
		if(name <= 0)	{
			alert("Please enter your name");
			document.feedback.name.focus();
			return false;
		}


		var company = document.feedback.company.value;
		if(company <= 0)	{
			alert("Please enter your company name");
			document.feedback.company.focus();
			return false;
		}
                               

		var email = document.feedback.email.value;
		if (validEmail(email) == false) {
			return false;
		}

		var survey = document.feedback.survey.value;
	        if(survey <= 0)	{
		        alert("Please enter your comments");
			document.feedback.survey.focus();
			return false;
		}
 
  
 
         


    		return true;

	} 

         
	// End hiding script from old browsers -->
 
