function ExternalLinks()
{
	if (!document.getElementsByTagName)
		return;
	var anchors	= document.getElementsByTagName("a");
	for (var i = 0; i < anchors.length; i++)
	{
		var anchor	= anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
			anchor.target	= "_blank";
	}
}
window.onload	= ExternalLinks;


function EditComment(CommentId)
{
	var	popup	= window.open('/edit-comment/'+CommentId, 'CommentAdmin', 'width=460,height=350,location=no,status=no,toolbar=no,directories=no,menubar=no');
	if (popup)
		return false;
	else
		return true;
}

function AddSmiley(elementId, code)
{
	var e = document.getElementById(elementId);
	e.value = e.value + code;
	e.focus();
}function ExternalLinks()
{
	if (!document.getElementsByTagName)
		return;
	var anchors	= document.getElementsByTagName("a");
	for (var i = 0; i < anchors.length; i++)
	{
		var anchor	= anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
			anchor.target	= "_blank";
	}
}
window.onload	= ExternalLinks;


function EditComment(CommentId)
{
	var	popup	= window.open('/edit-comment/'+CommentId, 'CommentAdmin', 'width=460,height=350,location=no,status=no,toolbar=no,directories=no,menubar=no');
	if (popup)
		return false;
	else
		return true;
}

function AddSmiley(elementId, code)
{
	var e = document.getElementById(elementId);
	e.value = e.value + code;
	e.focus();
}