function QuoteText(objTextArea, txtAuthor) {
	var txt = '';

	if (window.getSelection) {
		txt = window.getSelection();

	} else if (document.getSelection) {
		txt = document.getSelection();

	} else if (document.selection) {
		txt = document.selection.createRange().text;

	} else return;

	if( txt != '' )
	{
		if( txtAuthor != '' ) {
			objTextArea.value += '[quote='+txtAuthor+']'+txt+'[/quote] ';
		} else {
			objTextArea.value += '[quote]'+txt+'[/quote] ';
		}
	} else {
		alert("First highlight some text then click \"quote\".");
	}
}