function addWindowListItem(wid,img3){var li=document.createElement("li");li.className="windowlist-li",li.id="windowlistitem"+wid;var a=document.createElement("a");function hideWindowList(){document.getElementById("open_windows_list").className=""}a.id="windowlistitemlink"+wid,a.onmouseover=function(e){e.ctrlKey&&client._window_set_focus(client.id_to_window[wid])},a.onclick=function(e){$(e.target).hasClass("menu-content-right")||(client.id_to_window[wid].minimized?client.id_to_window[wid].toggle_minimized():client._window_set_focus(client.id_to_window[wid]),this.parentElement.parentElement.className="-hide")};var divLeft=document.createElement("div");divLeft.id="windowlistdivleft"+wid,divLeft.className="menu-divleft";var img2=new Image;img2.id="windowlistitemicon"+wid,img2.src="favicon.png",img2.className="menu-content-left",divLeft.appendChild(img2);var img4=document.createElement("div");img4.appendChild(document.createTextNode(img3)),img4.id="windowlistitemtitle"+wid,img4.className="menu-content-left",divLeft.appendChild(img4);var divRight=document.createElement("div");divRight.className="menu-divright";img2=new Image;img2.id="windowlistitemclose"+wid,img2.src="icons/close.png",img2.title="Close",img2.className="menu-content-right",img2.onclick=function(e){client._window_closed(client.id_to_window[wid]),e.stopPropagation(),hideWindowList()};img3=new Image;img3.id="windowlistitemmax"+wid,img3.src="icons/maximize.png",img3.title="Maximize",img3.onclick=function(e){client.id_to_window[wid].toggle_maximized(),e.stopPropagation(),hideWindowList()},img3.className="menu-content-right";img4=new Image;img4.id="windowlistitemmin"+wid,img4.src="icons/minimize.png",img4.title="Minimize",img4.onclick=function(e){client.id_to_window[wid].toggle_minimized(),e.stopPropagation(),hideWindowList()},img4.className="menu-content-right",divRight.appendChild(img2),divRight.appendChild(img3),divRight.appendChild(img4),a.appendChild(divLeft),a.appendChild(divRight),li.appendChild(a),document.getElementById("open_windows_list").appendChild(li)}function removeWindowListItem(element){element=document.getElementById("windowlistitem"+element);element&&element.parentNode&&element.parentNode.removeChild(element)}$(function(){var float_menu=$("#float_menu");float_menu.draggable({cancel:".noDrag",containment:"window",scroll:!1}),float_menu.on("dragstart",function(ev,ui){client.mouse_grabbed=!0}),float_menu.on("dragstop",function(ev,ui){client.mouse_grabbed=!1,client.toolbar_position="custom",client.reconfigure_all_trays()})});