

function inicio(valor){
	
	if(valor == "si"){
		window.location.href="index.html";
		
	}else{
		window.location.href="../" + "index.html";
		
	}
}
	
function ir(pagina,valor){
	
	if(valor == "si"){
		window.location.href= pagina +"/" + pagina + ".html";
		
	}else{
		window.location.href= "../" + pagina +"/" + pagina + ".html";
		
	}
}

function visible(valor){

	if(valor == "photoshop"){
		document.getElementById("trabajos_clase").style.visibility = "hidden";
		document.getElementById("photoshop").style.visibility = "visible";
		document.getElementById("carteles").style.visibility = "hidden";
		document.getElementById("fotos").style.visibility = "hidden";		
		
	}

	if(valor == "clase"){
		document.getElementById("trabajos_clase").style.visibility = "visible";
		document.getElementById("photoshop").style.visibility = "hidden";
		document.getElementById("carteles").style.visibility = "hidden";
		document.getElementById("fotos").style.visibility = "hidden";
	}
	
	
	
	if(valor == "carteles"){
		document.getElementById("trabajos_clase").style.visibility = "hidden";
		document.getElementById("photoshop").style.visibility = "hidden";
		document.getElementById("carteles").style.visibility = "visible";
		document.getElementById("fotos").style.visibility = "hidden";
	}
	
	if(valor == "fotos"){
		document.getElementById("trabajos_clase").style.visibility = "hidden";
		document.getElementById("photoshop").style.visibility = "hidden";
		document.getElementById("carteles").style.visibility = "hidden";
		document.getElementById("fotos").style.visibility = "visible";
	}
	
	
}

function cargarIframe(valor,n){

	document.getElementById("imagen_grande").style.visibility = "visible";
	document.getElementById("imagen_grande").src = ".." + valor;
	
	if(n == 2){
		document.getElementById("mensajito").style.visibility = "visible";
	}else{
		document.getElementById("mensajito").style.visibility = "hidden";
	}
		
	
	
}


function escribirFormulario(){
	
		var nombre;
		var email;
		var comentarios;
		var mensaje;
		
		nombre = document.getElementById("txtNombre").value;
		email = document.getElementById("txtEmail").value;
		comentarios = document.getElementById("txtComentarios").value;
		
		if(nombre == ""){
			alert("Introduce algo en el nombre");
			return false;
		}
		
		
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)){			
			return (true)
		} else {
			alert("La dirección de email es incorrecta.");
			return (false);
		}
		
		if(comentarios == ""){
			alert("Introduce algún comentario");
			return false;
		}
				

}

function abrirOriginal(){
	
	ruta = document.getElementById("imagen_grande").src;	
	
	
	if((ruta.indexOf("aralar")) != -1){
		window.open("http://www.bocetada.com/curso_0910/xabi/Aralar/index.html");
		return false;
	}
	
	if((ruta.indexOf("elChaval")) != -1){
		window.open("http://www.bocetada.com/curso_0910/xabi/El_chaval/elChaval.jpg");
		return false;
	}
	
	if((ruta.indexOf("pepis")) != -1){
		window.open("http://www.bocetada.com/curso_0910/xabi/Pepis/index.html");
		return false;
	}
	
	if((ruta.indexOf("alfredo")) != -1){
		window.open("http://www.bocetada.com/curso_0910/xabi/sitio_alfredo/index.html");
		return false;
	}
	
	if((ruta.indexOf("DeVino")) != -1){
		window.open("http://www.bocetada.com/curso_0910/xabi/DeVino/DeVino.jpg");
		return false;
	}
	
	if((ruta.indexOf("noticia")) != -1){
		window.open("http://www.bocetada.com/curso_0910/xabi/Noticia/index.html");
		return false;
	}
	
	if((ruta.indexOf("koldo")) != -1){
		window.open("http://www.bocetada.com/curso_0910/xabi/web_koldo/index.html");
		return false;
	}
	
}



