Foto = new Array(5);
var num = 0;

Foto[0] = new Image();
Foto[1] = new Image();
Foto[2] = new Image();
Foto[3] = new Image();
Foto[4] = new Image();
Foto[0] = "fotosindex/00.jpg";
Foto[1] = "fotosindex/01.jpg";
Foto[2] = "fotosindex/02.jpg";
Foto[3] = "fotosindex/03.jpg";
Foto[4] = "fotosindex/04.jpg";
function PonerImagenes() 
{ 
num = getRandomNum(0, 5); //+1
document['Foto'].src=Foto[num]; 
} 
function getRandomNum(lbound, ubound) 
{
	return (Math.floor(Math.random() * (ubound - lbound)) + lbound);
}