     function validate(sendButton)
    {
        /*
            Some dimple validation to ensure name and email fields contain a value
            and that the email is valid.  A message is built 'on the fly' and if it
            is not blank by the end, it is displayed.
                                                        */
        var failName = false;
        var failEmail = false;
        var failFormat = false;
        var obj = eval(document.emailForm);
        var message = "";

        if (obj.contName.value == '')
        {
            failName = true;
        }

        if (obj.contEmail.value == '')
        {
            failEmail = true;
        }
        else
        {
            if (!emailValidate(obj.contEmail.value))
            {
                failFormat = true;
            }
        }

        // Act upon the previous validations
        if (failName)
        {
            message += "Please enter your details in the name field";
        }
            
        if (failEmail)
        {
            if (!message == "")
            {
                message += "\nand a valid email address in the email field";
            }
            else
            {
                message += "Please enter your email address in the email field"
            }
        }
            
        if (failFormat)
        {
            if (!message == "")
            {
                message += "\nand a valid formatted email address";
            }
            else
            {
                message += "Please enter a valid formatted email address";
            }
        }
            
        if (!message == "")
        {
            // We've had a problem
               alert(message);
        }
        else
        {
            submitEmail('emailForm', sendButton);
        }
    }
	
	function submitEmail(objName, buttName)
	{
		document.emailForm.submit();
	}
	
    function emailValidate(thisEmail)
    {
        /*
            Very simple email validation.  The email field must conform to the following.
            1) Must contain the @ symbol
            2) Must contain the . symbol
            3) . symbol must appear after @
        */
        var OK = false;
        var atPos = thisEmail.indexOf("@");
        var pipPos = thisEmail.lastIndexOf(".", thisEmail.length);
		
        if (atPos > 0)
        {
            if (pipPos > 0)
            {
                if (pipPos > atPos)
                {
                    OK = true;
                }
            }
        }
        
        return OK;
    }
