var init = function() {
	changeImage();
}

var changeImage = function() {
	rotator_new = document.createElement('img');
	Element.extend(rotator_new);
	rotator_new.src = randomimages[Math.floor(Math.random()*(randomimages.length))];
	rotator_new.setStyle({position: 'absolute', display: 'block'});
	Element.insert('banner-container', { top: rotator_new });
	new Effect.Fade($('banner-container').down().next());
	new Effect.Appear(rotator_new, {
		duration: 2.0, 
		afterFinish: function() {
			$('banner-container').down().next().remove()
			window.setTimeout(changeImage, 2000);
		}
	});
}

Event.observe(window, 'load', init);