"use strict"; //const { contextmenu } = require("modernizr"); function content_is_loaded(elem) { var elem_parent = null; var window_id = null; var win_id_attr = null; var contents_container = null; elem_parent = elem; //alert(elem_parent.outerHTML); window_id = elem_parent.getAttribute("data-window_id"); if (typeof window_id == "string" && window_id.length > 0 && window_id != null) { //alert(window_id); //console.log("window " + window_id + " is loaded"); contents_container = document.getElementById((window_id + "_tbl_0000_tr_0001_td_0000")); if (contents_container != null) { //contents_container.innerHTML = "
"; } } else { return false; } } function set_window_status(win_id, txt) { var win_status_box_id = null; var status_box = null; var status_txt = null; //alert("test"); status_txt = txt; win_status_box_id = win_id + "_window_status"; status_box = document.getElementById(win_status_box_id); //status_box.style.borderStyle = "solid"; //status_box.style.borderWidth = "1px"; //status_box.style.borderColor = "blue"; if (status_box != null) { if (status_txt.length > 40) { status_txt = status_txt.substring(0, 37); status_txt = status_txt + "..."; } status_box.innerText = status_txt; } } function save_window_params(win_id) { var win = null; win = document.getElementById(win_id); win.setAttribute("data-orig_x", parseFloat(win.style.left)); win.setAttribute("data-orig_y", parseFloat(win.style.top)); win.setAttribute("data-orig_w", parseFloat(win.style.width)); win.setAttribute("data-orig_h", parseFloat(win.style.height)); } function fade_in_all_windows() { //alert("fade in"); var web_windows = null; var win = null; var win_length = null; var win_id = null; var i = null; web_windows = document.getElementsByName("web_window"); win_length = parseFloat(web_windows.length); if (win_length > 0) { for (i = 0; i < win_length; i++) { //alert(web_windows[i].outerHTML); win = web_windows[i]; win_id = win.id; global_fade_in_timer_id = setTimeout("fade_in('" + win_id + "');clearTimeout(global_fade_in_timer_id);", (parseFloat(i * 3) + 1)); } } } function populate_web_windows() { var web_window_tds = null; var td_content_container = null; var win_id = null; var td_id = null; var web_td_name = null; var win_count = null; var i = null; var serial = null; var td_obj = null; var L = null; var T = null; var W = null; var H = null; var title_txt = null; web_td_name = "web_window_container"; web_window_tds = document.getElementsByName(web_td_name); if (web_window_tds != null) { win_count = parseFloat(web_window_tds.length); if (win_count > 0) { title_txt = "Window: "; for (i = 0; i < win_count;i++) { td_content_container = web_window_tds[i]; td_id = td_content_container.id; serial = 10000; serial = serial + i; serial = serial.toString(); serial = serial.substring(1, parseFloat(serial.length)); win_id = "window_" + serial; console.log("Creating web window: " + win_id); //make window - send td object and win_id to a function that uses them to create arguments for making a new web window //make_new_window(win_id, L, T, W, H, title) L = parseFloat(td_content_container.offsetLeft); T = parseFloat(td_content_container.offsetTop); W = parseFloat(td_content_container.clientWidth); H = parseFloat(td_content_container.scrollHeight); make_new_window(win_id, L, T, W, H, (title_txt + i.toString())); //alert(""); //global_load_web_win_timer_id = setTimeout("make_new_window(\"" + win_id + "\"", L, T, W, H, "\"" + title_txt + i + "\");clearTimeout(global_load_web_win_timer_id);", ((i + 1) * 200)); } } } } function make_content_selectable() { var content_boxes = null; content_boxes = document.getElementsByName("contents_div"); if (content_boxes != null) { for (i = 0; i < content_boxes.length; i++) { //content_boxes[i].setAttribute("draggable", "true"); //content_boxes[i].setAttribute("onselectstart", "this.focus"); //content_boxes[i].setAttribute("onselect", "this.focus()"); //content_boxes[i].setAttribute("ondragstart", "this.focus"); //content_boxes[i].setAttribute("ondrag", ""); //alert("m00"); } } } /* function mouseoutside_content(c) { global_mouseover_content = false; if (global_mouseover_content === false) { // disable any elements from select, focus, drag console.log("Mouse is Outside Window Content Container"); event.preventDefault(); event.stopPropagation(); event.returnValue = false; } } function mouseover_content(c) { global_mouseover_content = true; if (global_mouseover_content === true) { // do nothing console.log("Mouse is Over Window Content Container"); } } function mousemove_over_content(c) { if (global_mouseover_content === true) { //do nothing } else { event.preventDefault(); event.stopPropagation(); event.returnValue = false; } } */ /* function cascade_all_windows() { var wins = []; var win_obj = null; var is_maximized = null; var is_minimized = null; var all_cascaded = null; var window_collection_name = null; var i = null; var win_state = null; var window_id = null; window_collection_name = "web_window"; wins = document.getElementsByName(window_collection_name); //alert(); if (wins != null) { if (wins.length > 0) { for (i = 0; i < wins.length; i++) { win_obj = wins[i]; is_maximized = win_obj.getAttribute("data-is_maximized"); is_minimized = win_obj.getAttribute("data-is_minimized"); win_state = win_obj.getAttribute("data-window_state"); if (is_maximized == "true") { // } if (is_minimized == "true") { // } if (win_state != "Cascade") { // } } } } } */ function time_stamp() { var d_now = null; var y = null; var mo = null; var d = null; var h = null; var mi = null; var s = null; var ms = null; var ts = null; d_now = new Date(Date.now()).getTime(); d_now = d_now.toString(); /* y = d_now.getFullYear(); y = y.toString(); ts = y; mo = d_now.getMonth(); mo = mo.toString(); ts = ts + "." + mo; d = d_now.getDay(); d = d.toString(); ts = ts + "." + d; h = d_now.getHours(); h = h.toString(); ts = ts + "." + h; mi = d_now.getMinutes(); mi = mi.toString(); ts = ts + "." + mi; s = d_now.getSeconds(); s = s.toString(); ts = ts + "." + s; ms = d_now.getMilliseconds(); ms = ms.toString(); ts = ts + "." + ms; return ts; */ //alert("time now:" + d_now); return d_now; } /* function update_window_time_open(win_id) { return; */ /* var win = null; var window_created_time = null; var date_updated = null; var time_opened = null; var time_now = null; var time_elapsed = null; win = document.getElementById(win_id); if (win != null) { //window_created_time = get_web_window_load_timestamp(win_id); window_created_time = win.getAttribute("data-timestamp_loaded"); //alert("window created: " + window_created_time); if (window_created_time != null && parseFloat(window_created_time.toString().length) > -1.0) { time_now = new Date(Date.now()); time_now = parseFloat(time_now.getTime()); window_created_time = parseFloat(window_created_time); if (typeof time_now == "number" && typeof window_created_time == "number") { time_elapsed = Math.abs(parseFloat(time_now) - parseFloat(window_created_time)); time_elapsed = new Date(time_elapsed).getTime().toString(); time_elapsed = time_elapsed.substring(0, (time_elapsed.length - 3)); win.setAttribute("data-window_age", time_elapsed); //alert("time elapsed: " + time_elapsed); console.log("The Web Window: " + win_id + " has been opened for " + time_elapsed + " seconds"); //if (global_window_time_open_timer_id != null) //{ // clearTimeout(global_window_time_open_timer_id); //} //global_window_time_open_timer_id = setTimeout("update_window_time_open('" + win_id + "');", 1000); } */ /* time_opened = update_time(win_id); time_opened = time.toString(); time_opened = new Date(time_opened); time_opened = parseFloat(time_opened); time_now = parseFloat(time_now); if (time_now > -1 && time_opened > -1 && typeof time_now == "number" && typeof time_opened == "number") { elapsed_time = time_now - time_opened; elapsed_time = new Date(elapsed_time); elapsed_time = elapsed_time.getTime(); elapsed_time = elapsed_time.toString(); win.setAttribute("data-time_length_opened", elapsed_time); alert(elapsed_time); } */ /* } } */ /* } */ //function get_web_window_load_timestamp(win_id) //{ // var win = null; // var ts = null; // var d = null; // win = document.getElementById(win_id); // if (win != null) // { // ts = win.getAttribute("data-timestamp_loaded"); // //alert(ts); // if (typeof ts == "string" && ts.length > -1) // { // d = new Date(ts); // d = d.getTime(); // d = d.toString(); // return d; // } // } //} function disable_entire_window(win_id) { var win = null; var blank_img = null; //alert(""); if (document.getElementById(win_id + "_disable_object") == null) // document.getElementById(win_id).setAttribute("data-is_disabled", "true"); { //disable gif is already in place //proceed } else { document.getElementById(win_id + "_disable_object").parentNode.removeChild(document.getElementById(win_id + "_disable_object")); document.getElementById(win_id).setAttribute("data-is_disabled", "false"); } //enable_entire_window(win_id); win = document.getElementById(win_id); //alert(""); blank_img = new Image(); blank_img.src = global_cached_blank_img.src; blank_img.id = win_id + "_disable_object"; blank_img.style.position = "absolute"; blank_img.style.height = parseFloat(win.style.height) + "px"; blank_img.style.width = parseFloat(win.style.width) + "px"; blank_img.style.backgroundColor = "#eeeeee"; blank_img.style.opacity = 0.25; blank_img.style.top = win.scrollTop; blank_img.style.left = win.scrollLeft; blank_img.style.borderStyle = "solid"; blank_img.style.borderColor = "#0000ff"; blank_img.style.borderWidth = "1px"; var event_array = []; event_array.push("mouseover"); event_array.push("mouseout"); event_array.push("mouseenter"); event_array.push("mousedown"); event_array.push("mouseup"); event_array.push("click"); event_array.push("mouseexit"); event_array.push("contextmenu"); event_array.push("dblclick"); event_array.push("dragstart"); event_array.push("drag"); event_array.push("drop"); event_array.push("load"); event_array.push("error"); event_array.push("scroll"); event_array.push("abort"); event_array.push("select"); event_array.push("selectstart"); event_array.push("unload"); event_array.push("keyup"); event_array.push("keydown"); event_array.push("keypress"); //blank_img = blank_img.cloneNone(); //cloning the node is supposedly able to clear all event listeners for (i = 0; i < event_array.length; i++) { blank_img.addEventListener(event_array[i], function () { event.preventDefault(); event.stopPropagation(); return; }); } //blank_img.addEventListener("mousedown", function () { // blank_img.parentNode.removeChild(blank_img); //}); //blank_img.addEventListener("mouseexit", function () { // disable_entire_window(win_id); //}); /* blank_img.addEventListener("mouseover", function () { blank.style.display = "block"; //enable_entire_window(win_id); }); */ //blank_img.addEventListener("mouseover", function () { //enable_entire_window(win.id); //alert("c0w"); //}); /* blank_img.addEventListener("mousedown", function () { enable_entire_window(win_id); }); */ win.appendChild(blank_img); //blank_img.addEventListener("mouseup", function () { // enable_entire_window(blank_img.parentNode.getAttribute("id")); // }); // blank_img.style.display = "none"; // }); // if (blank_img) { // blank_img.style.display = "block"; // } document.getElementById(win_id).setAttribute("data-is_disabled", "true"); } function activate_top_window() { var i = null; var web_windows = null; var win_count = null; var win = null; var top_z_val = null; var z = null; top_z_val = 0; web_windows = document.getElementsByName("web_window"); win_count = web_windows.length; if (web_windows != null) { for (i = 0; i < win_count; i++) { win = web_windows[i]; z = Math.abs(win.style.zIndex); if (z > top_z_val) { top_z_val = Math.abs(z); } else if (z == top_z_val) { top_z_val = Math.abs(z); } } return top_z_val; } } function disable_all_windows() { var i = null; var web_windows = null; var win_count = null; var win = null; var top_z_val = null; var z = null; web_windows = document.getElementsByName("web_window"); win_count = web_windows.length; if (web_windows != null) { for (i = 0; i < win_count; i++) { win = web_windows[i]; //disable_entire_window(win.getAttribute("id")); } return i; } } //function disable_all_but_active_win() { // var web_windows = null; // var i = null; // var win = null; // var win_id = null; // web_windows = document.getElementsByName("web_window"); // for (i = 0; i < web_windows.length; i++) { // win = web_windows[i]; // win_id = win.id; // if (global_active_window_id != win_id) { // disable_entire_window(win_id); // } // else { // //alert("c0w"); // //skip disabling this window. It's the active one, so don't disable it. Remove the blank image blocking it. // } // } // enable_entire_window(global_active_window.id); //} function enable_entire_window(win_id) { var blocking_layer = null; blocking_layer = document.getElementById(win_id + "_disable_object"); document.getElementById(win_id).setAttribute("data-is_disabled","false"); if (blocking_layer != null) { blocking_layer.style.display = "none"; //blocking_layer.parentNode.removeChild(blocking_layer); } } function turn_blue_fade_white(win_id) { var win = null; var title = null; win = document.getElementById(win_id); if (win != null) { title = document.getElementById(win_id + "_title_box"); title.style.color = "rgb(0,0,255)"; global_blue_to_white_timer = setInterval("blue_to_white(\"" + title.getAttribute("id") + "\", \"" + win_id + "\")", 2); } } function blue_to_white(title_box_id, win_id) { var title_box = null; var blue = null; var green = null; var red = null; var title_array = []; var new_color = null; var win = null; var title_color = null; win = document.getElementById(win_id); title_box = document.getElementById(title_box_id); if (title_box !== null) { title_color = title_box.style.color; title_color = title_color.replace("rgb(", "").replace(")", "").replace(" ", ""); //alert(title_color); title_array = title_color.split(","); red = Math.abs(title_array[0]); green = Math.abs(title_array[1]); blue = Math.abs(title_array[2]); red = red + 3; green = green + 3; blue = blue + 255; new_color = "rgb(" + red.toString() + "," + green.toString() + "," + blue.toString() + ")"; title_box.style.color = new_color; /* if (win_id != global_active_window_id) { title_box.style.color = "rgb(255,255,255)"; clearInterval(global_blue_to_white_timer); return; } */ if (red >= 254 || green >= 254) { //title_box.style.color = "rgb(255,255,255)"; //title_to_white(win_id); clearInterval(global_blue_to_white_timer); return; } } //alert(title_box.style.color); //alert(hexColor); //if (hexColor == "#0000ff") { // hexColor = "#1111ff"; //} //else if (hexColor == "#1111ff") { // hexColor = "#2222ff"; //} //else if (hexColor == "#2222ff") { // hexColor = "#3333ff"; //} //else if (hexColor == "#3333ff") { // hexColor = "#4444ff"; //} //else if (hexColor == "#4444ff") { // hexColor = "#5555ff"; //} //else if (hexColor == "#5555ff") { // hexColor = "#6666ff"; //} //else if (hexColor == "#6666ff") { // hexColor = "#7777ff"; //} //else if (hexColor == "#7777ff") { // hexColor = "#8888ff"; //} else if (hexColor == "#8888ff") { // hexColor = "#9999ff"; //} //else if (hexColor == "#9999ff") { // hexColor = "#aaaaff"; //} //else if (hexColor == "#aaaaff") { // hexColor = "#bbbbff"; //} //else if (hexColor == "#bbbbff") { // hexColor = "#ccccff"; //} //else if (hexColor == "#ccccff") { // hexColor = "#ddddff"; //} //else if (hexColor == "#ddddff") { // hexColor = "#eeeeff"; //} //else if (hexColor == "#eeeeff") { // hexColor = "#ffffff"; // clearInterval(global_blue_to_white_timer); //} //document.getElementById(title_box_id).style.color = hexColor; } function title_to_white(win_id) { var win = null; var title = null; win = document.getElementById(win_id); if (win) { title = document.getElementById(win_id + "_title_box"); title.style.color = "rgb(255,255,255)"; } } function script_already_exists(scriptURI) { //global_scripts_array = []; var scripts = null; var uri = null; var script_uri = scriptURI; var exists = null; var i = null; exists = false; //alert(scriptURI); scripts = document.getElementsByName("web_window_script"); for (i = 0; i < scripts.length; i++) { uri = scripts[i].getAttribute("src"); //alert(uri + " " + script_uri); uri = uri.toLowerCase(); scriptURI = scriptURI.toLowerCase(); if (uri === scriptURI) { if (uri !== "") { exists = true; return exists; } else { exists = false; //the script is already loaded to the page return exists; } } else { exists = false; return exists; } } return exists; } function css_already_exists(cssURI) { var css = null; var uri = null; var css_uri = cssURI; var exists = null; var i = null; exists = false; css = document.getElementsByName("web_window_css"); for (i = 0; i < css.length; i++) { uri = css[i].getAttribute("href"); //alert(uri + " " + script_uri); uri = uri.toLowerCase(); cssURI = cssURI.toLowerCase(); if (uri === cssURI) { if (uri !== "") { exists = true; return exists; } else { exists = false; //the script is already loaded to the page return exists; } } else { exists = false; return exists; } } return exists; } function status_loaded(win_id, val) { var w = null; w = document.getElementById(win_id); if (w !== null) { w.setAttribute("data-win-is_loaded", val); //set_window_status(win_id, "Loaded at: " + get_date_time()); invoke_event_win_loaded(w.id); } } //2024-11-24: //invoking a custom synthetic event that is //dispatched once a web window has loaded. //see file: 'win_to_win_comms.js' //see file: 'create_window.js' //see file: 'window.js' function invoke_event_win_loaded(win_id) { var win = null; var winload_event = null; var i = null; i = 0; do { ////console.log(i); i++; if (i > 100000) { ////console.log("do loop has repeated over 100000 time. breaking loop."); break; } else { win = document.getElementById(win_id); if (win !== null) { ////winload_event = new Event("loadwebwindow"); ////win.dispatchEvent(winload_event); ////console.log("do loop completed successfully. breaking loop."); break; } else { ////console.log("do loop win object is null. breaking loop."); break; } } } while (is_win_content_loaded(win_id) === false) } function is_win_content_loaded(win_id) { var blank_img_exists = null; var is_win_loaded_attr = null; var win = null; var is_win_loaded = null; win = document.getElementById(win_id); if (win !== null) { is_win_loaded_attr = win.getAttribute("data-win-is_loaded"); if (is_win_loaded_attr === true || is_win_loaded_attr === "true") { is_win_loaded = true; } else { is_win_loaded = false; } blank_img_exists = document.getElementById(("contents_blankimage_" + win_id)); if (blank_img_exists !== null) { blank_img_exists = false; //web window IS loaded } else { blank_img_exists = true; //web window is NOT loaded } if (is_win_loaded === true || is_win_loaded === "true") { if (blank_img_exists === false || blank_img_exists === "false") { is_win_loaded = true; } else { is_win_loaded = false; } } else { is_win_loaded = false; } } else { is_win_loaded = false; } return is_win_loaded; } //2023-10-19: //A function that equalizes a window's height and width //to the height and width of the table inside the window. function equalize_window_size_to_table_size(win_id) { var win = null; win = document.getElementById(win_id); if (win !== null) { win.style.width = parseFloat(win.childNodes[0].offsetWidth) + "px"; win.style.height = parseFloat(win.childNodes[0].offsetHeight) + "px"; } } //2023-10-19: //removes HTML attributes from an element, except //for any "id" attributes. function remove_elem_HTML_attributes(elem_id) { var elem = null; var elem_attributes_length = null; var i = null; var attr = null; elem = document.getElementById(elem_id); if (elem !== null) { if (elem.hasAttributes() === true) { elem_attributes_length = elem.attributes.length; for (i = 0; i < elem_attributes_length; i++) { //elem.removeAttribute(elem.attributes.); //alert(elem.attributes.item(i).name); if (elem.attributes.item(i) !== null) { attr = elem.attributes.item(i).nodeName; //alert(attr); if (attr !== "id") { elem.removeAttribute(attr); } } } } } } //function actually_get_EVERY_window_please() { // var a = null; // var i = null; // var obj = null; // var obj_name = null; // var web_window_array = []; // a = document.all; // for (i = 0; i < a.length; i++) { // obj = a[i]; // if (obj.getAttribute("name") === "web_window") { // web_window_array.push(obj.id); // } // } // return web_window_array; //} /* function set_outer_glow(win_id) { var w = null; w = document.getElementById(win_id); if (w !== null) { w.style.boxShadow = global_window_outer_glow; fade_outer_glow(win_id); } } function fade_outer_glow(win_id) { var glow_width = null; var glow_opacity = null; var m = null; m = 100; //set_outer_glow(win_id); //global_tId18 = setInterval(grow_outer_glow(win_id, m), 100); } function grow_outer_glow(win_id, max) { var glow_size = null; var w = null; var param_array = []; var param_list = null; var width = null; var h = null; w = document.getElementById(win_id); if (w !== null) { param_array = global_window_outer_glow.split(" "); width = param_array[2]; h = param_array[3]; if (typeof width !== "number") { if (width.indexOf("px") > -1.0) { width = width.replace("px", ""); width = parseFloat(width); } } if (typeof h !== "number") { if (h.indexOf("px") > -1.0) { h = h.replace("px", ""); h = parseFloat(h); } } if (typeof h === "number" && typeof width === "number") { h = h + 1; param_array[3] = h + "px"; width = width + 1; param_array[2] = width + "px"; param_list = param_array.join(" "); global_window_outer_glow = param_list; w.style.boxShadow = global_window_outer_glow; //fade_outer_glow(win_id, param_list); //alert(param_list); } if (h > max || width > max) { clearInterval(global_tId18); } } } function fade_outer_glow(win_id, param_list) { return; var w = null; var opac = null; w = document.getElementById(win_id); param_array = param_list.split(" "); alert(param_list); //opac = } */ /* function set_icons_for_minimized_win(win_id) { var icon = null icon = document.getElementById(win_id + "_tbl_0000_tr_0000_td_0002").childNodes[0]; //left icon if (icon !== null) { icon.src = "/chromosphere/images/ui/icons/cascade_19x19.png"; //cascade_icon_add_event_listeners(icon, win_id); //change the functionality of this icon depending on web window state: minimized, cascaded, maximized icon.parentNode.setAttribute("data-title", "View Window"); icon.parentNode.setAttribute("data-desc", "display the window as cascaded"); display_helper_captions(icon.parentNode); } icon = document.getElementById(win_id + "_tbl_0000_tr_0000_td_0003").childNodes[0]; //middle icon if (icon !== null) { icon.src = "/chromosphere/images/ui/icons/maximize_19x19.png"; //maximize_icon_add_event_listeners(icon, win_id); icon.parentNode.setAttribute("data-title", "Maximize Window"); icon.parentNode.setAttribute("data-desc", "display the window as maximized"); display_helper_captions(icon.parentNode); } icon = document.getElementById(win_id + "_tbl_0000_tr_0000_td_0004").childNodes[0]; //right icon if (icon !== null) { icon.src = "/chromosphere/images/ui/icons/close_19x19.png"; icon.parentNode.setAttribute("data-title", "Close Window"); icon.parentNode.setAttribute("data-desc", "close the window"); display_helper_captions(icon.parentNode); } } function set_icons_for_maximized_win(win_id) { var icon = null icon = document.getElementById(win_id + "_tbl_0000_tr_0000_td_0002").childNodes[0]; //left icon if (icon !== null) { icon.src = "/chromosphere/images/ui/icons/minimize_19x19.png"; //minimize_icon_add_event_listeners(icon, win_id); //change the functionality of this icon depending on web window state: minimized, cascaded, maximized icon.parentNode.setAttribute("data-title", "Minimized Window"); icon.parentNode.setAttribute("data-desc", "display the window as minimized"); display_helper_captions(icon.parentNode); } icon = document.getElementById(win_id + "_tbl_0000_tr_0000_td_0003").childNodes[0]; //middle icon if (icon !== null) { icon.src = "/chromosphere/images/ui/icons/cascade_19x19.png"; //cascade_icon_add_event_listeners(icon, win_id); //change the functionality of this icon depending on web window state: minimized, cascaded, maximized icon.parentNode.setAttribute("data-title", "Cascade Window"); icon.parentNode.setAttribute("data-desc", "display the window as cascaded"); display_helper_captions(icon.parentNode); } icon = document.getElementById(win_id + "_tbl_0000_tr_0000_td_0004").childNodes[0]; //right icon if (icon !== null) { icon.src = "/chromosphere/images/ui/icons/close_19x19.png"; icon.parentNode.setAttribute("data-title", "Close Window"); icon.parentNode.setAttribute("data-desc", "close the window"); display_helper_captions(icon.parentNode); } } function set_icons_for_cascaded_win(win_id) { var icon = null icon = document.getElementById(win_id + "_tbl_0000_tr_0000_td_0002").childNodes[0]; //left icon if (icon !== null) { icon.src = "/chromosphere/images/ui/icons/minimize_19x19.png"; //minimize_icon_add_event_listeners(icon, win_id); //change the functionality of this icon depending on web window state: minimized, cascaded, maximized icon.parentNode.setAttribute("data-title", "Minimized Window"); icon.parentNode.setAttribute("data-desc", "display the window as minimized"); display_helper_captions(icon.parentNode); } icon = document.getElementById(win_id + "_tbl_0000_tr_0000_td_0003").childNodes[0]; //middle icon if (icon !== null) { icon.src = "/chromosphere/images/ui/icons/maximize_19x19.png"; // maximize_icon_add_event_listeners(icon, win_id); icon.parentNode.setAttribute("data-title", "Maximized Window"); icon.parentNode.setAttribute("data-desc", "display the window as Maximized"); display_helper_captions(icon.parentNode); } icon = document.getElementById(win_id + "_tbl_0000_tr_0000_td_0004").childNodes[0]; //right icon if (icon !== null) { icon.src = "/chromosphere/images/ui/icons/close_19x19.png"; icon.parentNode.setAttribute("data-title", "Close Window"); icon.parentNode.setAttribute("data-desc", "close the window"); display_helper_captions(icon.parentNode); } } */