﻿function viewWin(filename) {
    var mybars = 'width=1025,height=550,directories=no,location=no,menubar=no,status=no,screenX=0,screenY=0';
    mybars += ',titlebar=no,toolbar=no';
    myoptions = 'scrollbars=yes,resizeable=yes';
    myfeatures = mybars + ',' + myoptions
    var newin = open(filename, 'mydoc', myfeatures);
}

function validateEmailAddress(email_address) {
    // This function is used to validate a given e-mail 
    // address for the proper syntax
    if (email_address == "") {
        return false;
    }
    badStuff = ";:/,' \"\\";
    for (i = 0; i < badStuff.length; i++) {
        badCheck = badStuff.charAt(i)
        if (email_address.indexOf(badCheck, 0) != -1) {
            return false;
        }
    }
    posOfAtSign = email_address.indexOf("@", 1)
    if (posOfAtSign == -1) {
        return false;
    }
    if (email_address.indexOf("@", posOfAtSign + 1) != -1) {
        return false;
    }
    posOfPeriod = email_address.indexOf(".", posOfAtSign)
    if (posOfPeriod == -1) {
        return false;
    }
    if (posOfPeriod + 2 > email_address.length) {
        return false;
    }
    return true
}


