function SetThumbName(id,str) {
	var div = document.getElementById('thumb-name');
	
	//to account for the fact id starts a 1 and not 0
	id -=1;
	
	if(id > 8) {
		var offset = getTextWidth(str) - 45;
		var xPos = (48 + (id * 45)) - offset;
	}
	else {
		var xPos = 48 + (id * 45);
	}
	
	div.style.marginLeft = xPos + "px";
	div.innerHTML = str;
	div.style.display = "block";
}

function HideThumb() {
	document.getElementById('thumb-name').style.display = "none";
}

function getTextWidth(text) {
   var ea = document.createElement("span");
   ea.innerHTML = text;
   document.body.appendChild(ea);
   var len = ea.offsetWidth;
   document.body.removeChild(ea);
   return len;
}