var u_site = '/hb'; function showPage(page, nivel) { if (nivel || nivel == 0) { // showSubMenu(nivel, true); } if (!page) { page = top.lastPage; } top.lastPage = page; var init = '_init_=1'; if (page.indexOf('?') > 0) { $('main').src = page + '&_init_=1'; } else { $('main').src = page + '?_init_=1'; } } function showSubMenu(nivel, change) { var submenu = dijit.byId('subMenu'); var menu = $('menucontainer'); if (!menu.nivelMenu) { menu.nivelMenu = '0101'; } $('menu' + menu.nivelMenu).className = ''; menu.nivelMenu = nivel; $('menu' + menu.nivelMenu).className = 'current'; submenu.href = u_site + '/submenu.jsf?nivel=' + ((change) ? '-1' : nivel); submenu.refresh(); } var alreadyClose = false; function logout() { executeAction("data", "LogOut"); if (!alreadyClose) { var va = window.open(u_site + "/closed.jsp"); } } function logoutMenu() { executeAction("data", "LogOut"); alreadyClose = true; window.open(u_site + "/closed.jsp"); } function logoutOnExpiration() { alreadyClose = true; executeAction("data", "LogOut"); window.open(u_site + "/closed.jsp"); } window.onunload = function () { logout(); } var count = true; var t; var wait = 300; var c = 0; function calTime() { c = 0; } function timedCount() { c = c + 1; t = setTimeout("timedCount()", 1000); if (wait == c) { logoutOnExpiration(); } } window.onload = function () { timedCount(); }