function AddSmiley(a){if(document.selection){document.nmsgr.msg.focus();var b=document.selection.createRange();b.text=a}else document.nmsgr.msg.focus(),document.nmsgr.msg.value=document.nmsgr.msg.value+a;document.nmsgr.msg.focus()}function format(a){if(document.selection){var b=document.selection.createRange().text;document.nmsgr.msg.focus();var c=document.selection.createRange();return c.text="["+a+"]"+b+"[/"+a+"]",void document.nmsgr.msg.focus()}if("Gecko"==navigator.product&&navigator.productSub>=20030210){var d=document.nmsgr.msg.selectionStart,e=document.nmsgr.msg.selectionEnd,f=document.nmsgr.msg.value;return document.nmsgr.msg.value=f.substring(0,d)+"["+a+"]"+f.substring(d,e)+"[/"+a+"]"+f.substring(e,f.length),void document.nmsgr.msg.focus()}var f=document.nmsgr.msg.value;return document.nmsgr.msg.value=f+"["+a+"] [/"+a+"]",void document.nmsgr.msg.focus()}function dolink(a){if(document.selection){var b=document.selection.createRange().text;document.nmsgr.msg.focus();var c=document.selection.createRange();return c.text="[l]"+a+b+"[/l]",void document.nmsgr.msg.focus()}if("Gecko"==navigator.product&&navigator.productSub>=20030210){var d=document.nmsgr.msg.selectionStart,e=document.nmsgr.msg.selectionEnd,f=document.nmsgr.msg.value;return document.nmsgr.msg.value=f.substring(0,d)+"[l]"+a+f.substring(d,e)+"[/l]"+f.substring(e,f.length),void document.nmsgr.msg.focus()}var f=document.nmsgr.msg.value;return document.nmsgr.msg.value=f+"[l]"+a+"[/l]",void document.nmsgr.msg.focus()}