function replaceText(text, textarea) { if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange) { var caretPos = textarea.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; caretPos.select(); } else if (typeof(textarea.selectionStart) != "undefined") { var begin = textarea.value.substr(0, textarea.selectionStart); var end = textarea.value.substr(textarea.selectionEnd); var scrollPos = textarea.scrollTop; textarea.value = begin + text + end; if (textarea.setSelectionRange) { textarea.focus(); textarea.setSelectionRange(begin.length + text.length, begin.length + text.length); } textarea.scrollTop = scrollPos; } else { textarea.value += text; textarea.focus(textarea.value.length - 1); } return true; } function storeCaret(text) { if (typeof(text.createTextRange) != "undefined") text.caretPos = document.selection.createRange().duplicate(); } function f_sendmail(name, domain_1, domain_2,text) { if (text) { document.write(''+text+''); } else { document.write(''+name+'@'+domain_1+'.'+domain_2+''); } } function f_select(fl) { inputs = document.getElementsByTagName('input'); for (i = 1; i < inputs.length; i++){ if (inputs[i].type=='checkbox') { inputs[i].checked = fl; } } return; } function my_popup(src, width, height,title) { popup_w=window.open("about:blank", "_blank", "width="+(width+20)+", height="+(height+20)); popup_w.document.write(""+title+"
           
"); popup_w.document.write(""+title+""); popup_w.document.write("
           
"); } var old_id = ''; function my_menu(id) { if (old_id!='') document.getElementById('left_sub_menu_'+old_id).style.display='none'; document.getElementById('left_sub_menu_'+id).style.display='block'; old_id = id; }