//// Email Validation Routines  //////////////

function checkForm()
{
var emailFilter=/^.+@.+\..{2,3}$/;
var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/

	if (document.rhContact.name.value=='')
	{
		//name is blank
		alert('Please enter your name');
		return false;
	}
	else if (document.rhContact.email.value=='')
	{
		//email is blank
		alert('Please enter your email address');
		return false;
	}
	else if (!(emailFilter.test(document.rhContact.email.value)))
	{
		//email is invalid
		alert('The email address does not appear to be valid');
		return false;
	}
	else if (document.rhContact.email.value.match(illegalChars))
	{
		//email contains illegal characters
		alert('The email address contains illegal characters');
		return false;
	}
	else if ((document.rhContact.security.value != 'hot') || (document.rhContact.security.value-=''))
	{
		//security answer is blank or incorrect
		alert('Security Question not answered correctly.');
		return false;
	}
	// If the script gets this far through all of your fields
	// without problems, it's ok and you can submit the form

	return true;
}


//// Add to Favorites ///////////

 
function addToFavorites() 
{
var urlAddress = "http://www.mediahotseat.com/index.html"; 
var pageName = "The Media Hot Seat";
 if (window.external) { window.external.AddFavorite(urlAddress,pageName) 
} else { alert("Sorry! Your browser doesn't support this function."); 
} }
