function viewhide(id)
{
	if ( st(id).display == 'none' )
	{
		st(id).display = 'block';
	}
	else
	{
		st(id).display = 'none';
	}
}

var boxFotoScroll;
var direction;

function getFoto(line, dir)
{
	var box = boxFotoScroll = el(line);
	direction = parseInt(dir);
	switch (dir)
	{
		case '-1': // prev
			if ( box.scrollLeft != 0)
			{
				animate();
			}
			break;
		case '1': // next
			if ( (box.scrollLeft+box.offsetWidth) < box.scrollWidth )
			{
				animate();
			}
			break;
	}
}

var scrollLeftTo;
var timerFoto;
var step = 20;
function animate() 
{
	scrollLeftTo = 80;
	timerFoto = setInterval(setTo,50);
}
function setTo()
{
	if ( scrollLeftTo > 0 )
	{
		boxFotoScroll.scrollLeft += step*direction;
		scrollLeftTo -= step;
	}
	else
	{
		clearInterval(timerFoto);
	}
}

/* --------------------------------------- */
function el(id) { return document.getElementById(id); }
function st(id) { return el(id).style; }
