//Function to format text in the text box function FormatText(command, option){ frames.message.focus(); frames.message.document.execCommand(command, false, option); frames.message.focus(); } //Function to add image function AddImage(){ imagePath = prompt('Enter the web address of the image', 'http://'); if ((imagePath != null) && (imagePath != "")){ frames.message.focus(); frames.message.document.execCommand('InsertImage', false, imagePath); } frames.message.focus(); } //Function to clear form function ResetForm(){ if (window.confirm('Are you sure you want to reset the form?')){ frames.message.focus(); frames.message.document.body.innerHTML = ''; return true; } return false; } //Function to add smiley function AddSmileyIcon(imagePath){ frames.message.focus(); frames.message.document.execCommand('InsertImage', false, imagePath); }