// JavaScript for 'email this page' feature
function chkForm(Frm)
{
	var AlertMsg = '';
	var GoAhead=1;
	
	if (Frm.EmailTo.value=='')
	{AlertMsg=AlertMsg+'You must enter a valid recipient\'s email address.\n';GoAhead=0;}
	if (Frm.EmailFrom.value=='')
	{AlertMsg=AlertMsg+'You must provide a valid email address.\n';GoAhead=0;}
	
	if (GoAhead==0)
	{alert(AlertMsg);return false;}
	else
	{return true;}
}
// JavaScript for 'Contact Us' feature
function chkContactFrm(Frm)
{
	var GoAhead = 0;
	for (i=0; i<Frm.Reason.length;i++) {
		if (Frm.Reason[i].checked) GoAhead = 1;
	}
	if (GoAhead==0)
	{alert('Please indicate the reason for contacting us\nbefore submitting the form.');return false;}
	else
	{return true;}
}
// JavaScript for 'Contact Us' feature pg. 2
function chkContactDtlFrm(Frm)
{
	var GoAhead = 1;
	var AlertMsg = '';
	var referrerValue = '';
	
	if(Frm.skipOnSubmit.value == "1") { return true; }
	
	if(Frm.Email.value == '') {
		AlertMsg += 'Please enter your email address.\n';
		GoAhead = 0;
	}
	if(Frm.Comment.value == '') {
		AlertMsg += 'Please enter a comment or question.\n';
		GoAhead = 0;
	}
	if(Frm.referrer) { 
		for (i=0; i<Frm.referrer.length; i++) {
			if (Frm.referrer[i].checked) {referrerValue = Frm.referrer[i].value;}
		}
		if (referrerValue=='other' && Frm.otherdetails.value=='')
		{AlertMsg = AlertMsg + 'Please give us details of the way\nin which you learned about this site.\n';GoAhead=0;}
	}
	//if (Frm.Comment.value=='')
	//{AlertMsg = AlertMsg + 'Please enter a comment.\n';GoAhead=0;}

	if (GoAhead==0)
	{alert(AlertMsg);return false;}
	else
	{return true;}
}
function suppressOnSubmit(Frm)
{
	Frm.skipOnSubmit.value = "1";
	//Frm.onsubmit = "return true;";
	//return true;
}
