function ChEventTooltip(  ){	
	var tooltipWidth = parseInt(390);
		
	tooltip = document.getElementById('eTT');
	this.tooltipImage = document.getElementById('eTTi');	
	this.tooltipTitle = document.getElementById('eTTt');
	this.tooltipSeries = document.getElementById('eTTs');
	this.tooltipDesc = document.getElementById('eTTd');
	this.tooltipHour = document.getElementById('eTTh');
	this.tooltipDateAndChannel = document.getElementById('eTTdc');	
		
	
	this.dispaly = function( link, img, title, descr, hour, dateAndChannel ){

//		tooltipImage.src = tt.picture;
//		tooltipTitle.firstChild.nodeValue = tt.title;
//		tooltipDesc.firstChild.nodeValue = tt.desc;
		
		this.tooltipImage.src = img;
		/*
		this.tooltipTitle.firstChild.nodeValue = title;
		this.tooltipDesc.firstChild.nodeValue = descr;
		this.tooltipHour.firstChild.nodeValue = hour;
		this.tooltipDateAndChannel.firstChild.nodeValue = dateAndChannel;
		*/
		this.tooltipTitle.innerHTML = title;
		this.tooltipDesc.innerHTML = descr;
		this.tooltipHour.innerHTML = hour;
		this.tooltipDateAndChannel.firstChild.nodeValue = dateAndChannel;

		var windowWidth = document.body.offsetWidth;
		var posX = findPosX( link ) + parseInt( link.offsetWidth ) + 15;
		

		//if ( posX + document.getElementById("eventTooltipMainContainer").offsetWidth > windowWidth ){
		if ( posX  > windowWidth / 2 ){
			posX = findPosX( link ) - document.getElementById("eventTooltipMainContainer").offsetWidth - 10;
			document.getElementById("eventTooltipPointer").style.left = (document.getElementById("eventTooltipMainContainer").offsetWidth - 1) + "px";
			document.getElementById("eventTooltipPointer").src = "/img/chTTR.gif" 		
		}
		else{
			posX -= 16;
			document.getElementById("eventTooltipPointer").style.left = "-4px"
			document.getElementById("eventTooltipPointer").src = "/img/chTTL.gif" 
		}		

		var posY = findPosY( link ) - tooltip.offsetHeight + 23 ;
		tooltip.style.top  = posY + "px";
		tooltip.style.left = posX + "px";
		
		tooltip.style.display = 'block';
		tooltip.style.visibility = 'visible';
	}
	
	this.hide = function(){
		tooltip.style.visibility="hidden";			
	}
	
}

