function LimitToolbarWidth()
{
	var totlalSize = 0;
	var isIE = Site.IsIE();
	var maxSize = isIE ? 305 : 265;
	var arrCells = document.getElementById(trToolbarID).childNodes;
	
	for (var i= 0; i < arrCells.length - 1; i++)
	{
		if (!isNaN(arrCells[i].offsetWidth)) {	totlalSize += arrCells[i].offsetWidth; }
	}
	
	if (totlalSize > window.screen.width - maxSize)
	{
		for (var i=  arrCells.length - 1; i > 0 && (totlalSize > window.screen.width - maxSize); i--)
		{			
			if (typeof (arrCells[i].offsetWidth) != "undefined")
			{
				totlalSize-= arrCells[i].offsetWidth * 1;	
				arrCells[i].style.display = "none";
			}
		}
		
		var oTr = document.getElementById(trToolbarID);
		var oCell = oTr.insertCell(oTr.cells.length );
		oTr.appendChild(oCell);
		oCell.vAlign  = "top";
		oCell.className = "chevron";
	
		var image = new Image();
		image.src = "/images/chevron.gif"
		oCell.appendChild(image);		
	}
}
