"use strict"; //Javascript file #2 for functions related to web windows function simulate_events_on_window(win_id, event) { var ev = null; var w = null; w = document.getElementById(win_id); if (w !== null) { ev = event; ev = document.createEvent("MouseEvent"); ev.initMouseEvent("mouseenter", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); w.dispatchEvent(ev); ev = document.createEvent("MouseEvent"); ev.initMouseEvent("mouseover", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); w.dispatchEvent(ev); ev = document.createEvent("MouseEvent"); ev.initMouseEvent("mousemove", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); w.dispatchEvent(ev); ev = document.createEvent("MouseEvent"); ev.initMouseEvent("mousedown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); w.dispatchEvent(ev); ev = document.createEvent("MouseEvent"); ev.initMouseEvent("mouseup", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); w.dispatchEvent(ev); ev = document.createEvent("MouseEvent"); ev.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); w.dispatchEvent(ev); ev = document.createEvent("MouseEvent"); ev.initMouseEvent("mouseout", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); w.dispatchEvent(ev); } } //2023-08-24: //This function is added to make it easy to update the //status text of a window. function update_window_status_text(win_id, status_txt) { var status_box = null; status_box = document.getElementById(win_id + "_window_status"); if (status_box !== null) { status_box.innerText = status_txt; } } //2023-09-22: //Setting up animations to be applied to window //individually, depending on the action of the window //being performed. (resize, move, minimize, maximize, etc.) /* ----------------------------------------------- BEGIN SET CSS ANIMATIONS ----------------------------------------------- */ //Keep this here for reference. //most_customizable_config_elem_for_animation(elem_id, css_property, duration, delay) function set_animations_default(elem_id) { default_config_elem_for_animation(elem_id); } function set_animations_move_window(elem_id) { remove_elem_animations(elem_id); most_customizable_config_elem_for_animation(elem_id, "top, left, box-shadow", "0.5", "0.0025"); remove_CSS_animations_from_window_table(elem_id); } function set_animations_resize_window(elem_id) { remove_elem_animations(elem_id); most_customizable_config_elem_for_animation(elem_id, "width, height, box-shadow", "0.1", "0.0025"); remove_CSS_animations_from_window_table(elem_id); } /* function set_animations_boxshadow(elem_id) { remove_elem_animations(elem_id); most_customizable_config_elem_for_animation(elem_id, "box-shadow", "0.2", "0.001"); remove_CSS_animations_from_window_table(elem_id); } */ //2023-09-22: //Not currently in use, but keeping it for //possible future use. function set_animations_zoom(elem_id) { remove_elem_animations(elem_id); most_customizable_config_elem_for_animation(elem_id, "zoom", "0.4", "0.001"); remove_CSS_animations_from_window_table(elem_id); } function remove_CSS_animations_from_window_table(win_id) { var win = null; var tbl = null; win = document.getElementById(win_id); if (win !== null) { tbl = document.getElementById(win_id + "_tbl_0000"); if (tbl !== null) { remove_elem_animations(tbl.id); } } } /* ----------------------------------------------- END SET CSS ANIMATIONS ----------------------------------------------- */ //2023-10-19: //Adding functions to determine what state //the window is currently in /* -------------------------------------------------------------- FUNCTIONS WHICH INDICATE WHAT STATE THE WINDOW IS CURRENTLY IN -------------------------------------------------------------- */ function is_window_cascaded(win_id) { var w = null; var is_cascaded = null; w = document.getElementById(win_id); if (w !== null) { if (w.hasAttribute("data-window_state") === true) { if (w.getAttribute("data-window_state") === "Cascade") { is_cascaded = true; } } } return is_cascaded; } function is_window_minimized(win_id) { var w = null; var is_minimized = null; w = document.getElementById(win_id); if (w !== null) { if (w.hasAttribute("data-is_minimized") === true) { if (w.getAttribute("data-is_minimized") === "true" || w.getAttribute("data-is_minimized") === true) { is_minimized = true; } } } return is_minimized; } function is_window_maximized(win_id) { var w = null; var is_maximized = null; w = document.getElementById(win_id); if (w !== null) { if (w.hasAttribute("data-is_maximized") === true) { if (w.getAttribute("data-is_maximized") === "true" || w.getAttribute("data-is_maximized") === true) { is_maximized = true; } } } return is_maximized; } function get_current_window_state(win_id) { var is_cascaded = null; var is_minimized = null; var is_maximized = null; var window_state = null; is_cascaded = is_window_cascaded(win_id); is_minimized = is_window_minimized(win_id); is_maximized = is_window_maximized(win_id); //if window is Cascaded if (is_cascaded === true && is_minimized === null && is_maximized === null) { window_state = "cascaded"; } //if window is minimized else if (is_cascaded === null && is_minimized === true && is_maximized === null) { window_state = "minimized"; } //if window is maximized else if (is_cascaded === null && is_minimized === null && is_maximized === true) { window_state = "maximized"; } else { window_state = "unknown"; } return window_state; } /* ------------------------------------------------------------------ END FUNCTIONS WHICH INDICATE WHAT STATE THE WINDOW IS CURRENTLY IN ------------------------------------------------------------------ */ function place_mask_over_window(win_id) { var win = null; var cloned_window = null; var temp_clone = null; win = document.getElementById(win_id); if (win !== null) { cloned_window = win.cloneNode(false); cloned_window.style.display = "none"; cloned_window.style.backgroundColor = win.style.backgroundColor; cloned_window.style.opacity = 0.0; cloned_window.innerHTML = ""; cloned_window.setAttribute("id", win_id + "_window_mask"); cloned_window.setAttribute("name", cloned_window.getAttribute("name") + "_window_mask"); if (document.getElementById(cloned_window.id) !== null) { //window masking clone already exists. Don't append it to the body. } else { document.body.appendChild(cloned_window); } cloned_window.style.zIndex = parseFloat(win.style.zIndex) + 1.0; cloned_window.style.display = "block"; cloned_window.style.opacity = 1.0; cloned_window.style.padding = "4px"; cloned_window.style.boxShadow = "none"; } } function remove_window_mask(win_id) { var win_mask = null; var win = null; win = document.getElementById(win_id); if (win !== null) { win_mask = document.getElementById(win_id + "_window_mask"); if (win_mask !== null) { most_customizable_config_elem_for_animation(win_mask.id, "opacity", "0.75", "0.75"); win_mask.style.opacity = 0.0; setTimeout(function () { win_mask.parentNode.removeChild(win_mask); }, 1500); } } } function window_currently_exists(win_id) { var win = null; var win_exists = null; win = document.getElementById(win_id); if (win !== null) { win_exists = true; } else { win_exists = false; } return win_exists; } //2024-05-14: //a function that takes a window in its cascaded state, //and resets its parameters to be that of a window that's //created as a new window. see file: 'create_window.js' //as of right now, this function is only partially complete. function reset_cascaded_window(win_id) { var win = null; var win_state = null; var is_tabbed = null; win = document.getElementById(win_id); if (win !== null) { //get the window's current state (Cascade, Maximize, Minimize, etc) win_state = win.getAttribute("data-window_state"); //check to see if the windows is in a tabbed state. //as for now, when a window is tabbed, its window state //remains as "Cascade". checking the following attribute //indicates whether it is tabbed, or not. is_tabbed = win.getAttribute("data-is_tabbed"); if (is_tabbed === "true" || is_tabbed === true) { //if the window is tabbed, regardless of its window state, //then exit the function. return; } else { //the window is not tabbed. check if its window state value is set to //"Cascade". if (typeof (win_state) === "string" && win_state.length > 0) { if (win_state === "Cascade") { /* the window is in cascaded window state, and it is not tabbed. //CONTINUE the function. */ } else { //if the window is not tabbed, and not in a cascaded window state //then exit function. return; } } else { //the win_state is both not a string data type, and its length returns //a value of greater than 0 as a number. return; } } //2024-05-14: //these configurations are also placed within the function //that makes a new window. see file: 'create_window.js' win.style.paddingBottom = global_window_padding_bottom; win.style.paddingTop = global_window_padding_top; win.style.paddingRight = global_window_padding_right; win.style.paddingLeft = global_window_padding_left; win.style.borderRadius = global_window_corner_radius; win.style.borderStyle = global_window_border_style; win.style.borderWidth = global_window_border_width; win.style.borderColor = global_window_border_color; win.style.borderBottomColor = global_window_bottom_border_color; win.style.borderRightColor = global_window_right_border_color; win.style.borderTopColor = global_window_top_border_color; win.style.borderTopStyle = "solid"; win.style.borderLeftColor = global_window_left_border_color; win.style.borderCollapse = "collapse"; //set the size and position of the window's table interface to its default. if (win.hasChildNodes() === true) { win.childNodes[0].style.position = "relative"; win.childNodes[0].style.width = parseFloat(win.style.width) + "px"; win.childNodes[0].style.height = parseFloat(win.style.height) + "px"; win.childNodes[0].style.left = "0"; win.childNodes[0].style.top = "0"; } } } /*--------------------------------------------------------- THE FUNCTIONS LOCATED BELOW WORK WITH WINDOW Z-INDEXES -----------------------------------------------------------*/ //this function sets the CSS xIndex attribute to //all windows. the tabbed windows have the lowest //zIndexes. the cascaded windows have the next lowest //zIndexes, the minimized windows have the next lowest //zIndexes, and the maximized windows have the top zIndex. function set_all_window_zIndexes() { var tabbed_windows = null; var tabbed_windows_length = null; var cascaded_windows = null; var cascaded_windows_length = null; var minimized_windows = null; var minimized_windows_length = null; var maximized_windows = null; var maximized_windows_length = null; var i = null; var zIndex_start = null; var desktop = null; var zIndex = null; var tabbed_window = null; desktop = document.getElementById("desktop"); if (desktop !== null) { if (typeof (parseFloat(desktop.style.zIndex)) === "number") { zIndex_start = parseFloat(desktop.style.zIndex); } else { zIndex_start = 0; } } else { return; } zIndex = zIndex_start; //console.clear(); //console.log("starting zIndex: " + zIndex); tabbed_windows = get_all_tabbed_windows(); tabbed_windows = convert_win_id_array_to_objects(tabbed_windows); tabbed_windows = arrange_windows_by_zIndex_asc(tabbed_windows); if (tabbed_windows !== null) { if (tabbed_windows.length > 0) { tabbed_windows_length = parseFloat(tabbed_windows.length); for (i = 0; i < tabbed_windows_length; i++) { tabbed_window = tabbed_windows[i]; if (tabbed_window !== null) { zIndex++; tabbed_window.style.zIndex = zIndex; //console.log("tabbed window, zIndex: " + zIndex); } } } } minimized_windows = get_all_minimized_windows(); minimized_windows = convert_win_id_array_to_objects(minimized_windows); minimized_windows = arrange_windows_by_zIndex_asc(minimized_windows); if (minimized_windows !== null) { if (minimized_windows.length > 0) { minimized_windows_length = parseFloat(minimized_windows.length); for (i = 0; i < minimized_windows_length; i++) { minimized_window = minimized_windows[i]; if (minimized_window !== null) { zIndex++; minimized_window.style.zIndex = zIndex; //console.log("minimized window, zIndex: " + zIndex); } } } } maximized_windows = get_maximized_windows(); maximized_windows = convert_win_id_array_to_objects(maximized_windows); maximized_windows = arrange_windows_by_zIndex_asc(maximized_windows); if (maximized_windows !== null) { if (maximized_windows.length > 0) { maximized_windows_length = parseFloat(maximized_windows.length); for (i = 0; i < maximized_windows_length; i++) { maximized_window = maximized_windows[i]; if (maximized_window !== null) { zIndex++; maximized_window.style.zIndex = zIndex; //console.log("maximized window, zIndex: " + zIndex); } } } } cascaded_windows = get_all_cascaded_windows(); cascaded_windows = convert_win_id_array_to_objects(cascaded_windows); cascaded_windows = arrange_windows_by_zIndex_asc(cascaded_windows); if (cascaded_windows !== null) { if (cascaded_windows.length > 0) { cascaded_windows_length = parseFloat(cascaded_windows.length); for (i = 0; i < cascaded_windows_length; i++) { cascaded_window = cascaded_windows[i]; if (cascaded_window !== null) { zIndex++; cascaded_window.style.zIndex = zIndex; //console.log("cascaded window, zIndex: " + zIndex); } } } } move_to_front(cascaded_window.id); } //move all minimized windows over the top //of other windows. function move_all_minimized_windows_to_front() { var minimized_windows = null; var minimized_window = null; var i = null; var zIndex = null; var minimized_windows_length = null; zIndex = parseFloat(get_top_window_z_index()); if (isNaN(zIndex) === true) { zIndex = 0; } minimized_windows = get_all_minimized_windows(); minimized_windows = convert_win_id_array_to_objects(minimized_windows); minimized_windows = arrange_windows_by_zIndex_asc(minimized_windows); if (minimized_windows !== null) { if (minimized_windows.length > 0) { minimized_windows_length = parseFloat(minimized_windows.length); for (i = 0; i < minimized_windows_length; i++) { minimized_window = minimized_windows[i]; if (minimized_window !== null) { zIndex++; minimized_window.style.zIndex = zIndex; //console.log("minimized window, zIndex: " + zIndex); } } } } } //move all maximized windows on top of other windows function move_all_maximized_windows_to_front() { var maximized_windows = null; var maximized_window = null; var i = null; var zIndex = null; var maximized_windows_length = null; zIndex = parseFloat(get_top_window_z_index()); if (isNaN(zIndex) === true) { zIndex = 0; } maximized_windows = get_maximized_windows(); maximized_windows = convert_win_id_array_to_objects(maximized_windows); maximized_windows = arrange_windows_by_zIndex_asc(maximized_windows); if (maximized_windows !== null) { if (maximized_windows.length > 0) { maximized_windows_length = parseFloat(maximized_windows.length); for (i = 0; i < maximized_windows_length; i++) { maximized_window = maximized_windows[i]; if (maximized_window !== null) { zIndex++; maximized_window.style.zIndex = zIndex; } } } } } //move all cascaded windows on top of other windows function move_all_cascaded_windows_to_front() { var cascaded_windows = null; var cascaded_window = null; var i = null; var zIndex = null; var cascaded_windows_length = null; zIndex = parseFloat(get_top_window_z_index()); if (isNaN(zIndex) === true) { zIndex = 0; } cascaded_windows = get_all_cascaded_windows(); cascaded_windows = convert_win_id_array_to_objects(cascaded_windows); cascaded_windows = arrange_windows_by_zIndex_asc(cascaded_windows); if (cascaded_windows !== null) { if (cascaded_windows.length > 0) { cascaded_windows_length = parseFloat(cascaded_windows.length); for (i = 0; i < cascaded_windows_length; i++) { cascaded_window = cascaded_windows[i]; if (cascaded_window !== null) { zIndex++; cascaded_window.style.zIndex = zIndex; } } } } } //move all tabbed windows on top of the other windows function move_all_tabbed_windows_to_front() { var tabbed_windows = null; var tabbed_window = null; var i = null; var zIndex = null; var tabbed_windows_length = null; zIndex = parseFloat(get_top_window_z_index()); if (isNaN(zIndex) === true) { zIndex = 0; } tabbed_windows = get_all_tabbed_windows(); tabbed_windows = convert_win_id_array_to_objects(tabbed_windows); tabbed_windows = arrange_windows_by_zIndex_asc(tabbed_windows); if (tabbed_windows !== null) { if (tabbed_windows.length > 0) { tabbed_windows_length = parseFloat(tabbed_windows.length); for (i = 0; i < tabbed_windows_length; i++) { tabbed_window = tabbed_windows[i]; if (tabbed_window !== null) { zIndex++; tabbed_window.style.zIndex = zIndex; } } } } } //for each open window, reset the window's //zIndex from 1 to Nth sequencially. function reset_all_window_zIndexes() { var wins = null; var wins_length = null; var i = null; var win = null; wins = document.getElementsByName("web_window"); if (wins !== null) { if (wins.length > 0) { wins_length = parseFloat(wins.length); for (i = 0; i < wins_length; i++) { win = wins[i]; if (win !== null) { win.style.zIndex = parseFloat(i + 1); } } } } } //this function takes an array of window objects and orders it according to //zIndex numbers, ascending. function arrange_windows_by_zIndex_asc(window_array) { var wins = null; var win = null; var i = null; var zIndex = null; var wins_length = null; var win_id = null; var zIndex_window_array = []; var zIndexes = null; wins = window_array; if (wins !== null) { if (wins.length > 0) { wins_length = wins.length; if (wins_length > 0) { for (i = 0; i < wins_length; i++) { win = wins[i]; if (win !== null) { if (typeof (win) === "string") { win_id = win; win = document.getElementById(win_id); } else if (typeof (win) === "object" && win !== null) { if (win.hasAttribute("name") === true) { if (win.getAttribute("name") === "web_window") { } else { continue; } } else { continue; } } else { continue; } if (win !== null) { zIndex = parseFloat(win.style.zIndex); if (typeof (zIndex) === "number") { if (zIndexes === null) { zIndexes = zIndex; zIndex_window_array.push(win); } else { if (zIndex > zIndexes) { zIndexes = zIndex; zIndex_window_array.push(win); } else if (zIndex < zIndexes) { zIndexes = zIndex; zIndex_window_array.unshift(win); } } } } } } } } } ////alert(zIndex_window_array); return zIndex_window_array; } //this function takes an array of window objects and orders it according to //zIndex numbers, descending. function arrange_windows_by_zIndex_desc(window_array) { var wins = null; var win = null; var i = null; var zIndex = null; var wins_length = null; var win_id = null; var zIndex_window_array = []; var zIndexes = null; wins = window_array; if (wins !== null) { if (wins.length > 0) { wins_length = wins.length; if (wins_length > 0) { for (i = 0; i < wins_length; i++) { win = wins[i]; if (win !== null) { if (typeof (win) === "string") { win_id = win; win = document.getElementById(win_id); } else if (typeof (win) === "object" && win !== null) { if (win.hasAttribute("name") === true) { if (win.getAttribute("name") === "web_window") { } else { continue; } } else { continue; } } else { continue; } if (win !== null) { zIndex = parseFloat(win.style.zIndex); if (typeof (zIndex) === "number") { if (zIndexes === null) { zIndexes = zIndex; zIndex_window_array.push(win); } else { if (zIndex < zIndexes) { zIndexes = zIndex; zIndex_window_array.push(win); } else if (zIndex > zIndexes) { zIndexes = zIndex; zIndex_window_array.unshift(win); } } } } } } } } } ////alert(zIndex_window_array); return zIndex_window_array; } //takes an array of window id attributes and returns an //array of window objects. if the array is already an //array of window objects, then the function returns an array //of window objects. function convert_win_id_array_to_objects(window_id_array) { var win_id_array = null; var win_id_array_length = null; var win_id = null; var i = null; var win_obj_array = []; var win = null; win_id_array = window_id_array; if (win_id_array !== null) { if (win_id_array.length > 0) { win_id_array_length = parseFloat(win_id_array.length); for (i = 0; i < win_id_array_length;i++) { win_id = win_id_array[i]; if (win_id !== null) { if (typeof (win_id) === "string") { win = document.getElementById(win_id); if (win !== null) { if (win.hasAttribute("name") === true) { if (win.getAttribute("name") === "web_window") { win_obj_array.push(win); } } } } else if (typeof (win_id) === "object" && win_id !== null) { win = win_id; if (win.hasAttribute("name") === true) { if (win.getAttribute("name") === "web_window") { win_obj_array.push(win); } } } } } } } ////alert(win_obj_array.join(",")); return win_obj_array; } //returns the cascaded window with the highest zIndex. function get_top_cascaded_window() { var cascaded_wins = null; var cascaded_wins_length = null; var i = null; var top_zIndex = null; var win = null; var top_win = null; cascaded_wins = get_all_cascaded_windows(); if (cascaded_wins !== null) { if (cascaded_wins.length > 0) { cascaded_wins_length = parseFloat(cascaded_wins.length); for (i = 0; i < cascaded_wins_length; i++) { win = cascaded_wins[i]; if (win !== null) { if (top_zIndex === null) { top_zIndex = parseFloat(win.style.zIndex); top_win = win; } else { if (parseFloat(win.style.zIndex) > top_zIndex) { top_zIndex = parseFloat(win.style.zIndex); top_win = win; } } } } } } ////return top_zIndex; return top_win; } /*--------------------------------------------------------- THE FUNCTIONS LOCATED ABOVE WORK WITH WINDOW Z-INDEXES -----------------------------------------------------------*/ /*----------------------------------------------------------- SCROLLING RELATED FUNCTIONS -------------------------------------------------------------*/ function window_scroll_event_handler() { var window_scroll_y = null; var window_scroll_x = null; window_scroll_x = parseFloat(window.scrollX); window_scroll_y = parseFloat(window.scrollY); global_window_scroll_x = window_scroll_x; global_window_scroll_y = window_scroll_y; } function adjust_objects_scroll_xy_position() { //console.log(global_window_scroll_y); //console.log("document top: " + window.scrollY); var desktop = null; var top_menu = null; var menu_bar = null; var pixel_ratio = null; var mini_wins = null; var i = null; var win_count = null; var win = null; var stowed_mini_win_box = null; var stowed_minimized_box_height = null; var mini_wins_stack_table = null; var tucked_stowed_minimized_windows_icon = null; pixel_ratio = get_pixel_ratio(); //desktop = document.getElementById("desktop"); //if (desktop !== null) { // ////desktop.style.top = global_window_scroll_y + "px"; //} top_menu = document.getElementById("top_menu_container"); if (top_menu !== null) { ////top_menu.style.top = (parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; } menu_bar = document.getElementById("div_wrapper_0"); if (menu_bar !== null) { ////menu_bar.style.top = (parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; } stowed_mini_win_box = document.getElementById("stowed_minimized_windows_objects_container"); if (stowed_mini_win_box !== null) { stowed_minimized_box_height = parseFloat(stowed_mini_win_box.offsetHeight); stowed_mini_win_box.style.top = (parseFloat(stowed_minimized_box_height) + parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; } //mini_wins_stack_table = document.getElementById("minimized_menu"); //if (mini_wins_stack_table !== null) { // //mini_wins_stack_table.style.top = (parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; //} //var mini_wins_scroll_box = null; //mini_wins_scroll_box = document.getElementById("scroll_box"); //if (mini_wins_scroll_box !== null) { // //mini_wins_scroll_box.style.top = (parseFloat(stowed_minimized_box_height) + parseFloat(menu_bar.offsetHeight) + parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; //} tucked_stowed_minimized_windows_icon = document.getElementById("tucked_stowed_minimized_windows_icon"); if (tucked_stowed_minimized_windows_icon !== null) { ////tucked_stowed_minimized_windows_icon.style.top = (parseFloat(stowed_minimized_box_height) + parseFloat(menu_bar.offsetHeight) + parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; } var thumbnail_window = null; thumbnail_window = document.getElementById("thumbnail_top_container"); if (thumbnail_window !== null) { ////thumbnail_window.style.top = (((parseFloat(stowed_minimized_box_height) + parseFloat(menu_bar.offsetHeight)) + parseFloat(window.scrollY) * parseFloat(pixel_ratio))) + "px"; ////thumbnail_window.style.top = parseFloat(window.scrollY * 0) + (parseFloat(event.target.offsetTop) * parseFloat(pixel_ratio * 0)) + "px"; ////(((parseFloat(stowed_minimized_box_height) + parseFloat(menu_bar.offsetHeight)) + parseFloat(window.scrollY) * parseFloat(pixel_ratio))) + "px"; } //thumbnail_window = document.getElementsByName("copied_web_window")[0]; //if (thumbnail_window !== null && thumbnail_window !== undefined) { // ////thumbnail_window.style.top = (parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; //} var tabbed_windows_tabs = null; tabbed_windows_tabs = document.getElementById("tabbed_windows_container"); if (tabbed_windows_tabs !== null) { tabbed_windows_tabs.style.position = "fixed"; ////tabbed_windows_tabs.style.top ////thumbnail_window.style.top = (((parseFloat(stowed_minimized_box_height) + parseFloat(menu_bar.offsetHeight)) + parseFloat(window.scrollY) * parseFloat(pixel_ratio))) + "px"; ////thumbnail_window.style.top = parseFloat(window.scrollY * 0) + (parseFloat(event.target.offsetTop) * parseFloat(pixel_ratio * 0)) + "px"; ////(((parseFloat(stowed_minimized_box_height) + parseFloat(menu_bar.offsetHeight)) + parseFloat(window.scrollY) * parseFloat(pixel_ratio))) + "px"; ////tabbed_windows_tabs.style.top = ((parseFloat(window.scrollY) + parseFloat(menu_bar.offsetHeight)) * parseFloat(pixel_ratio)) + "px"; ////tabbed_windows_tabs.style.top = ((parseFloat(window.scrollY) + parseFloat(menu_bar.offsetHeight) - parseFloat(menu_bar.offsetTop))) + "px"; //tabbed_windows_tabs.style.top = ((parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + 32) + "px"; } var tabbed_windows = null; tabbed_windows = document.getElementById("tabbed_windows_collection"); if (tabbed_windows !== null) { ////"data-is_tabbed='true'"; ////tabbed_windows.style.position = "fixed"; ////tabbed_windows.style.top = (parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; } mini_wins = get_all_minimized_windows(); if (mini_wins !== null) { if (mini_wins.length > 0) { win_count = mini_wins.length; for (i = 0; i < win_count; i++) { win = document.getElementById(mini_wins[i]); if (win !== null && win !== undefined) { if (parseFloat(win.style.left) <= 5) { ////win.style.position = "fixed"; ////win.style.top = (parseFloat(stowed_minimized_box_height) + parseFloat(menu_bar.offsetHeight) + parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; } } } } } ////minimize_window_main(); } function set_all_minimized_wins_position_absolute() { var mini_wins = null; var win_count = null; var i = null; var win = null; mini_wins = get_all_minimized_windows(); if (mini_wins !== null) { if (mini_wins.length > 0) { win_count = mini_wins.length; for (i = 0; i < win_count; i++) { win = document.getElementById(mini_wins[i]); if (win !== null && win !== undefined) { ////if (parseFloat(win.style.left) <= 5) { win.style.position = "absolute"; ////win.style.top = (parseFloat(stowed_minimized_box_height) + parseFloat(menu_bar.offsetHeight) + parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; ////} } } } } } function set_all_minimized_wins_position_fixed() { var mini_wins = null; var win_count = null; var i = null; var win = null; mini_wins = get_all_minimized_windows(); if (mini_wins !== null) { if (mini_wins.length > 0) { win_count = mini_wins.length; for (i = 0; i < win_count; i++) { win = document.getElementById(mini_wins[i]); if (win !== null && win !== undefined) { ////if (parseFloat(win.style.left) <= 5) { win.style.position = "fixed"; ////win.style.top = (parseFloat(stowed_minimized_box_height) + parseFloat(menu_bar.offsetHeight) + parseFloat(window.scrollY) * parseFloat(pixel_ratio)) + "px"; ////} } } } } }