// JavaScript Document
<!--
form_submitted=false
function ValidateEmail(theinput)
{
	s=theinput.value
	if(s.search)
	{
		return (s.search(new RegExp("^([-!#$%&'*+./0-9=?A-Z^_`a-z{|}~])+@([-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+\\.)+[a-zA-Z]{2,4}$","gi"))>=0)
	}
	if(s.indexOf)
	{
		at_character=s.indexOf('@')
		if(at_character<=0 || at_character+4>s.length)
			return false
	}
	if(s.length<6)
		return false
	else
		return true
}

function ValidateForm(theform)
{
	if(theform['rec_first_name'].value=='')
	{
		if(theform['rec_first_name'].focus)
			theform['rec_first_name'].focus()
		alert("Please enter the recipient's First Name")
		form_submitted=false
		return false
	}
	if(theform['rec_last_name'].value=='')
	{
		if(theform['rec_last_name'].focus)
			theform['rec_last_name'].focus()
		alert("Please enter the recipient's Last Name")
		form_submitted=false
		return false
	}
	if(ValidateEmail(theform['rec_email'])==false)
	{
		if(theform['rec_email'].focus)
			theform['rec_email'].focus()
		alert('Please enter a valid e-mail address for the recipient')
		form_submitted=false
		return false
	}
	if(theform['sender_first_name'].value=='')
	{
		if(theform['sender_first_name'].focus)
			theform['sender_first_name'].focus()
		alert('Please enter your First Name')
		form_submitted=false
		return false
	}
	if(theform['sender_last_name'].value=='')
	{
		if(theform['sender_last_name'].focus)
			theform['sender_last_name'].focus()
		alert('Please enter your Last Name')
		form_submitted=false
		return false
	}
	if(ValidateEmail(theform['sender_email'])==false)
	{
		if(theform['sender_email'].focus)
			theform['sender_email'].focus()
		alert('Please enter a valid e-mail address for the sender')
		form_submitted=false
		return false
	}
	/*if(theform['comments'].value=='')
	{
		if(theform['comments'].focus)
			theform['comments'].focus()
		alert('Please enter your Comments')
		form_submitted=false
		return false
	}*/
	
	return true
}