 // Finds the base height of a link, this is done by setting the innert HTML to "."
this.findBaseHeight = function(item)
{
	var innerHTML = item.innerHTML;
	item.innerHTML = ".";
	// Get baseline height
	var baseHeight = item.offsetHeight;
	item.innerHTML = innerHTML;
	return baseHeight;
}

// Trims a link until the specified height
this.trimItem = function(item, baseHeight)
{
	    if (item.offsetHeight > baseHeight)
		    item.innerHTML += "...";
	    // reduce until baseline hit

    for (var i = 2; i > 0; i--)
    {	   
 if (item.offsetHeight > baseHeight && item.innerHTML.length > 3)
		    item.innerHTML = item.innerHTML.substring(0,item.innerHTML.length-4) + "...";
else
break;
}
}

function initCompetitions() {
	// limit copy to 3 lines max
	this.trimItem(document.getElementById("cat_hl_87059").childNodes[1].childNodes[2], 51);
	this.trimItem(document.getElementById("cat_hl_87059").childNodes[3].childNodes[2], 51);
}



