function validinput(myForm) { 
	message = ""						/* message buffer */
	t1 = 0								/* error found */
	email = myForm.contact_to.value	/* input email value */

	if (email =="" ) {					/* IS mail null */
		message += ( "\n * Please enter fried's email address")
		t1 = 1 
	}
/*	if (myForm.contact_spam.value != transpam ) {				
		message += ( "\n * Enter the validation code")
		t1 = 1 
	}
*/
    if ( t1 == 0 ) {					/* bypass if no email */
	  invalidchars = "/:,;"				/* invalid char in email check */
	  for ( i=0; i<invalidchars.length; i++ ) {
		notval = invalidchars.charAt(i)
		if (email.indexOf(notval,0) > -1 ) {
		message += ( "\n * " + notval + " is not a valid character in an email address \n")
		}
	  }
							/* @ found flag */
	  symbolcheck1 = "@"				/* check that one @ exists */
	  atposition1 = email.indexOf(symbolcheck1,1)
	  if ( atposition1 == -1 ) {
		message +=  (  "\n * " + email + " is not a valid as it does not have a '@' symbol ")
		t1 = 1
	  }
	  if (email.indexOf(symbolcheck1, atposition1+1) > -1 ) {
		message +=  ( "\n * " + email + " is not a valid as it has two '@' symbols in it ")
	  }

	  if ( t1 == 0 ) {		/* only do if @ has been found */
	    symbolcheck2 = "."		/* check that one . exists  after @ */
		atposition2 = email.indexOf(symbolcheck2,1)
		if ( atposition2 == -1 ) {
		   message += ( "\n * " + email + " is not a valid as it does not have a '.' ")
		}
	  } 
	  myForm.contact_mail.focus()
	  myForm.contact_mail.select() 
    }						/* end of no mail bypass */

	if (myForm.contact_from.value =="" ) {	/* sender area is null */
		message += ( "\n * Please enter your name.  This is used only as introduction to your friend")
		myForm.contact_from.focus()
		myForm.contact_from.select()
	}  
	
	if ( message != "" ) {
		message1 = "\nPlease correct the following errors found on the form.\n" + message
		alert (message1)
		return false
	}
return true	
}