// Function to allow one JavaScript file to be included within another
function Fetch_pepScript(jsFile)
{
  document.write('<script type="text/javascript" src="'
    + jsFile + '"> </script>'); 
}

Fetch_pepScript('/pammsguides/kka_links01/pg_scripts/chk_email_address.js');

function countchar(passedVal)

// *************************************************************
// COUNT NUMBER OF CHARACTERS. Note a two (2) is hard coded as min length
// ************************************************************* 
{
	var jj = 0
	for (i=0; i<passedVal.length; i++)
{
	if (passedVal.charAt(i) == "\s*") jj++;
}

// alert(+ passedVal.length + " value of passed length is")
	if (passedVal.length >= 2)
	return true;
		else
	return false; 
}
// *************************************************************
// SUBMIT FORM called check_email.js
// Modified by PEP 2nd October, 2006
// *************************************************************

function check_email(emailform)
{
	// Check persons name

	if(!countchar(emailform.senders_name.value))
{
	alert("You must enter your name or nickname. Please re enter ")
	emailform.senders_name.focus()
	emailform.senders_name.select()
	return false
}

if (!emailCheck(emailform.mailfrom.value))
{
//	alert("You must enter a valid email address. Please re enter ")
	emailform.mailfrom.focus();
	emailform.mailfrom.select();
	return false;
}

if((emailform.mailtarget.value.length < 15))  // this is the senders message
{
alert(" Sorry, not enough words for an interpretable message. \nPlease, check your message box...");
return false; } 

} // end of file
