//
//  JavaScript for mark-evans-newsletter.php
//
function EnableSubmit()
	{
	//
	//  Enables and disables the submit button depending on whether entries have been made
	//
		if (document.frmBrochure["emailAddress"].value.length == 0)
		{
		document.frmBrochure["cmdSubmit"].disabled = true;
		document.frmBrochure["cmdSubmit"].title = "Please enter your email address";
		}
	else
		{
		document.frmBrochure["cmdSubmit"].disabled = false;
		document.frmBrochure["cmdSubmit"].title = "";
		}	
	}
	
function CheckEmail()
	{
  //
  //  Check contact address is valid
  //
	if (document.frmBrochure["emailAddress"].value.length > 0)
		{
		if (!emailCheck(document.frmBrochure["emailAddress"].value))
			{
			setTimeout('document.frmBrochure["emailAddress"].focus()',100);
			return false;
			}	
		}
  }

function OnLoad(strControlinError)
	{
	//
	//  Sets focus to the specified field
	//
	if (strControlinError.length > 0)
		document.frmBrochure[strControlinError].focus();
		
	}

function DownloadTrial()
	{
	//
	//  Kicks off the download
	//
	window.location.href="downloads/trialversion/restorationmanagertrial.exe";
	}