function getSel()
{
	var txt = '';
	var foundIn = '';
	if (window.getSelection)
	{
		txt = window.getSelection();
		foundIn = 'window.getSelection()';
	}
	else if (document.getSelection)
	{
		txt = document.getSelection();
		foundIn = 'document.getSelection()';
	}
	else if (document.selection)
	{
		txt = document.selection.createRange().text;
		foundIn = 'document.selection.createRange()';
	}
	else return;
	document.comment.body.value = '[quote]' + txt + '[/quote]';
}

function SetReplyMode(id) {
	document.comment.replymode.value= id;
	document.getElementById("ReplyModeSpace").style.display="block"
	$('ReplyModeSpace').innerHTML = '<div id=\"replymode\"><div class=replymodet>[Modo respuesta]<br><a class=selgame onClick=SetNormalMode()>[Cancelar]</a> <a class=selgame onmousedown=javascript:getSel()>[Citar texto seleccionado]</a></div></div></div>';
}

function SetNormalMode() {
	var nada = null;
document.comment.replymode.value= nada;
document.getElementById("ReplyModeSpace").style.display="none"
}