/* Borran campos input */
function borrar (obj) {
    obj.value = ""; 
}; 
function borrar2 (obj2) {
    obj2.value = ""; 
}; 

/* Valida formulario Contacto*/
function validarfrmContacto(){
    if(document.frmContacto['nombre'].value == "... nombre" || !document.frmContacto['nombre'].value) {
       alert("Tiene que escribir su nombre en el formulario derecho.");
	   document.frmContacto['nombre'].focus();
	}else if(document.frmContacto['email'].value == "... email" || !document.frmContacto['email'].value) {
       	alert("Tiene que escribir su email en el formulario derecho.");
	   	document.frmContacto['email'].focus();
			}else if(document.frmContacto['tlf'].value == "... teléfono" || !document.frmContacto['tlf'].value) {
			alert("Tiene que escribir su teléfono en el formulario derecho.");
			document.frmContacto['tlf'].focus();
			}
			else { document.frmContacto.submit(); 
	}
	return false;	
}

/* Valida formulario Seccion Contacto */
function validarfrmSContacto(){
    if(document.frmSContacto['name'].value == "... nombre" || !document.frmSContacto['name'].value) {
       alert("Tiene que escribir su nombre en el formulario.");
	   document.frmSContacto['name'].focus();
	}else if(document.frmSContacto['surname'].value == "... apellido" || !document.frmSContacto['surname'].value) {
       	alert("Tiene que escribir su apellido en el formulario.");
	   	document.frmSContacto['surname'].focus();
			}else if(document.frmSContacto['phone'].value == "... teléfono" || !document.frmSContacto['phone'].value) {
			alert("Tiene que escribir su teléfono en el formulario.");
			document.frmSContacto['phone'].focus();	
				}else if(document.frmSContacto['email'].value == "... email" || !document.frmSContacto['email'].value) {
				alert("Tiene que escribir su email en el formulario.");
				document.frmSContacto['email'].focus();
				}
				else { document.frmSContacto.submit(); 
	}
	return false;	
}

/* Muestra y oculta listas */
function MostrarOcultar(id,num) {

	if (id!='prim') { document.getElementById('prim').style.display = 'none' }
	if (id!='seg') { document.getElementById('seg').style.display = 'none' }
	if (id!='terc') { document.getElementById('terc').style.display = 'none' }
	if (id!='cuarto') { document.getElementById('cuarto').style.display = 'none' }
	if (id!='quinto') { document.getElementById('quinto').style.display = 'none' }
	if (id!='sexto') { document.getElementById('sexto').style.display = 'none' }
	if (id!='sept') { document.getElementById('sept').style.display = 'none' }
	if (id!='oct') { document.getElementById('oct').style.display = 'none' }
	if ( num != 1 ) { if(id!='noveno') { document.getElementById('noveno').style.display = 'none'  }}

	if ( document.getElementById(id).style.display == 'none') {
		document.getElementById(id).style.display = 'block';
	} else {
		document.getElementById(id).style.display = 'none';
	}
}