var top = 60; var left = 60; var guiColor = {transparency: 50, color: "#c5dfff"}; //#0072ff var topWin = null; //var wmanager = new UI.WindowManager({container: 'wmanager'}); function setGUIColor(transparency, color) { var elementsA = document.getElementsByClassName("dwmBG"); var elementsB = document.getElementsByClassName("dwmInteractiveBG"); var expire = ""; guiColor = {transparency: transparency, color: color}; for(var i in elementsA) { try { setGUIColorOnWindow(elementsA[i]); } catch(e) {} } for(var i in elementsB) { try { setGUIColorOnWindow(elementsB[i]); } catch(e) {} } expire = new Date((new Date()).getTime() + 168 * 3600000); expire = "; expires=" + expire.toGMTString(); document.cookie = "GUI-COLOR" + "=" + escape(transparency+':'+color) + expire; } function setGUIColorOnWindow(window) { window.style.backgroundColor = guiColor.color; wd_Div().stealFrom(window).setTransparency(guiColor.transparency); if(window.id == "Menu_Leiste_DWM") wd_Div().stealFrom(window).setTransparency(guiColor.transparency / 2); return window; } function position(width, height) { top += 20; left += 20; if (top + height > wd_getWindowSize("height") - 30) top = 20; if (left + width > wd_getWindowSize("width") - 170) left = 20; } function openWindow(url, icon, title, width, height) { var winWidth = Number(wd_getWindowSize("width")) - 124; var maxWindows = winWidth / 64; windowCount = windowCount + 1; if(windowCount >= maxWindows) { windowCount = Number(windowCount) - 1; alert("Ihre Fensterbreite erlautb keine weiteren Fenster!"); } else { position(width, height); var win = new UI.URLWindow({ theme: "seven", top: top, left: left, width: width, height: height, url: url, shadow: true, shadowTheme: "sevenShadow", windowManager: wmanager }); win.header.update("
" + title + "
"); win.show(); win.activate(); win.observe('destroyed', function(event) { wd_removeWindow(Event.element(event).identify()); }); win.observe('toogleFold', function(event) { wmanager.getWindow(Event.element(event).identify()).blur(); }); win.observe('blurred', function(event) { document.getElementById("Program_"+ wd_shortifyWinID(Event.element(event).identify())).className = "Program_InAktiv"; }); win.observe('focused', function(event) { document.getElementById("Program_"+ wd_shortifyWinID(Event.element(event).identify())).className = "Program_Aktiv"; }); topWin = win; windowURLs[win.id] = url; if(windowGroups[url]) { windowGroups[url] = windowGroups[url] + 1; } else { windowGroups[url] = 1; } //alert("Es gibt schon " + windowGroups[url] + " Fenster mit URL:"+ url); windowTitles[win.id] = title; top += 20; left += 20; wd_stopMenuHide(); // document.getElementById("Menu_Programms").innerHTML= programms + '
' + '' + "
"; document.getElementById("Menu_Programms").innerHTML += '
' + '' + "
"; } return false; } function gaestebuch(seite) { url = (seite) ? "/Gaestebuch.php?seite=" + seite : "/Gaestebuch.php"; openWindow(url, "Gästebuch", 650, 400); } function blog(zeige) { url = (zeige) ? "/Blog.php?zeige=" + zeige : +"/Blog.php"; openWindow(url, "Windoof Blog", 750, 450); }