<!--//

function validate_form(){
    if (document.login.user.value==null || document.login.user.value.length==0){
        alert("Please enter your account number.");
         document.login.user.focus();
         return false;
    }
    if (document.login.password.value==null || document.login.password.value.length==0){
        alert("Please enter your password.");
         document.login.password.focus();
         return false;
    }
    var hcb = /^503/;
    if(hcb.test(document.login.user.value) && document.login.user.value.length==8) {
        if(confirm('You will be redirected to the login page on Hawkeye Commodity Brokers Inc website.'))
            window.location="https://www.futuresorders.com/hcb/cgi-bin/GetFrames";
        return false;
    }
    var dch = /^501/;
    if(dch.test(document.login.user.value) && document.login.user.value.length==8) {
        if(confirm('You will be redirected to the login page on Discount Commodity House Inc website.'))
            window.location="https://www.futuresorders.com/dch/cgi-bin/GetFrames";
        return false;
    }
    if(document.login.user.value.toUpperCase() == 'TRIAL') {
        document.login.action = 'https://' + document.location.hostname + '/ticket/create/simtrade';
        document.login.request_uri.value = '/simtrade/cgi-bin/LCFrames';
    }

    document.login.submit();
    return true;
}

var hasFocus = false;
function getFocus(){
    hasFocus = true;
}
function keydown(){
    if (!hasFocus) {
        document.login.user.focus();
    }
}
//-->