function fade_in(perc, which)
{
	
	if(which < 6)
	{
		var the_div = document.getElementById(icons[which]);
		
		if(perc < 100)
		{
			the_div.style.opacity = perc/100;
			the_div.style.filter = "Alpha(opacity=" + perc + ")";
			
			perc++;
			
			window.setTimeout("fade_in(" + perc + "," + which + ")", 10);
		}
		else
		{
			//perc = 0;
			//which ++;
			
			//fade_in(perc, which);
		}
	}
	
}

function move(which, where)
{
	the_div = document.getElementById(icons[which]);

	if(which != fading && fade == 1)
	{
		fade_in(0,which);
		fading = which;
	}

	if(where < y)
	{	
		the_div.style.left = where + "px";
		where += speed;
		
		window.setTimeout("move(" + which + "," + where + ")", 10);
	}
	else
	{
		which += 1;
		
		the_div.style.top = x + "px";
		
		if(which < 7)
		{
			x -= 58;
			//alert(which);
			move(which, x_start);
		}
	}
}

function move_in()
{

	for(var i=0;i<6;i++)
	{
		var this_div = document.getElementById(icons[i]);
		
		var this_y = y_start;
		
		if(fade == 1)
		{
			this_div.style.opacity = 0;
			this_div.style.filter = "Alpha(opacity=" + 0 + ")";
		}
		
		this_div.style.top = x + "px";
		
		this_div.style.left = "-50px";
		
	}
	
	move(0, this_y);
}