function check_email(e) {
		ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
		for(i=0; i < e.length ;i++){
			if(ok.indexOf(e.charAt(i))<0){ 
				return (false);
			}	
		} 
		if (document.images) {
			re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
			re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
			if (!e.match(re) && e.match(re_two)) {
				return (-1);		
			} 
		}
	}

	function check_form(f) { 
		// check the email address
		if(!check_email(f.aFrom.value)){
			alert("Invalid email detected.");
			f.aFrom.focus(); 
			// if the browser is Netscape 6 or IE
			if(document.all || document.getElementByID){
				// change the color of text field
				f.aFrom.style.background = "yellow";
			}
			// make sure the form is not submitted
			return false;
		}
		// check the message
		if(f.textBody.value.length<1){
			alert("You must type a message to submit.");
			f.textBody.focus(); 
			// if the browser is Netscape 6 or IE
			if(document.all || document.getElementByID){
				// change the color of text field
				f.textBody.style.background = "yellow";
			}
			// make sure the form is not submitted
			return false;
		}
	}