// Javascript for PSI
	
// IMAGE ROLLOVER FUNCTIONS

    var imageroot = "images/";

    function turnon(pic){
      pic.src = imageroot + pic.id + "_over.gif";
      return true;
    }

    function turnoff(pic){
      pic.src = imageroot + pic.id + ".gif";
      return true;
    }

	
// Function to Open Window
function openwin(the_url,w,h)
{
   newwin=window.open(the_url,"newwin","height=" + h + ",width=" + w + ",left=30,top=30,scrollbars=yes")
}

// VALIDATE REGISTRATION FORM
function validateregistration(f){

  var errorlog = "Please correct the following problems:\n\n";
  var errors = 0;
  
  if(f.fname.value == ""){
    errorlog += "Please fill in your first name.\n";
	errors++;
  }
  
  if(f.lname.value == ""){
    errorlog += "Please fill in your last name.\n";
	errors++;
  }
  
  if( checkEmail( f.email.value ) == false){ 
    return false;
  }
  
  if(errors){
    alert(errorlog);
	return false;
  }
  else { return true; }
  
}

