function fixWindowHeight()
{
    var hght = xClientHeight() - xHeight('top_container') - xHeight('image_container') - xHeight('bottom_container');

    xHeight('content_container', hght);
	
    xHeight('scrollcontainer', hght);
}

Event.observe(window, 'load', fixWindowHeight);
Event.observe(window, 'resize', fixWindowHeight);

var moveImageBar = false;
var moveImageDirection = 'right';

function playImageBar()
{
	moveImageBar = true;
	animateImageBar();
}

function stopImageBar()
{
	moveImageBar = false;
}

function animateImageBar()
{
	if(moveImageBar)
	{
		var scrollpoint = $('image_container').scrollLeft;
		if(moveImageDirection=='right')
		{
			$('image_container').scrollLeft+=1;
		}
		else
		{
			$('image_container').scrollLeft-=1;
		}
		setTimeout("animateImageBar();",100);
		if(scrollpoint==$('image_container').scrollLeft)
		{
			if(moveImageDirection=='right')
			{
				moveImageDirection='left'
			}
			else
			{
				moveImageDirection='right';
			}
		}
	}
}

Event.observe(window, 'load', function ()
{
	playImageBar();
});
