window.addEventListener("load", function () {onload (); onload = null}, false); window.addEventListener("resize", onresize, false); function onload () { window.logout = true; // quickbar initialesieren cbInit(); document.getElementById ("close").className = "hidden"; top.setTitle = function (title) { top.cms_headline.document.getElementById ("title").innerHTML = "Spitfire - " + title; if (window.logout != top.cms_content.location.search.match (/tpl=welcome/)) { window.logout = top.cms_content.location.search.match (/tpl=welcome/); document.getElementById ("close").className = window.logout ? "hidden" : "coolButton"; document.getElementById ("logout").className = window.logout ? "coolButton" : "hidden"; document.getElementById ("navi").className = "hidden"; setTimeout (function () {document.getElementById ("navi").className = "quickbar";}, 0); } }; top.setTitle (""); } function onresize () { if (window.innerWidth<=24) { minimizeSidebar (window.innerWidth); } } function detatchSidebar () { var opener = top.getOpener (false); if (opener && opener.Action) { top.cms.sidebarDetatch = true; top.cms.windowOnunload = true; minimizeSidebar (); new opener.Action ().showWindow (top.cms_content.location.search); } } function minimizeSidebar (width) { var f1 = top.document.getElementById ("cms_frameset_1"); var f2 = top.document.getElementById ("cms_frameset_2"); if (width==undefined) { top.cms.sidebarWidth = f1.cols; } f1.cols="24,*"; f2.cols="0,*"; } function closeSidebar () { if (parent.cms_content.login) { top.location.href = parent.cms_site.location.href; } else { parent.cms_content.location.replace ("cont_index.php?tpl=welcome"); } } function logoutUser () { top.setProgress (true); var request = new Ajax ("../html/html_action.php", "action=logout"); request.onCompletion = function (response) { //d (response); var xml = document.createElement("xml"); xml.innerHTML = response; xml = xml.firstChild; top.location.href = xml && xml.getAttribute ('url') ? xml.getAttribute ('url') : "/"; } request.run (); }