var commentNotExistsMessage;
var prevCommentRow;
var prevCommentRowBgColor;

window.onload = function()
{
	highlightComment( window.location.hash );
}

function highlightComment( hash )
{
	var regExp = /#comment\_[0-9]+$/ig;
	
	if( regExp.test( hash ) )
	{
		var commentRow = document.getElementById( "commentRow_" + hash.replace( "#comment_", "" ) );
		if ( commentRow )
		{
			if ( prevCommentRow && prevCommentRowBgColor )
			{
				prevCommentRow.style.backgroundColor = prevCommentRowBgColor;
			}
			prevCommentRow = commentRow;
			prevCommentRowBgColor = commentRow.style.backgroundColor ? commentRow.style.backgroundColor : "#FFFFFF";
			commentRow.style.backgroundColor = "#FFFBF2";
		}
		else
			alert( commentNotExistsMessage );
	}
}

