function CheckEmailForm(frm)
{
	// ---------------------------------------------------------------------------
	// --- Do we force them to provide their valid email address or just anything?
	// ---------------------------------------------------------------------------
	//if( !ValidateEmail(frm.FromName.value) ) 
	//if( frm.FromName.value == "" )
	if( frm.FromName.value == "" ) 
	{
	    alert("You must supply your e-mail address.");
		frm.FromName.focus();
	    return false;

	}
	else if( !ValidateEmail(frm.FromName.value) )
	{
		alert("You must supply your valid e-mail address.");
		frm.FromName.focus();
	    return false;
	}
	
	// -----------------------------------------------------------------
	// --- Now check each of the "to" emails to make sure they are valid
	// -----------------------------------------------------------------
	strToList = frm.ToName.value;

	// -------------------------------------------------	
	// --- Get each individual email address in the list
	// -------------------------------------------------	
	regExp = / |,/gi;
	strToList = strToList.replace(regExp, ";");
	regExp = /\x0a|\x0d/gi;
	strToList = strToList.replace(regExp, ";");
	regExp = /;+/gi;
	strToList = strToList.replace(regExp, ";");
	regExp = /^;/gi;
	strToList = strToList.replace(regExp, "");
	regExp = /;$/gi;
	strToList = strToList.replace(regExp, "");

	if( strToList == "" )
	{
		alert("You must supply at least one e-mail address to send to.");
		frm.ToName.focus();
		return false;
	}

	strToEmailArray = strToList.split(";");

	// Force them to enter only 5 email addresses
	if (strToEmailArray.length > 5)
	{
	    alert("A maximum of 5 recipient e-mail addresses are allowed.");
	    frm.ToName.focus();
	    return false;
	}
    
    for( var i=0; i < strToEmailArray.length; i++) 
	{
		if( !ValidateEmail(strToEmailArray[i]) )
		{
			alert( "Invalid e-mail address: " + strToEmailArray[i] );
			frm.ToName.focus();
			return false;
		}	
	}
	
	// If we've gotten this far, everything's valid!
	return true;
}

