function closePopup() {
	if (window.top && window.top.myLightWindow) window.top.myLightWindow.deactivate();
	else window.location = 'index.php';
}


document.observe('dom:loaded',
	function () {
		var theImages = $$('#image a');
		if (theImages && theImages.length > 1) {
			theImages.each(function(iteration) { iteration.hide(); });
			theImages[0].show();
			
			new PeriodicalExecuter(function () {
				var theImages = $$('#image a');
				if (theImages.length > 1) {
					el2 = theImages[0];
					for(var i=0; i<theImages.length; i++) {
						if (theImages[i].visible()) {
							el1 = theImages[i];
							if (i+1 < theImages.length) el2 = theImages[i+1];
						}
					}
					new Effect.Fade(el1, {duration: 1.5});
					new Effect.Appear(el2, {duration: 1.5});
				}
			}, 10);
		}
	}
);