

var last_fresh_selected=0;

var fresh_album=document.getElementById('freshhref_0').href;
document.getElementById('fpic').src = 'http://mp3panda.com/fresh/0.jpg';

var fresh_selected = null;
var fresh_runned = false;

var fresh_timeot = 3000;

function RunFreshClock()
{
	if (fresh_runned) return;
	fresh_runned = true;
	window.setTimeout(fnChangeUp, fresh_timeot);
}

function SetCurrentFresh(num)
{
	fresh_album = document.getElementById('freshhref_'+num).href;
	document.getElementById('fhref').href = fresh_album;
	document.getElementById('fpic').src = 'http://mp3panda.com/fresh/'+num+'.jpg';
	document.getElementById('fresh_'+last_fresh_selected).className = 't'+last_fresh_selected+' cell';
	document.getElementById('fresh_'+num).className = 't'+num+' cell sel';
	last_fresh_selected = num;
}

function fnChangeUp()
{
	if (fresh_selected != null)
	{
		fresh_runned = false;
		return;
	}
	var j = last_fresh_selected + 1;
	j = j % 5;
	SetCurrentFresh(j);
	window.setTimeout(fnChangeUp, fresh_timeot);
}

function FreshMouseOver(num)
{
	fresh_selected = num;
	SetCurrentFresh(num);
}

function FreshMouseOut(num)
{
	fresh_selected = null;
	RunFreshClock();
}

RunFreshClock();

