function setWidthAndFitName(width, source, childTag, colLengthCal, widthforBigCol) {
	var makeTag = "#"+source+" "+childTag;
	var itemDiv = $$(makeTag);
	itemDiv.each( function(element) {
		element.style.width = widthforBigCol + 'px';
		fitName(element);
	});

}

function setFitNameForWidget(width, source, childTag, colLengthCal, widthforBigCol) {
	var makeTag = "#"+source+" "+childTag;
	var itemDiv = $$(makeTag);
	itemDiv.each( function(element) {
		//element.style.width = widthforBigCol + 'px';
		fitName(element);
	});

}


function fitName(element){
	if (!element.hasOverflown())
		return;
	while (element.hasOverflown()) {
		var displayed_name = element.innerHTML;
		element.update(displayed_name.truncate(displayed_name.length - 5));
	}
}

