3 date.setTime(date.getTime() - 86400000);
4 document.cookie = ("0xHIGHFLYxSOGo-0.9=discard; path=/"
5 + "; expires=" + date.toGMTString());
6 var submit = $("submit");
7 Event.observe(submit, "click", onLoginClick);
9 var userName = $("userName");
12 var image = $("preparedAnimation");
13 image.parentNode.removeChild(image);
16 function onLoginClick(event) {
17 startAnimation($("loginButton"), $("submit"));
19 var userName = $("userName").value;
20 var password = $("password").value;
22 if (userName.length > 0) {
23 var url = ($("connectForm").getAttribute("action")
24 + "?userName=" + userName
25 + "&password=" + password);
27 triggerAjaxRequest(url, onLoginCallback);
30 preventDefault(event);
33 function onLoginCallback(http) {
34 if (http.readyState == 4) {
35 if (isHttpStatus204(http.status)) {
36 window.location.href = ApplicationBaseURL + $("userName").value;
41 addEvent(window, 'load', initLogin);