function openBox(id)
{
	var e = document.getElementById(id);
	e.style.display='block';
	return true;
}

function closeBox(id)
{
	var e = document.getElementById(id);
	e.style.display='none';
	return true;
}

function switchBox(id,direction,max)
{
	id = Number(id);
	closeBox(id);
	if (direction == 'right')
	{
		if (id == max) id = 1;
		else id = id+1;
	}
	if (direction == 'left')
	{
		if (id == 1) id = max;
		else id=id-1;
	}
	openBox(id);

}

