function validate(){
  if (document.coursesForm.firstName.value == ""){
    alert("Please enter first name");
	return false;
  }
  if (document.coursesForm.secondName.value == ""){
    alert("Please enter second name");
	return false;
  }
  return true; 
}
function displayInfo(form) {
var info; //the string that will be written to the window document, includes all the html markup
var infoWindow; // for displaying info
var infoStr; 
//validate the form
   if (validate()){
   //if this OK check value of text area
     if ((form.courses.value) == "")
        infoStr = " is new to the OU.";
	 else
	    infoStr = " is a continuing student with the OU."; 
     info = "<html><head><title>Student Information</title><link rel='stylesheet' href='../../homestyle.css'></head>" + "<body><h1>Information about "
     + form.firstName.value + " " + form.secondName.value + "</h1><p>" 
     + form.firstName.value + infoStr + "</p></body></html>"
     infoWindow = window.open("","","toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=400");
     infoWindow.document.write(info);
     infoWindow.document.close();
 }
}
