function rotate(current, step, value, count)
{
	var item = document.getElementById("si" + current);
	value += step;
	item.style.opacity = value;
	item.style.filter = "alpha(opacity = " + Math.round(value * 100) + ")";
	if(step > 0)
	{
		if(value == step)
			item.style.display = "block";
		if(value > (1 - step))
			setTimeout("rotate(" + current + ", " + (-step) + ", 1, " + count + ")", 2000);
		else
			setTimeout("rotate(" + current + ", " + step + ", " + value + ", " + count + ")", 50);
	}
	else
		if(value < (-step))
		{
			item.style.display = "none";
			setTimeout("rotate(" + ((current + 1) % count) + ", " + (-step) + ", 0, " + count + ")", 0);
		}
		else
			setTimeout("rotate(" + current + ", " + step + ", " + value + ", " + count + ")", 50);
}
