
function validar(){
      
	if(document.contacto.nombre.value == ""){
		alert("Debes rellenar tu nombre.");
		return false;
	}
		
	if(document.contacto.email.value == ""){
		alert("Debes rellenar tu email.");
		return false;
	}
	
	if(document.contacto.telefono.value == ""){
		alert("Debes rellenar tu teléfono.");
		return false;
	}
	
	if(document.contacto.comentarios.value == ""){
		alert("Debes dejar un comentario.");
		return false;
	}
	
} 

function ampliar(nfoto){
	var ancho, alto;
	
	document.getElementById("velo").style.zIndex="2";
	document.getElementById("capa_imagen").style.zIndex="3";
	document.getElementById("mifoto").src="imagenes/galeria/images/image-" + nfoto + ".jpg";	
}

function siguiente(foto){
	var nfoto, nfoto_siguiente, numero_fotos=25;
	
	nfoto=foto.src.substring(foto.src.indexOf(".jpg") -1, foto.src.indexOf (".jpg"));
	if(nfoto<numero_fotos){
		nfoto_siguiente=parseInt(nfoto)+1;
		document.getElementById("mifoto").src="imagenes/galeria/images/image-" + nfoto_siguiente + ".jpg";
	}
	else{
		document.getElementById("mifoto").src="imagenes/galeria/images/image-1.jpg";
	}
}

function volver_galeria(){
	document.getElementById("mifoto").src="imagenes/galeria/images/image-0.jpg";
	document.getElementById("velo").style.zIndex="-1";
	document.getElementById("capa_imagen").style.zIndex="-1";	
}
