<!--
function x () {
return;
}

function storeCaret (textEl) {
	if (textEl.createTextRange)
		textEl.caretPos = document.selection.createRange().duplicate();
} // end fn

function insertAtCaret (textEl, text) {
	if (textEl.createTextRange && textEl.caretPos) {
		var caretPos = textEl.caretPos;
		caretPos.text =
			caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?
			text + ' ' : text;
	} else {
		textEl.value  = textEl.value + text; // for non MSIE browsers just append it
	}

	return true;
}// fn




function DoSmilie(addSmilie) {
	var revisedMessage;
	var currentMessage = document.replier.message.value;
	revisedMessage = currentMessage+addSmilie;
	document.replier.message.value=revisedMessage;
	document.replier.message.focus();
	return;
}

	function DoPrompt(action) {
		var currentMessage = document.replier.message.value;

		if (action == "url") {
			var thisURL = prompt("Enter the complete URL for the link you wish to add.", "http://");
			if (thisURL == null){return;}

			var thisTitle = prompt("Now enter the title of the web page you wish to reference.  For instance, if you are linking to the URL for infopop, you might use the title Infopop Homepage.", "web page");
			if (thisTitle == null){return;}

			insertAtCaret(document.replier.message, ' ' + "[URL=" + thisURL + " target=_blank]" + thisTitle + "[/URL]" + ' ');
			document.replier.message.focus();
			return;
		}

		if (action == "email") {
			var thisEmail = prompt("Enter the complete email address that you wish to add.", "");
			if (thisEmail == null){return;}
			
			var thisName = prompt("Now enter the name you wish to reference.", "email address");
			if (thisName == null){return;}

			insertAtCaret(document.replier.message, ' ' + "[EMAIL]" + thisEmail + "]" + thisName + "[/EMAIL]" + ' ' );
			document.replier.message.focus();
			return;
		}

		if (action == "bold") {
			var thisBold = prompt("Enter the text that you wish to make bold.", "");
			if (thisBold == null){return;}

			insertAtCaret(document.replier.message, ' ' + "[B]" + thisBold + "[/B]" + ' ' );
			document.replier.message.focus();
			return;
		}

		if (action == "italics") {
			var thisItal = prompt("Enter the text that you wish to italicize.", "");
			if (thisItal == null){return;}

			insertAtCaret(document.replier.message, ' ' + "[I]" + thisItal + "[/I]" + ' ' );
			document.replier.message.focus();
			return;
		}

		if (action == "image") {
			var thisImage = prompt("Enter the complete URL for the image you wish to display.", "http://");
			if (thisImage == null){return;}

			insertAtCaret(document.replier.message, ' ' + "[IMG]" + thisImage + "[/IMG]" + ' ' );
			document.replier.message.focus();
			return;
		}

		if (action == "quote") {
			var thisQuote = prompt("Enter the text that you wish to quote.", "");
			if (thisQuote == null){return;}
			insertAtCaret(document.replier.message, ' ' + "[QUOTE]" + thisQuote + "[/QUOTE]" + ' ' );
			document.replier.message.focus();
			return;
		}

		if (action == "code") {
			insertAtCaret(document.replier.message, ' ' + "[CODE]  [/CODE]" + ' ' );
			document.replier.message.focus();
			return;
		}

		if (action == "liststart") {
			insertAtCaret(document.replier.message, ' ' + "[LIST]" + ' ' );
			document.replier.message.focus();
			return;
		}

		if (action == "listend") {
			insertAtCaret(document.replier.message, ' ' + "[/LIST]" + ' ' );
			document.replier.message.focus();
			return;
		}

		if (action == "listitem") {
			var thisItem = prompt("Enter the new list item.  Note that each list group must be preceded by a List Start and the entire list group must end with a List End (in order to display properly).", "");
			if (thisItem == null){return;}

			insertAtCaret(document.replier.message, ' ' + "[*]" + thisItem + ' ' );
			document.replier.message.focus();
			return;
		}

	}
//-->


