function ForumInsertAtCursor(myValue) 
		{
			myField	= document.getElementById('_val_tresc');
			//IE support
			if (document.selection) 
			{
				myField.focus();
				sel = document.selection.createRange();
				sel.text = myValue;
			}
			//MOZILLA/NETSCAPE support
			else if (myField.selectionStart || myField.selectionStart == '0') 
			{
				var startPos = myField.selectionStart;
				var endPos = myField.selectionEnd;
				myField.value = myField.value.substring(0, startPos)
				+ myValue
				+ myField.value.substring(endPos, myField.value.length);

				myField.selectionStart = startPos + myValue.length;
				myField.selectionEnd = startPos + myValue.length;
			} 
			else 
			{
				myField.value += myValue;
			}
			myField.focus();
			return false;
		}

function ajaxForm_ForumEditPost_Init()
{
	$('#TB_window a.button').each(function(){
		$(this).bind('click',function(){
			ForumInsertAtCursor(this.title);
			return false;
		});
	});
	$('_val_tresc').focus();
}
function ajaxForm_ForumAddPost_Init()
{
	$('#TB_window a.button').each(function(){
		$(this).bind('click',function(){
			ForumInsertAtCursor(this.title);
			return false;
		});
	});
	$('_val_tresc').focus();
}
function ajaxForm_ForumAddTopicPost_Init()
{
	$('#TB_window a.button').each(function(){
		$(this).bind('click',function(){
			ForumInsertAtCursor(this.title);
			return false;
		});
	});
	$('_val_tresc').focus();
}