// Note: we do not heed to try other interfaces since we don't support IE 6 or // lower. If we need to support other interfaces later, we can add them. // --CT function get_http_request_object(){ if (typeof XMLHttpRequest == undefined){ return false; } else { return new XMLHttpRequest(); } } function submit_form() { var http = get_http_request_object(); var username = document.login.login.value; var password = document.login.password.value; http.open("get", 'login.pl?action=authenticate&company=' + document.login.company.value, false, username, password); http.send(""); if (http.status != 200){ alert("Access Denied: Bad username/Password"); return false; } document.location = document.login.action + "?action=login&company="+ documnet.login.company.value; } function check_auth() { var http = get_http_request_object(); var username = "admin"; var password = document.login.password.value; http.open("get", "login.pl?action=authenticate&company=" + document.login.company.value, false, username, password ); } function setup_page(login_label, password_label) { var credential_html; var cred_div = document.getElementById("credentials"); credential_html = '
' + '
' + '" + '
' + '
' + '' + '
' + '
' + '
' + '
' + '' + '
' + '
' + '' + '
' + '
'; if (!document.login.blacklisted.value && get_http_request_object()){ cred_div.innerHTML = credential_html; document.login.login.focus(); } else { document.login.company.focus(); } }