function email_signup_submit(original_email, theform)
{
    // If is an Intrasight user (with id), and is the matching email 
    if(theform.elements['id'].value > 0 && theform.elements['email'].value == original_email)
    {
        theform.action = 'http://clients.intrasight.net/hvcb/subscription/manage.aspx';
    }
    // If has no Intrasight user id, and is the matching email 
    else if(theform.elements['id'].value == '' && theform.elements['email'].value == original_email)
    {
        theform.action = 'http://clients.intrasight.net/hvcb/subscription/subscribe.aspx';
    }
    // if no email specified
    else if(theform.elements['email'].value == '' || theform.elements['email'].value == 'Enter Email Address')
    {
        theform.elements['id'].value = '';
        theform.email.value = '';
        theform.action = 'http://clients.intrasight.net/hvcb/subscription/subscribe.aspx';
    }
    // if new email, then lookup id
    else
    {
        // trim
        var s = theform.elements['email'].value;
        s = s.replace(/^\s+/, '').replace(/\s+$/, '');
        theform.elements['email'].value = s;

        window.status = 'Please wait while we get your information...';
        var result_str = doSjaxCall('GetIntrasightID', [ theform.email.value ]);
        window.status = '';
        var result_array = result_str.split('::');
        var intrasight_id = result_array[0];
        var result = result_array[1];

        if (false == result) {
            alert(intrasight_id);    // the message
            return;
        }

        if (intrasight_id > 0)
        {
            theform.elements['id'].value = intrasight_id;
            theform.action = 'http://clients.intrasight.net/hvcb/subscription/manage.aspx';
        }
        else
        {
            theform.elements['id'].value = '';
            theform.action = 'http://clients.intrasight.net/hvcb/subscription/subscribe.aspx';
        }
    }

    var signup = window.open('about:blank','signup','resizable=yes,scrollbars=yes,width=750,height=480');

    return true;
}
