<!-- Javascript Email form with validation and confirmation -->
<!-- Copyright 1997 Clayton L. Wilson                       -->
<!-- All rights reserved.                                   -->
<!-- Visit the Website of ZOLIC
<!-- http://www.flash.net/~zolic/index.html                 -->
<!-- information is included.                               -->

<!-- Begin validation script
//----------------------------------------
// Clears field if the default value is there.
//----------------------------------------
function clear_field(field)
{
    if (field.value==field.defaultValue)
    {
        field.value=''
    }
}
//----------------------------------------
// Checks field to see if any information
// was entered. If not, the default value
// is reentered.
//----------------------------------------
function check_field(field)
{
    if (field.value=='' ||
    field.value==' ')
    {
        field.value=field.defaultValue
    }
}
//----------------------------------------
// Validates the form. If a field fails the
// validation, The form is not submitted.
//----------------------------------------
function validate_form()
{
//----------------------------------------

//----------------------------------------
// Validates the email field.
//----------------------------------------
    if (document.jsform.signupnewsletter.value==document.jsform.signupnewsletter.defaultValue)
    {
        alert('\nNo email address entered.')
        document.jsform.signupnewsletter.select()
        document.jsform.signupnewsletter.focus()
        return false
    }
        if (document.jsform.signupnewsletter.value.indexOf('@',0)==-1 ||
        document.jsform.signupnewsletter.value.indexOf('.',0)==-1)
        {
            alert('\nInvalid email address.')
            document.jsform.signupnewsletter.select()
            document.jsform.signupnewsletter.focus()
            return false
        }
//----------------------------------------

//----------------------------------------
// Prompts user for confirmation
//----------------------------------------
//    else
//    {
//        if(confirm('\nClick the OK button to send this form via email.'))
//        {
//            return true
//        }
//        else
//        {
//            return false
//        }
//    }
}
//----------------------------------------
// End of validation script -->
