function onload () { state.hasChanged = Array (); // quickbar initialesieren cbInit(); updateQuickbar (); showMessages (state.messages); top.setStatus (state.statusbar.value); showDots (); } 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) { if (state.quickbar.disabledButtons[name]) { document.getElementById (name).setEnabled (false); disableButtonsList[name] = true; } } if (window.location.href.match (/&listonline=true/)) { document.getElementById ("listAll").setActive (false); } } function update () { updateQuickbar (); top.setStatus (state.statusbar.value); } var active = 0; function select (id, onlineId) { if (id) { out (); if (active) { document.getElementById ("group_"+active).className = ""; } document.getElementById ("group_"+id).className = "marked"; state.statusbar.value = "# " + id; state.quickbar.disabledButtons['offline'] = (state.values[id]=='offline'); state.quickbar.disabledButtons['archive'] = (state.values[id]=='archive' || state.values[id]=='cut'); state.quickbar.disabledButtons['delete'] = (state.values[id]=='delete' || state.values[id]=='cut'); showDots (onlineId); } else { state.statusbar.value = ""; state.quickbar.disabledButtons['offline'] = true; state.quickbar.disabledButtons['archive'] = true; state.quickbar.disabledButtons['delete'] = true; showDots (); } active = id; activeOnlineId = onlineId; update (); } var overId = 0; function over (id) { out (); if (id != active) { document.getElementById ("group_"+id).className = "marked_hover"; overId = id; } } function out () { if (overId) { document.getElementById ("group_"+overId).className = ""; } overId = 0; } function reload () { top.reload (true); } function listAll () { if (window.location.href.match (/&listonline=true/)) { window.location.replace (window.location.href.replace (/&listonline=true/, "")); } else { window.location.replace (window.location.href + "&listonline=true"); } } function show (url) { var opener = top.getTopOpener (); if (opener && opener.top.cms) { opener.location.href = url; } } function showDots (id) { var opener = top.getOpener (); if (opener) { var ids = Array (); if (id) { for (var name in state.names) { ids.push ("cms_dot_"+id+"_"+name); } } new opener.Dot ().activate (ids); } } function offline () { // User auswählen top.setProgress (true); var request = new Ajax ("tpl_show_archive_action.php", "action=offline&id="+active); request.onCompletion = function (response) { eval (response); document.getElementById ("status_"+active).src = "images/"+state.values[active]+".png"; select (active, activeOnlineId); top.reload (); } request.run (); } function archive () { top.setProgress (true); var request = new Ajax ("tpl_show_archive_action.php", "action=archive&id="+active); request.onCompletion = function (response) { eval (response); document.getElementById ("status_"+active).src = "images/"+state.values[active]+".png"; select (active, activeOnlineId); top.reload (); } request.run (); } function del () { top.setProgress (true); var request = new Ajax ("tpl_show_archive_action.php", "action=del&id="+active); request.onCompletion = function (response) { eval (response); document.getElementById ("status_"+active).src = "images/"+state.values[active]+".png"; select (active, activeOnlineId); top.reload (); } request.run (); } function help () { top.setProgress (true); var request = new Ajax ("tpl_show_archive_action.php", "action=message&text=help text"); request.onCompletion = function (response) { showMessages ({0:{type : "info", text : response}}); top.setProgress (false); } request.run (); }