var flipTimer = false;

function flip_arrow (action, revert)
{
	if (flipTimer == true && action == 0)
	{
		return false;
	}
	
	var a = $('.cont-header>img.cont-arrow');

	if (revert == true && action < 6 && action >= 0)
	{
		a.attr('src', '/images/arrow/f' + action + '.png');
		setTimeout("flip_arrow(" + --action + ", true)", 60);	
	}
	
	else
	{
		if (typeof action == 'number' && action >= 0 && action <= 6)
		{	
			flipTimer = true;
			a.attr('src', '/images/arrow/f' + action + '.png');
			
			if (action < 6)
			{
				setTimeout("flip_arrow(" + ++action + ")", 60);
			}
			
			else 
			{
				setTimeout("flip_arrow(" + --action + ", true)", 60);
			}
		}
	}
	
	if (typeof action == 'number' && action == 0 && revert == true)
	{
		flipTimer = false;
	}	
}
