function ShowTitle(obj, comments, views, pro, con, none)
{
	var title = "Komentarų: " + comments;
	title += "<br>Peržiūrėjo: " + views;
	title += "<br>Pritaria: " + pro;
	title += "<br>Nepritaria: " + con;
	title += "<br>Susilaiko: " + none;
	showTip(obj, title);
}
  
 function getElementPosition(element)
 {
	var offsetTrail = element;
	var offsetLeft = 0;
	var offsetTop = 0;
	while (offsetTrail)
	{
		offsetLeft += offsetTrail.offsetLeft;
		offsetTop += offsetTrail.offsetTop;
		offsetTrail = offsetTrail.offsetParent;
	}
	if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined")
	{
		offsetLeft += document.body.leftMargin;
		offsetTop += document.body.topMargin;
	}
	return {left:offsetLeft, top:offsetTop};
 }
 
function showTip (obj, title) 
{
	var tip = document.getElementById('tooltip'); 
	tip.innerHTML = title;
	var position = getElementPosition(obj);
	tip.style.top = position.top + 15 + "px";

	tip.style.left = position.left + 15 + "px";
	tip.style.display = "block";
}
  
  function hideTip () 
  {
    var tip = document.getElementById('tooltip'); 
    tip.style.display = "none";
  }
