<!--Hide
function validEmail1(email1) {       				 //VALIDATION OF FORM
	invalidChars = " /:,;"

	if (email1 == "") {							// Must be filled in
		return false
	}
	for (i=0; i<invalidChars.length; i++) {		// Check to see if it contains illegal characters
		badChar = invalidChars.charAt(i)
		if (email1.indexOf(badChar,0)> -1) {
			return false
		}
	}
	atPos = email1.indexOf("@",1)				// There must be one "@" symbol
	if (atPos == -1) {
		return false
	}
	if (email1.indexOf("@",atPos+1) != -1) {		// And only one "@" symbol
		return false
	}
	periodPos = email1.indexOf(".",atPos)
	if (periodPos == -1) {						// And at least one "." after the "@"
		return false
	}
	if (periodPos+3> email1.length)	{			// Must be at least 2 characters after the "."
		return false
	}
	

return true;	

}

function validEmail2(yemail) {       				 //VALIDATION OF FORM
	invalidChars = " /:,;"

	if (yemail == "") {							// Must be filled in
		return false
	}
	for (i=0; i<invalidChars.length; i++) {		// Check to see if it contains illegal characters
		badChar = invalidChars.charAt(i)
		if (yemail.indexOf(badChar,0)> -1) {
			return false
		}
	}
	atPos = yemail.indexOf("@",1)				// There must be one "@" symbol
	if (atPos == -1) {
		return false
	}
	if (yemail.indexOf("@",atPos+1) != -1) {		// And only one "@" symbol
		return false
	}
	periodPos = yemail.indexOf(".",atPos)
	if (periodPos == -1) {						// And at least one "." after the "@"
		return false
	}
	if (periodPos+3> yemail.length)	{			// Must be at least 2 characters after the "."
		return false
	}
	

return true;	

}



function checkfriends(form){

                 
     if (form.permessage.value == "") {
                 alert("Please provide a message for your friend.  Thank you.");
                 form.permessage.focus();
                 return false;
            }   
            
                 
      else if (!validEmail2(form.yemail.value)) {
	      alert("Please enter your valid e-mail address.  Thank you.");
	      form.yemail.focus();
	      return false;
      
      }
      
      
      else if (!validEmail1(form.email1.value)) {
	      alert("Please enter your friend's valid e-mail address.  Thank you.");
	      form.email1.focus();
	      return false;
	  		
              }
               
	     	   
	        
	   return true; 	
       
  }   
  
//End Hide-->

