
/*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();
		}
	}
	
function cambioEstilo(obj, estilo)
{
	obj.className= estilo;
}

function slDwn(obj)
   {
		for(x=1; x<=4; x++)
		{
			nombre = '#subm'+x;
			if(obj==x)
				$(nombre).slideDown('slow');
			else
				$(nombre).slideUp('slow');
		}
   }

   
   //color:#281700;
   
function queColor(obj)
{

	for(x=1; x<=7; x++)
	{
		var nombre = document.getElementById('r'+x);
			if(obj==x)
				nombre.style.color = '#281700';
			else
				nombre.style.color = '#B9B098';
	}
}
//tamanio navegador e imagenes lightVirt
function TamVentana() {  
  var Tamanyo = [0, 0];  
  if (typeof window.innerWidth != 'undefined')  
  {  
    Tamanyo = [  
        window.innerWidth,  
        window.innerHeight  
    ];  
  }  
  else if (typeof document.documentElement != 'undefined'  
      && typeof document.documentElement.clientWidth !=  
      'undefined' && document.documentElement.clientWidth != 0)  
  {  
 Tamanyo = [  
        document.documentElement.clientWidth,  
        document.documentElement.clientHeight  
    ];  
  }  
  else   {  
    Tamanyo = [  
        document.getElementsByTagName('body')[0].clientWidth,  
        document.getElementsByTagName('body')[0].clientHeight  
    ];  
  }  
  return Tamanyo; 
  
}
function saberTam() {  
  var Tam = TamVentana();  
 // alert('La ventana mide: [' + Tam[0] + ', ' + Tam[1] + ']');  
};    

function cuandoCarga()
{
	$('#pic').fadeOut('slow');
	$('#back').fadeOut('slow');
}

function mstroImg(imgB, wi, he)
{
	 var Tam = TamVentana();  
	//document.getElementById('back').className="visible";
	document.getElementById('imag').src=imgB;
	//document.getElementById('pic').className="visible";
	$('#pic').fadeIn('slow');
	$('#back').fadeIn('slow');

	wid = (Tam[0]-wi)/2;
	document.getElementById('pic').style.marginLeft=wid+'px';
	btnLeft = wi-66;
	document.getElementById('close').style.marginLeft=btnLeft+"px";
}
function abroLight(){
var Tam = TamVentana();  
$('#pic').fadeIn('slow');
$('#back').fadeIn('slow');
var wid = ((Tam[0])/2)-330; 
document.getElementById('pic').style.marginLeft=wid+'px';
	
}
function cerrar()
{
	//document.getElementById('back').className="oculto";
	$('#pic').fadeOut('slow');
	$('#back').fadeOut('slow');
	//document.getElementById('pic').className="oculto";
	cambioAjax('onolyimg.php', 'pic');
}

function envioCons(lugar)
{
	$('#consultaLocal').slideDown('fast');
	document.getElementById('c3').value= lugar;
	document.getElementById('nomLo').innerHTML= lugar;
	
}
function cerrarLoc()
{
	$('#consultaLocal').slideUp('fast');
}
