<!--
function validateProfile()
{
var invalid = " "; // Invalid character is a space
var minLength = 8; // Minimum length
//var re = /^\w*(?=\w*[0-9])(?=\w*[a-z])(?=\w*[A-Z])\w*$/
//var re = /^\w*(?=\w*\d)(?=\w*[a-z])(?=\w*[A-Z])\w*$/
var re = /^.*(?=.*\d)(?=.*[a-z])(?=.*[^a-zA-Z0-9])(?=.*[A-Z]).*$/
var pw1 = document.profile.password.value;
var pw2 = document.profile.password2.value;


if(document.profile.FirstName.value=="")
 {
  alert("First name must be specified.")
   return false;
 }
if(document.profile.LastName.value=="")
  {
    alert("Last name must be specified.")
	return false;
  }
if(document.profile.Email.value=="")
  {
	alert("Email must be specified.")
	return false;
  }



// check for a value in both fields.
if (pw1 == '' || pw2 == '') {
alert('Please enter your password twice.');
return false;
}
// check for minimum length
if (document.profile.password.value.length < minLength) {
alert('Your password must be at least ' + minLength + ' characters long. Try again.');
return false;
}

if (!re.test(document.profile.password.value))
 {
  alert('Invalid password, please follow the standard password requirements.')
 return false;
 } 
 
// check for spaces
if (document.profile.password.value.indexOf(invalid) > -1) {
alert("Sorry, spaces are not allowed.");
return false;
}
else {
if (pw1 != pw2) {
alert ("Password didn't match. Please re-enter your password.");
return false;
}
else {
alert('Thank you.');
return true;
      }
   }
}

function validateRevProfile()
{
if(document.Revprofile.FirstName.value=="")
 {
  alert("First name must be specified.")
   return false;
 }
if(document.Revprofile.LastName.value=="")
  {
    alert("Last name must be specified.")
	return false;
  }
if(document.Revprofile.Email.value=="")
  {
	alert("Email must be specified.")
	return false;
  }

return true;
} 


 
 function validateapplicantinfo()
 {
   if(document.application.wname.value=="")
    {
	alert("Institution must be specified.")
	 return false;
	}
	
	 if(document.application.waddress.value=="")
    {
	alert("Work address must be specified.")
	 return false;
	}
	
	if(document.application.wcity.value=="")
    {
	alert("City where work is located must be specified.")
	 return false;
	}
	
	if(document.application.wnumber.value=="")
    {
	alert("Work number must be specified.")
	 return false;
	}	
	
	if(document.application.wfax.value=="")
    {
	alert("Work fax number must be specified.")
	 return false;
	}	
	
 if(document.application.haddress.value=="")
    {
	alert("Home address must be specified.")
	 return false;
	}
  if(document.application.hcity.value=="")
    {
	alert("City where home is located must be specified.")
	 return false;
	}
		
  if(document.application.hnumber.value=="")
   {
	alert("Home or Cell must be specified.")
	 return false;
   }
   
   if(document.application.doctoral.value=="")
   {
	alert("Doctoral degree must be specified.")
	 return false;
   }
   
   if(document.application.yearearned.value=="")
   {
	alert("Year earned must be specified.")
	 return false;
   }
   
   if(document.application.Field.value=="")
   {
	alert("Field of Degree must be specified.")
	 return false;
   }
   
    if(document.application.university.value=="")
   {
	alert("School or Ph.D. university must be specified.")
	 return false;
   }
   
    if(document.application.scity.value=="")
   {
	alert("School or Ph.D. city must be specified.")
	 return false;
   }
   
    if(document.application.residency.value=="")
   {
	alert("Residency location must be specified.")
	 return false;
   }
    if(document.application.rcity.value=="")
   {
	alert("Residency city must be specified.")
	 return false;
   } 
   
   
	
   return true;
 }
 
 function validatepreceptor()
 {
	if(document.preceptor.pfirst.value == "")
	 {
	  alert("Mentor's first name must be specified.")
	  return false;
	 }
	 if(document.preceptor.plast.value=="")
	  {
	   alert("Mentor's last name must be specified.")
	   return false;
	  }
	  if(document.preceptor.ptitle.value=="")
	   {
		alert("Mentor's title or position must be specified.")
		return false;
	   }
	    if(document.preceptor.pemail.value=="")
	   {
		alert("Mentor's email must be specified.")
		return false;
	   }
	   
	   if(document.preceptor.pwname.value=="")
	   {
		alert("Mentor's company name must be specified.")
		return false;
	   }
	    if(document.preceptor.paddress.value=="")
	   {
		alert("Mentor's address must be specified.")
		return false;
	   }
	    if(document.preceptor.pcity.value=="")
	   {
		alert("Mentor's city must be specified.")
		return false;
	   }
	   
	   if(document.preceptor.pnumber.value=="")
	   {
		alert("Mentor's work number must be specified.")
		return false;
	   }
	   
	  
	return true;
 }
 
 function validateproject()
 {
  if(document.project.program.value=="")
   {
	alert("Program must be specified.")
	return false
   }
   if(document.project.title.value=="")
    {
     alert("Title must be specified.")
	 return false;
	}
	if(document.project.classification.value=="")
	 {
	  alert("Classification must be specified.")
	  return false;
	 }
	if(document.project.inst.value=="")
	 {
	  alert("Institution must be specified.")
	  return false;
	 }
	 if(document.project.abstract.value=="")
	 {
	  alert("Abstract must be specified.")
	  return false;
	 }
	 
	return true;
 }
 
function filenamecheck(item)
{
  var validch1="abcdefghijklmnopqrstuvwxyz";
  var validch2="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  var validch3=".1234567890 ";
  var invalidch=",'-";
  var invalidfn="_";
  
  var i = item.lastIndexOf(".") ;
  if (i == -1 || item.substring(i,item.length).toLowerCase() != ".pdf")
  {
    alert ("The selected file is not a 'PDF'.") ;
	document.frm1.FILE1.focus();
    return false;
  }
 } 
 
 
 
 
 
 
 
 
 
 
-->