_icon_dir = URL_SERVER + 'expressoMail1_2/templates/'+template+'/images/menu/'; function ConstructMenuTools(){ // Layout padrão de menu = option1 var _divMenu = Element('menu_tools'); if(_divMenu) return; var _option1 = preferences.hide_folders == "1" ? false : true; if (!expresso_offline) { var itens = new Array("preferences_mail()|" + get_lang("Preferences") + "|preferences.png", "search_emails(\"\")|" + get_lang("Search") + "|search.png", "filterbox()|" + get_lang("Edit filters") + "|filters.png", "folderbox()|" + get_lang("Edit folders") + "|editfolders.png", "sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png", "empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png"); if(preferences.use_local_messages==1) { if(expresso_local_messages.is_offline_installed()) { itens.push("force_check_queue()|" + get_lang("Send from queue") + "|queue.jpg"); } } } else { var itens = new Array("search_emails(\"\")|" + get_lang("Search") + "|search.png", "folderbox()|" + get_lang("Edit folders") + "|editfolders.png"); } var _link = Element('link_tools'); _divMenu = document.createElement("DIV"); _divMenu.id = "menu_tools"; _divMenu.style.position = "absolute"; _divMenu.style.top = findPosY(_link) + (_option1 ? 19 : 14); _divMenu.style.left = findPosX(_link) + (_option1 ? 22 : 22); _divMenu.style.width = "auto"; _divMenu.style.height = "auto"; _divMenu.style.padding = "1px"; _divMenu.style.paddingTop = "0px"; _divMenu.style.zIndex = "10000"; _divMenu.style.backgroundColor = "WHITE"; _divMenu.style.border = "1px solid #999999"; _divMenu.style.borderTop = "0px solid #FFFFFF"; _divMenu.style.visibility = "hidden"; var _timeout = false; _hideMenuTools = function () { Element('menu_tools').style.visibility = "hidden"; }; _viewMenuTools = function () { Element('menu_tools').style.visibility = "visible"; }; var _mouseover = _link.onmouseover; _link.onmouseover = function () { var _option1 = preferences.hide_folders == "1" ? false : true; var _link = Element('link_tools'); Element('menu_tools').style.top = findPosY(_link) + (_option1 ? 19 : 14); if(_timeout) { clearTimeout(_timeout); _timeout=false; } if(_mouseover) _mouseover(); _timeout = setTimeout("_viewMenuTools();",500); }; _link.onmouseout = function () { if(_timeout) { clearTimeout(_timeout); _timeout=false; } if(_option1) unset_menu_bg(Element("link_tools")); _timeout = setTimeout("_hideMenuTools();",500); }; var _t = document.createElement("TABLE"); _t.cellPadding="0"; _t.cellSpacing="0"; _t.onmouseover = function () { if(_timeout) { clearTimeout(_timeout); _timeout=false; } if(_mouseover) _mouseover(); Element('menu_tools').style.visibility = "visible"; }; var _tbody = document.createElement("TBODY"); var buildTr = function(value) { var item = value.split('|'); var _tr = document.createElement("TR"); var _td = document.createElement("TD"); _td.innerHTML = ' '+item[1]+' '; _td.style.color = "DARKBLUE"; _td.style.cursor = "pointer"; if(_option1) _td.style.border = '1px solid #f7f7f7'; _td.onclick = function() { Element('menu_tools').style.visibility='hidden';eval(item[0]);}; _td.onmouseover = function () { if(_timeout) { clearTimeout(_timeout); timeout=false; } if(_option1) set_menu_bg(this); else { this.style.textDecoration="underline"; this.style.color = 'DARKORANGE'; } }; _td.onmouseout = function () { _timeout = setTimeout("_hideMenuTools();",500); if(_option1){ unset_menu_bg(this); unset_menu_bg(Element("link_tools")); }else { this.style.backgroundColor = 'WHITE'; this.style.textDecoration="none"; this.style.color = 'DARKBLUE'; } }; _tr.appendChild(_td); return _tr; }; for(i = 0; i < itens.length; i++) _tbody.appendChild(buildTr(itens[i])); _t.appendChild(_tbody); _divMenu.appendChild(_t); document.body.appendChild(_divMenu); } function openListUsers(border_id) { expresso.connector.loadScript("jscode/QuickCatalogSearch"); QuickCatalogSearch.showCatalogList(border_id); } function ConstructRightMenu(_event){ var div = Element("div_rightbutton"); if(!div){ div = document.createElement("DIV"); div.style.position = 'absolute'; div.style.zIndex = '15'; div.style.border = '1px outset BLACK'; div.style.background = "#EEEEE6"; div.id = 'div_rightbutton'; div.style.padding = "1px"; div.style.fontSize = is_ie || is_gecko1_5 || is_win ? "9pt" : "11pt"; div.style.width = "190px"; div.style.height = is_win && !is_ie ? "129px" : "139px"; div.style.display ='none'; document.body.appendChild(div); var _tab = " "; var _sep = "