var currentX = false;
function init(x,y) {
    if(x==currentX) return;
    currentX = x;
    
	var gCallCount = 0;
	this.img = $(x);
	this.div = $(y);

	img.down('img').hide();	
	this.lis = $A(div.getElementsByTagName('li'));
	lis.each(Element.hide);
	div.show();
	$(lis.first()).show();

	this.list = lis.size();

	new PeriodicalExecuter(function(pe) {
		if (++gCallCount > list)
		{
			div.hide();
			img.down('img').show();	
			pe.stop();
		}
		else
		{
			div.down('li', gCallCount-1).show();
		}
	}, 1);

}