var BordersArray = new Array(); BordersArray[0] = new setBorderAttributes(0); function setBorderAttributes(ID) { this.border_id = "border_id_"+ID; this.sequence = ID; } function alternate_border(ID) { if (! Element('border_id_'+ID)) return false; // Not possible to alternate show_hide_span_paging(ID); Element("footer_menu").style.display = (ID != "0" ? 'none' : ''); var len = BordersArray.length; for (var i=0; i < len; i++) { m = document.getElementById(BordersArray[i].border_id); if ((m)&&(m.className == 'menu-sel')) { m.className = 'menu'; c = document.getElementById("content_id_"+BordersArray[i].sequence); c.style.display = 'none'; if(Element("font_border_id_"+BordersArray[i].sequence)) Element("font_border_id_"+BordersArray[i].sequence).className = 'font-menu'; var body = Element('body_'+BordersArray[i].sequence); if (body) { try { if (Element('viewsource_rt_checkbox').checked) { connector.loadScript("rich_text_editor"); RichTextEditor.viewsource(false); } } catch(e) { //alert(e.message) } } } } m = Element("border_id_"+ID); if (m) m.className = 'menu-sel'; if(Element("font_border_id_" + ID)) Element("font_border_id_" + ID).className = 'font-menu-sel'; var c = Element("content_id_"+ID) if (c) c.style.display = ''; body = document.getElementById('body_'+ ID); if (body){ try{ if(ID){ connector.loadScript("rich_text_editor"); RichTextEditor.loadEditor(ID); } body.contentWindow.document.designMode="on"; } catch(e){ //alert(e.message); } } // hide the DropDrowContact, if necessary window_DropDownContacts = Element('tipDiv'); if ((window_DropDownContacts)&&(window_DropDownContacts.style.visibility != 'hidden')){ window_DropDownContacts.style.visibility = 'hidden'; } if (typeof(ID) == 'number') { current_folder = openBox.tab_folder[ID]; numBox=ID; } return ID; } function create_border(borderTitle, id_value) { var resize = false; var offWidth = Element('border_blank').offsetWidth ? Element('border_blank').offsetWidth : Element('border_blank').clientWidth; if (offWidth < 200) { resize = resize_borders(); if (!resize){ alert(get_lang('Reached maximum tab limit')); return false; } } Element("footer_menu").style.display = 'none'; if (! id_value) // Is new message? var ID = parseInt(BordersArray[(BordersArray.length-1)].sequence) + 1; else{ if (Element("border_id_"+id_value)){ // It's opened already! alternate_border(id_value); return false; } var ID = id_value; if (Element("border_id_"+id_value+"_r")) // Edit message? if yes treat like new in dragdrop case var id_value = null; } td = document.createElement("TD"); td.id="border_id_" + ID; if(resize) { td.setAttribute("width", parseInt(resize)+"px"); td.style.width = parseInt(resize)+"px"; } else td.setAttribute("width", "200px"); td.className = "menu"; td.setAttribute("align", "right"); td.onclick = function(){alternate_border(ID);}; td.setAttribute("noWrap","true"); var subject = borderTitle; borderTitle = borderTitle ? borderTitle : id_value ? get_lang("No Subject") : " " ; td.value = borderTitle; if (borderTitle.length > 21){ borderTitle = borderTitle.substring(0,21) + "..."; } if (resize) borderTitle = borderTitle.substring(0, resize*0.08); td.innerHTML = "
" + borderTitle + " | ![]() |