var banners = new Array();
	
banners[0] = "/img/foto/foto1.gif";
banners[1] = "/img/foto/foto2.gif";
banners[2] = "/img/foto/foto3.gif";
banners[3] = "/img/foto/foto4.gif";
banners[4] = "/img/foto/foto5.gif";
banners[5] = "/img/foto/foto6.gif";

var current = new Array();
current[0] = 0;
current[1] = 1;
current[2] = 2;
var i = 0;

function turn_it() {
	var i = Math.round(Math.random() * 3);
	var bNum;

	flag = false;
	while (!flag) {
		bNum = Math.round(Math.random() * (banners.length - 1));
		flag = true;
		for (j=0; j<3; j++) {
			if (j != i) 
				if (bNum == current[j]) 
					flag = false;
		}
	}

	switch(i) {
		case 0:
			document.foto1.src = document.location.protocol + "//" + document.location.hostname + banners[bNum];		
			break;
		case 1:
			document.foto2.src = document.location.protocol + "//" + document.location.hostname + banners[bNum];		
			break;
		case 2:
			document.foto3.src = document.location.protocol + "//" + document.location.hostname + banners[bNum];		
			break;
	}
	current[i] = bNum;
}
