<!-- hide from old browsers
// Email Validation. Written by PerlScriptsJavaScripts.com

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(which) 
{ // which is the form (passed using the this keyword)

which.requiredemail.style.background = "white";

// check the first email address ( the exclamation means "not" )
if (!check_email(which.requiredemail.value)) 
{
alert("Invalid email detected.");
which.requiredemail.focus(); 

// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
which.requiredemail.style.background = "yellow";
} //close if browser

// make sure the form is not submitted
return false;
} // close check_email

var pass=true;
var el = document.forms[0].elements;
 for(var i = 0 ; i < el.length ; ++i) {
  if(el[i].type == "radio" && el[i].name.substring(0,8)=="required") {

	 el[i].style.background = "white";

   var radiogroup = el[el[i].name]; // get the whole set of radio buttons.
   var pass = false;
   for(var j = 0 ; j < radiogroup.length ; ++j) {
    if(radiogroup[j].checked) {
	 pass=true;
	 break;
	}
   }
   if(!pass) { 
//    alert("Please choose an answer for "+el[i].name+".");
alert("One or more of the required fields are not completed. Please complete them.")

    if(el[i].focus)
     el[i].focus();
//     el[i].style.background = "yellow";

	pass=false;
	return false;
   }
  }
 }

if (document.images){
for (i=0;i<which.length;i++){
var tempobj=which.elements[i]
if (tempobj.name.substring(0,8)=="required"){

tempobj.style.background = "white";

if (((tempobj.type=="text"||tempobj.type=="password"||tempobj.type=="textarea"||tempobj.type=="file")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
tempobj.style.background = "yellow";
pass=false
break
}
}
}
}
if (!pass){
alert("One or more of the required fields are not completed. Please complete them.")
return false;
}
} // end of function check_form

// sweet -->

