//Frame Buster
if (top.location != self.location){
	top.location = self.location
}
function isNav() {
		  return (navigator.appName == "Netscape");
}
function chgColors(formElement, eventIn){
  if (!isNav()){
	if (eventIn == 'on'){
		formElement.style.background='lightblue';
	}
	else {
		formElement.style.background='white';
	}
  }	
}
function pageInit() {
  if (window.document.sendEmail.senderName){
	  window.document.sendEmail.senderName.focus();
	  window.document.sendEmail.senderName.select()
  }
}
function validate(form) {
  
  if (form.senderName.value == ""){
	alert("Name is required");
	form.senderName.focus();
	form.senderName.select();
	return false;
  }
  else if (form.comments.value == ""){
	alert("Comments are required");
	form.comments.focus();
	form.comments.select();
	return false;
  }
  else if (form.emailAddr.value == ""){
    alert("Email Address is required.");
	form.emailAddr.focus();
	form.emailAddr.select();	
	return false;
  }
  else if (isEmail(form.emailAddr.value) == false) {
        alert("Please enter a valid email address.");
        form.emailAddr.focus();
		form.emailAddr.select();
        return false;
    }

 else {
 		  return true;
 }
}
/*function isEmail(string) {

   if (!string) return false;
   var iChars = "*|,\":<>[]{}`\';()&$#%";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
}*/
function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
        return true;
    else
        return false;
}
                 