var ocultar="";
function cambiaEstado(iden)  // FUNCION PARA DESPLEGAR/CERRAR LOS ELEMENTOS DEL MENU
  {
    var este = document.getElementById(iden);
    if (este.style.display == 'block')
      este.style.display = 'none';
    else
      este.style.display = 'block';
    if (ocultar!= "" && este!=ocultar) {
      ocultar.style.display = 'none';
    }
    ocultar=document.getElementById(iden);
  }
  
function redim(donde) {  // ADAPTA EL TAMAŅO DEL IFRAME Y LA CAPA DEL COLOR DE FONDO AL TAMAŅO DEL CONTENIDO
  if (donde == 'dentro') {
	//parent.document.getElementById("marco").style.height = parent.document.body.offsetHeight-200;
	//document.getElementById("capa").style.height = parent.document.body.clientHeight-200;
	parent.document.getElementById("marco").style.height = 885;
	document.getElementById("capa").style.height = 885;
  }
  if (donde == 'fuera') {
	document.getElementById("marco").style.height = document.body.offsetHeight-100;
	marco.document.getElementById("capa").style.height = document.body.clientHeight-100;
  }
}

function redim2011(donde) {  // ADAPTA EL TAMAŅO DEL IFRAME Y LA CAPA DEL COLOR DE FONDO AL TAMAŅO DEL CONTENIDO
  if (donde == 'dentro') {
	parent.document.getElementById("marco").style.height = 885;
	document.getElementById("capa").style.height = 885;
  }
  if (donde == 'fuera') {
	document.getElementById("marco").style.height = document.body.offsetHeight-100;
	marco.document.getElementById("capa").style.height = document.body.clientHeight-100;
  }
}

function imarco(cont) {
  marco.document.location.href=cont;
}

function foto(nombre,ventana)
{
	//ventana=nombre.substring(0, strlen-4);
	win = window.open('',ventana,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height=1,width=1,top=50,left=10');
	win.document.writeln ('<html>');
	win.document.writeln ('<head><title>CLUB NACIONAL SEAT 1430, 124 Y 124 SPORT</title></head>');
	win.document.writeln ('<script>');
	win.document.writeln ('if (document.layers) {n=1;ie=0;}');
	win.document.writeln ('if (document.all) {n=0;ie=1;}');
	win.document.writeln ('function redimensiona()');
	win.document.writeln ('{');
	win.document.writeln ('ancho=document.imagen.width;');
	win.document.writeln ('alto=document.imagen.height;');
	win.document.writeln ('if (n)');
	win.document.writeln ('	{');
	win.document.writeln ('window.resizeTo(ancho+2,alto+2);');
	win.document.writeln ('	}');
	win.document.writeln ('else');
	win.document.writeln ('	{');
	win.document.writeln ('window.resizeTo(ancho+10,alto+29);');
	win.document.writeln ('	}');
	win.document.writeln ('}');
	win.document.writeln ('</script>');
	win.document.writeln ('<body ONCLICK="javascript:window.close()" topmargin="0" leftmargin="0" marginwidth="no" marginheight="no">');
	win.document.writeln ('<img ONLOAD="redimensiona();" name=imagen src="' + nombre +'">');
	win.document.writeln ('</body>');
	win.document.writeln ('</html>');
}
