var bPopulateDefined = false;

var iBars;
var aValues = new Array();
var iSleep = 50;
var iSize = 596;
var iStep = 5;
var iControl = 0;

var aTexts = new Array();
var sHighText = "";
var iHighCat = 0;

var oCommentWindow;
var sCommentWindowName = "fb_comment";
var sCommentWindowFeatures = "width=640,height=480,scrollbars=yes,toolbar=no,location=no,status=no,resizable=no";


function growBars()
{
	if(bPopulateDefined)
	{
		populate();

		setTimeout("resizeBars();",iSleep);
	}
}

function resizeBars()
{
	iControl += iStep;

	for(var i=1;i<=iBars;i++)
	{
		var iValue = iSize * aValues[i-1] / 9;
		
		var oBar = document.getElementById("bar"+i);

		if(iValue >= iControl)
			oBar.style.width = iControl+"px";
		else
			oBar.style.width = iValue+"px";
	}

	if(iControl < iSize)
		setTimeout("resizeBars();",iSleep);
}

function showText(sURL)
{
	if(!oCommentWindow || oCommentWindow.closed)
	{
		if(oCommentWindow)
		{
			oCommentWindow = null;
			delete oCommentWindow;
		}
		oCommentWindow = window.open(sURL, sCommentWindowName, sCommentWindowFeatures);
	}
	oCommentWindow.focus();

	return false;
}

