<script> function mptags(mpt1,mpt2){ if (document.selection){document.fmsg.text0.focus();document.fmsg.document.selection.createRange().text = mpt1+document.fmsg.document.selection.createRange().text+mpt2;} else {document.fmsg.text0.value += mpt1+mpt2;} } </script>
<input type=button onclick="mptags('[b]','[/b]');" value=[b]> <input type=button onclick="mptags('[u]','[/u]');" value=[u]> <input type=button onclick="mptags('[i]','[/i]');" value=[i]>