function ver(s){
	document.getElementById(s).style.visibility='visible';
}
function ocultar(s){
	document.getElementById(s).style.visibility='hidden';
}
function validarForm(){
	if (document.getElementById("form_nombre").value=="") {
		alert ("Los campos con * son obligatorios.");
		return false;
	}
	if (document.getElementById("form_email").value=="") {
		alert ("Los campos con * son obligatorios.");
		return false;
	}
	if (document.getElementById("form_consulta").value=="") {
		alert ("Los campos con * son obligatorios.");
		return false;
	}
	return true;
}
function validarFormSubir(){
	if (document.getElementById("form_autor").value=="") {
		alert ("Los campos con * son obligatorios.");
		return false;
	}
	if (document.getElementById("form_email").value=="") {
		alert ("Los campos con * son obligatorios.");
		return false;
	}
	if (document.getElementById("form_titulo").value=="") {
		alert ("Los campos con * son obligatorios.");
		return false;
	}
	if (document.getElementById("form_imagen").value=="") {
		alert ("Los campos con * son obligatorios.");
		return false;
	}
	if (!document.getElementById("form_acepto").checked) {
		alert ("No ha marcado la casilla de aviso legal.");
		return false;
	}
	return true;
}
/* function verImg_old(c,f,w,h){
	if ((w!=0) && (h!=0)) {
		url = "imagen.php?cat="+c+"&img="+f;
		prop = "width="+w+",height="+h+",resizable=no,location=no";
		window.open(url,"ventana_imagen",prop);
	}
} */
function verAmpliacion(s,w,h){
	divA = document.getElementById("ampliacion");
	divA.style.width = w;
	divA.style.height = h;
	divA.innerHTML = '<div onclick="javascript:ocultarAmpliacion();">Cerrar [X]</div><img src="'+s+'" width="'+w+'" height="'+h+'">';
	divA.style.visibility = 'visible';
}
function ocultarAmpliacion(){
	divA = document.getElementById("ampliacion");
	divA.style.visibility = 'hidden';
}
function verFotoAnt(s){
	n = s-1;
	document.getElementById("foto"+s).style.display="none";
	document.getElementById("foto"+n).style.display="block";
}
function verFotoSig(s){
	n = s+1;
	document.getElementById("foto"+s).style.display="none";
	document.getElementById("foto"+n).style.display="block";
}
