function checkemail()
{

// check if the first email field is not empty
if (document.forms[0].email1.value == '')

    {
        alert ('Please enter a valid e-mail address.');
        return false;
    }

// check if the email addresses entered are identical
if (document.forms[0].email1.value != document.forms[0].email2.value)
    {
        alert ('The email addresses you entered are not identical, please check them.');
        return false;

    }


return true;

}