function onload () { // Tips initialesieren initTips (); // quickbar initialesieren cbInit(); updateQuickbar (); showMessages (state.messages); top.setStatus (state.statusbar.value); var opener = top.getOpener (); if (opener) { new opener.Dot ().activate (); } } function onresize () { if (obj = document.getElementById ("scroll")) { obj.className = "content_hidden"; obj.style.width = obj.parentNode.offsetWidth; obj.style.height = obj.parentNode.offsetHeight; obj.className = "content"; } } function focus () { top.focus (); } var disableButtonsList = Array (); function updateQuickbar () { for (var name in disableButtonsList) { document.getElementById (name).setEnabled (true); } disableButtonsList = Array (); for (var name in state.quickbar.disabledButtons) { // console.log (name); if (state.quickbar.disabledButtons[name]) { document.getElementById (name).setEnabled (false); disableButtonsList[name] = true; } } } var tipList; var actualTip; function initTips () { top.setProgress (true); var request = new Ajax ("tpl_welcome_action.php", "action=tips"); request.onCompletion = function (response) { xml = document.createElement("xml"); xml.innerHTML = response; tipList = xml.firstChild.childNodes; var pos = document.cookie.replace (/.*(^|; )tip=([^;]*).*|.*/, "$2")*1; actualTip = (pos && tipList[pos+1]) ? pos+1 : 0; showTip () } request.run (); } function showTip () { document.getElementById ("tip").innerHTML = tipList[actualTip].innerHTML; state.quickbar.disabledButtons['previous'] = !(actualTip > 0); state.quickbar.disabledButtons['next'] = !(actualTip+1 < tipList.length); updateQuickbar (); document.cookie = "tip=" + actualTip; } function previous () { if (actualTip > 0) { actualTip--; } showTip () } function next () { if (actualTip+1 < tipList.length) { actualTip++; } showTip () } function tickets () { top.cms_content.location.replace ("cont_index.php?tpl=ticket"); } function changes () { window.location.href = window.location.pathname + "?tpl=show_changes"; } function systemSettings () { window.location.href = window.location.pathname + "?tpl=system_settings"; } function userManagement () { window.location.href = window.location.pathname + "?tpl=user_management"; } function settings () { window.location.href = window.location.pathname + "?tpl=user_settings"; } function backup () { window.location.href = window.location.pathname + "?tpl=backup"; } function i18n () { window.location.href = window.location.pathname + "?tpl=i18n_settings"; } function help () { window.open (state.help, "cms_manual", "toolbar=no,location=no,status=no,scrollbars=no,resizable=yes"); } function delErrors () { top.setProgress (true); var request = new Ajax ("tpl_welcome_action.php", "action=delErrors"); request.onCompletion = function (response) { top.setProgress (false); } request.run (); } function update () { updateQuickbar (); top.setStatus (state.statusbar.value); } function swapEditMode () { var opener = top.getOpener (true); if (opener) { var act = new opener.Action (); act.request (0, "swapEditMode"); } } function reload () { top.reload (true); } function logout () { top.setProgress (true); var request = new Ajax ("tpl_welcome_action.php", "action=logout"); request.onCompletion = function (response) { //d (response); top.location.href = "/"; } request.run (); } function closeSitebar () { top.location.href = "/"; } function showSidebar () { parent.document.body.cols="320,*"; }