// JavaScript Document

function showMenu(id, method) {
	if(method == 'show') {
		document.getElementById(id).src = 'images/menu/' + id + '_rol.gif';
	}
	else {
		document.getElementById(id).src = 'images/menu/' + id + '.gif';
	}
}

var nImage = 1;
function slideShow(id, path, images, delay) {
	$(id).style.background = 'url(\'' + path + images[nImage] + '\')';
	new Effect.Opacity('sfeer', { 
		duration: 1.0, 
		from: 1.0,
		to: 0.0,
		afterFinish: function() {
			$('sfeer').src = path + images[nImage];
			new Effect.Opacity('sfeer', { 
				delay: 3.0, 
				duration: 1.0, 
				from: 0.0,
				to: 1.0
			});
		}
	});
	nImage++;
	if(nImage >= images.length) {
		nImage = 0;
	}
}