var time;

function startMarquee(divId,width)
{
	time=setTimeout("scrollMarquee('innerScroll"+divId+"',-1,'"+width+"')",50);
}

function scrollMarquee(divId,direction,width)
{
	speed = 50;
	if(parseInt($(divId).style.left) < - parseInt($(divId).offsetWidth - width))
	{
		direction = 1;
		speed = 1500;
	}
	else if(parseInt($(divId).style.left) > 0)
	{
		direction = -1;
		speed = 1500;
	}
	
	$(divId).style.left = (parseInt($(divId).style.left) + direction) + "px";
	time=setTimeout("scrollMarquee('"+divId+"',"+direction+",'"+width+"')",speed)		
}

function restoreMarquee(divId)
{
	clearTimeout(time);
	$('innerScroll'+divId).style.left = 0 + "px";
}

function showTooltip(value)
{
	var visibility = "hidden";
	if(value)
	{
		visibility = "visible";
	}
	
	$('tooltipWrapper').style.visibility = visibility;
}