// Functions related to user authentication function cookiesAreEnabled() { // Test whether cookies are enabled by attempting to set a cookie and then // change its value var c = "areYourCookiesEnabled=0"; document.cookie = c; var dc = document.cookie; // Cookie not set? Fail if (dc.indexOf(c) == -1) return 0; // Change test cookie c = "areYourCookiesEnabled=1"; document.cookie = c; dc = document.cookie; // Cookie not changed? fail if (dc.indexOf(c) == -1) return 0; // Delete cookie document.cookie = "areYourCookiesEnabled=; expires=Thu, 01-Jan-70 00:00:01 GMT"; return 1; } function setLoginVars() { // Indicate if JS is enabled document.getElementById('js_enabled').value = 1; // Indicate if cookies are enabled document.getElementById('cookies_enabled').value = cookiesAreEnabled(); // Copy login and password length to alternative vars since current vars will // be removed from the request by zope's authentication mechanism. document.getElementById('login_name').value = document.getElementById('__ac_name').value; password = document.getElementById('__ac_password'); emptyPassword = document.getElementById('pwd_empty'); if (password.value.length==0) emptyPassword.value = '1'; else emptyPassword.value = '0'; } function showLoginForm() { // Hide the login link. var loginLink = document.getElementById('loginLink'); loginLink.style.display = "none"; // Displays the login form. var loginFields = document.getElementById('loginFields'); loginFields.style.display = "inline"; } function switchLanguage(selectWidget) { var language = selectWidget.options[selectWidget.selectedIndex].value; window.location = "/config/changeLanguage?language=" + language; } var isIe = (navigator.appName == "Microsoft Internet Explorer"); function getElementsHavingName(tag, name) { if (!isIe) return document.getElementsByName(name); var elems = document.getElementsByTagName(tag); var res = new Array(); for (var i=0; i<\/div>"; } if (xhrObjects[pos].xhr.readyState == 4) { // We have received the HTML chunk var hookElem = document.getElementById(hook); if (hookElem && (xhrObjects[pos].xhr.status == 200)) { hookElem.innerHTML = xhrObjects[pos].xhr.responseText; // Call a custom Javascript function if required if (xhrObjects[pos].onGet) { xhrObjects[pos].onGet(xhrObjects[pos], hookElem); } // Eval inner scripts if any. var innerScripts = getElementsHavingName('div', 'appyHook'); for (var i=0; i