﻿function cambiar (flag,img) {
	if (document.images) {
		if (flag==1){
			document.images[img].src = Arreglo[0].src;
		} 
		else{
			if (flag==2){
			document.images[img].src = Arreglo[1].src;
			} 
			else{
				if (flag==3){
				document.images[img].src = Arreglo[2].src;
				}else{
					// si se quita el comentario vuelve a la imagen inicial
					document.images[img].src = 'logo1.jpg';
				}		
			}
		} 
	}
}




function cargarImgs(img,nombreFoto1,nombreFoto2,nombreFoto3){
	Arreglo = new Array ();
	imagen1=new Image(124,160);
	imagen1.src=nombreFoto1;
	imagen2=new Image(124,160);
	imagen2.src=nombreFoto2;
	imagen3=new Image(124,160);
	imagen3.src=nombreFoto3; 
	Arreglo.push(imagen1);
	Arreglo.push(imagen2);
	Arreglo.push(imagen3);

}