
/*vaciar*/
function vaciarForm(obj,comp)
{
 if(obj.value == comp)
 {
	obj.value = '';
 }
 else if (obj.value == '')
 {
	obj.value = comp;
 }
 else {}
}
/*vaciar*/
function mostrar(obj1,obj2)
{
	document.getElementById(obj1).className = 'visible';
	document.getElementById(obj2).className = 'oculto';
	
	
}


/*submit*/
function submitir(obj)
{
	document.getElementById(obj).submit();	
}
/*submit*/

 /*confirmar*/
function confirmar(link)
{
	if (confirm("Quiere eliminar este registro?")) {
	window.open(link, '_self');
	}
	else {

	}
}
/*confirmar*/

function men(obj)
{
	for(x=1; x<4; x++)
	{
		var a= 'sub'+x;
		if(x==obj)
		{
			$('#'+a).slideDown('fast');
		}
		else
		{
			$('#'+a).slideUp('fast');
		}
	}
}



/*admin menu*/
function downMenu(obj)
{
	$('#'+obj).slideToggle('fast');
}
/*admin menu*/
/*check - uncheck all*/
function checkAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = true ;
}

function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = false ;
}
/*check - uncheck all*/
/*lefnav redimensionar*/
function mostrar(){
 var hei = document.getElementById('cont').offsetHeight;
 document.getElementById('menuLeft').style.height = hei+'px';
}
/*lefnav redimensionar*/
/*reloj admin*/

<!-- Se abre el comentario para ocultar el script de navegadores antiguos

function muestraReloj()
{
// Compruebo si se puede ejecutar el script en el navegador del usuario
if (!document.layers && !document.all && !document.getElementById) return;
// Obtengo la hora actual y la divido en sus partes
var fechacompleta = new Date();
var horas = fechacompleta.getHours();
var minutos = fechacompleta.getMinutes();
var segundos = fechacompleta.getSeconds();
var mt = "AM";
// Pongo el formato 12 horas
if (horas > 12) {
mt = "PM";
horas = horas - 12;
}
if (horas == 0) horas = 12;
// Pongo minutos y segundos con dos dígitos
if (minutos <= 9) minutos = "0" + minutos;
if (segundos <= 9) segundos = "0" + segundos;
// En la variable 'cadenareloj' puedes cambiar los colores y el tipo de fuente
cadenareloj = "" + horas + ":" + minutos + ":" + segundos + " " + mt + "";
// Escribo el reloj de una manera u otra, según el navegador del usuario
if (document.layers) {
document.layers.spanreloj.document.write(cadenareloj);
document.layers.spanreloj.document.close();
}
else if (document.all) spanreloj.innerHTML = cadenareloj;
else if (document.getElementById) document.getElementById("spanreloj").innerHTML = cadenareloj;
// Ejecuto la función con un intervalo de un segundo
setTimeout("muestraReloj()", 1000);
}

// Fin del script -->
/*reloj admin*/

 /*confirmar*/
function confirmar(link, mens)
{
	if (confirm(mens)) {
	window.open(link, '_self');
	}
	else {

	}
}
/*confirmar*/

function submitirN()
	{
		var a = document.getElementById('mail');
		if(a.value==null || a.value=='' || a.value=='email')
		{
			alert ('Escribe tu mail para recibir el newsletter');
		}
		else
		{
			alert('Gracias por suscribirte.');
			document.getElementById('nwform').submit();
		}
	}

