function menuSuperior(){
	var submenu_itinerario = { "Salida Jueves"    : "jueves.htm",
							"Salida Viernes"  : "viernes.htm"}
		var submenu_extensiones = { "Itinerario"  : "itinerarioExt.htm",
							"Condiciones del viaje"    : "incluyeExt.htm",
							"Compañía Aérea"    : "transporteExt.htm",
							"Alojamiento"    : "alojamientoExt.htm",
							"Consejos"    : "consejosExt.htm",
							"Clima"    : "climaExt.htm",
							"Excursiones opcionales"    : "excursionesExt.htm"}
		var submenu_extensionesPolicia = { "Itinerario"  : "itinerarioExt.htm",
							"Condiciones del viaje"    : "incluyeExtPolicia.htm",
							"Compañía Aérea"    : "transporteExt.htm",
							"Alojamiento"    : "alojamientoExt.htm",
							"Consejos"    : "consejosExt.htm",
							"Clima"    : "climaExt.htm",
							"Excursiones opcionales"    : "excursionesExt.htm"}
		var submenu_extensionesMedia = { "Itinerario"  : "itinerarioExt.htm",
							"Condiciones del viaje"    : "incluyeExtMedia.htm",
							"Compañía Aérea"    : "transporteExt.htm",
							"Alojamiento"    : "alojamientoExt.htm",
							"Consejos"    : "consejosExt.htm",
							"Clima"    : "climaExt.htm",
							"Excursiones opcionales"    : "excursionesExt.htm"}
		var submenu_media = { "Recorrido"  : "recorridoMedia.htm",
							"Itinerario"  : "itinerarioMedia.htm",
							"Condiciones del viaje"    : "incluyeMedia.htm",
							"Compañía Aérea"    : "transporte.htm",
							"Alojamiento"    : "alojamiento.htm",
							"Consejos"    : "consejos.htm",
							"Clima"    : "climaMedia.htm",
							"Excursiones opcionales"    : "excursionesMedia.htm",
							"Extensión Las Vegas - San Francisco"    : submenu_extensionesMedia ,
							"Solicitud 2011"    : "Formulario_NEW_YORK_CITY_HALF_MARATHON_2011.doc"}
		var submenu_alojamientoBerlin = { "Hoteles"  : "alojamientoBerlin.htm",
							"Situación"    : "situacion.htm"}
		var submenu_policia = { 		"Condiciones del viaje"    : "incluyePolicia.htm",
							"Alojamiento"    : "alojamientoPolicia.htm",
							"Excursiones opcionales"    : "excursionesPolicia.htm",
							"Extensión Las Vegas - San Francisco"    : submenu_extensionesPolicia ,
							"Solicitud"    : "FORMULARIO_OLIMPIADAS_POLICIAS_Y_BOMBEROS.doc"}
		var submenu_berlin = { "Itinerario"  : "itinerarioBerlin.htm",
							"Condiciones del viaje"    : "incluyeBerlin.htm",
							"Alojamiento"    : submenu_alojamientoBerlin,
							"Recorrido"    : "recorridoBerlin.htm",
							"Solicitud 2010"    : "Formulario_REAL_BERLIN_MARATHON_2010.doc"}

		var submenu_NY = { "Historia"    : "historia.htm",
							"Recorrido"  : "recorrido.htm",
							"Itinerario"  : submenu_itinerario,
							"Condiciones del viaje"    : "incluye.htm",
							"Compañía Aérea"    : "transporte.htm",
							"Alojamiento"    : "alojamiento.htm",
							"Consejos"    : "consejos.htm",
							"Clima"    : "clima.htm",
							"Excursiones opcionales"    : "excursiones.htm",
							"Extensión Las Vegas - San Francisco"    : submenu_extensiones ,
							"Nuestro grupo 2009"    : "ny2008.htm", 
							"Comentarios corredores"    : "comentarios.htm",
							"Agradecimientos"    : "agradecimientos.htm",
							"Solicitud 2010"    : "Formulario_ING_NEW_YORK_CITY_MARATHON_2010.doc",
							"Maraton 2010"    : "maraton2010.htm"};
		
		
		var menu = { "newYork" : submenu_NY , "media" : submenu_media, "policias": submenu_policia, "berlin" : submenu_berlin};
	
		dhtmlmenu_build(menu);

}

function menuInferior(){
	
		var submenu_tienda = { "Contacto"    : "contactoTiendas.htm",
							"Atletismo"    : "obras.htm",
							"Baloncesto"  : "obras.htm",
							"Natación"    : "obras.htm"};
		
		
		var menu = { "tienda" : submenu_tienda };
		
		dhtmlmenupie_build(menu);
}





function at_display(x)
{
  var win = window.open();
  for (var i in x) win.document.write(i+' = '+x[i]+'<br>');
}

// ***** DropDown Control ******************************************************

var at_timeout = 50;

// ***** Show Aux *****

function at_show_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);

  p.className        = "active";

  if (c.offsetWidth <= 0)
  {
    c.style.position   = "absolute";
    c.style.visibility = "visible";
    c.style.display    = "block";
  }

  var direction = undefined;
  if (p.parentNode && p.parentNode["at_position"] == "x")
    direction = p.parentNode["at_direction"];

  var top   = (c["at_position"] == "y") ?  p.offsetHeight : 0;
  var left1 = (c["at_position"] == "x") ?  p.offsetWidth  : 0;
  var left2 = (c["at_position"] == "x") ? -c.offsetWidth  : 0;
  var left3 = (c["at_position"] == "x") ?  p.offsetWidth  : 0;

  for (; p; p = p.offsetParent)
  {
    if (p.style.position != 'absolute')
    {
      left1 += p.offsetLeft;
      left2 += p.offsetLeft;
      top   += p.offsetTop;
    }
    left3 += p.offsetLeft;
  }

  if (direction)
  {
    left = (direction == 'right') ? left1 : left2;
    c['at_direction'] = direction;
  }
  else
  {
    left = (left3+c.offsetWidth < document.body.offsetWidth) ? left1 : left2;
    c['at_direction'] = (left3+c.offsetWidth < document.body.offsetWidth) ? 'right' : 'left';
  }

  c.style.position   = "absolute";
  c.style.visibility = "visible";
  c.style.display    = "block";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
}

// ***** Hide Aux *****

function at_hide_aux(parent, child)
{
  document.getElementById(parent).className        = "parent";
  document.getElementById(child ).style.visibility = "hidden";
  document.getElementById(child ).style.display    = "block";
}

// ***** Show *****

function at_show(e)
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  at_show_aux(p.id, c.id);

  clearTimeout(c["at_timeout"]);
}

// ***** Hide *****

function at_hide()
{
  var c = document.getElementById(this["at_child"]);

  c["at_timeout"] = setTimeout("at_hide_aux('"+this["at_parent"]+"', '"+this["at_child" ]+"')", at_timeout);
}

// ***** Attach *****

function at_attach(parent, child, position)
{
  p = document.getElementById(parent);
  c = document.getElementById(child );

  p["at_child"]    = c.id;
  c["at_child"]    = c.id;
  p["at_parent"]   = p.id;
  c["at_parent"]   = p.id;
  c["at_position"] = position;

  p.onmouseover = at_show;
  p.onmouseout  = at_hide;
  c.onmouseover = at_show;
  c.onmouseout  = at_hide;
}

// ***** DropDown Menu *********************************************************

// ***** Build Aux *****

function dhtmlmenu_build_aux(parent, child, position)
{
  document.getElementById(parent).className = "parent";

  document.write('<div class="vert_menu" id="'+parent+'_child">');

  var n = 0;
  for (var i in child)
  {
    if (i == '-')
    {
      document.getElementById(parent).href = child[i];
      continue;
    }

    if (typeof child[i] == "object")
    {
      document.write('<a class="parent" id="'+parent+'_'+n+'">'+i+'</a>');
      dhtmlmenu_build_aux(parent+'_'+n, child[i], "x");
    }
    else document.write('<a id="'+parent+'_'+n+'" href="'+child[i]+'">'+i+'</a>');
    n++;
  }

  document.write('</div>');

  at_attach(parent, parent+"_child", position);
}
function dhtmlmenupie_build_aux(parent, child, position)
{
  document.getElementById(parent).className = "parent";

  document.write('<div class="vert_menu_pie" id="'+parent+'_child">');

  var n = 0;
  for (var i in child)
  {
    if (i == '-')
    {
      document.getElementById(parent).href = child[i];
      continue;
    }

    if (typeof child[i] == "object")
    {
      document.write('<a class="parent" id="'+parent+'_'+n+'">'+i+'</a>');
      dhtmlmenu_build_aux(parent+'_'+n, child[i], "x");
    }
    else document.write('<a id="'+parent+'_'+n+'" href="'+child[i]+'">'+i+'</a>');
    n++;
  }

  document.write('</div>');

  at_attach(parent, parent+"_child", position);
}
// ***** Build *****

function dhtmlmenu_build(menu)
{
  for (var i in menu) dhtmlmenu_build_aux(i, menu[i], "y");
}

function dhtmlmenupie_build(menu)
{
  for (var i in menu) dhtmlmenupie_build_aux(i, menu[i], "y");
}

/*****************************************************************************
Scroll de noticias. Script creado por Tunait! (21/8/2003)
Última modificación 27/3/04 se añade la opción de omitir las fechas
Si quieres usar este script en tu sitio eres libre de hacerlo con la condición de que permanezcan intactas estas líneas, osea, los créditos.
No autorizo a publicar y ofrecer el código en sitios de script sin previa autorización
Si quieres publicarlo, por favor, contacta conmigo.
http://javascript.tunait.com/
tunait@yahoo.com 
******************************************************************************/
var ancho = 250 //anchura del cuadro
var alto = 90 //altura del cuadro
var marco = 0 //0 para que notenga marco (borde)
var fondo = '#FFFFFF' //color de fondo del cuadro
var pausilla = 2000 //tiempo de la pausa en milisegundos (2000 = 2 segundos)
var cursor = "default;"  //cursor que se quiera sobre el cuadro
var colTitular = '#0B406F' //color del texto del titular
var colTexto = '#999999' // color del texto de la noticia
var colTitular1 = '#ff0000' // color del texto de la noticia
var colFecha = '#0B406F' //color del texto de la fecha
var colEnlace = '#00FF33' //color del texto del enlace
var fuente = "Verdana, Arial, Helvetica, sans-serif;" //fuente para los textos 
var tamTitular = '11' //tamaño de la fuente del titular
var tamTexto = '11' //tamaño de la fuente del texto de la noticia
var tamFecha = '11' // tamaño de la fuente de la fecha
var tamEnlace = '11' // tamaño de la fuente del enlace 
var masInfo = true //Determina si se usa o no el enlace. true para usarlo. false para omitirlo
var poneFecha = true //true para poner fecha. false para omitirla. Si no se quiere fecha, dejar las comillas vacías ""

function noticia(titular,texto,fecha,enlace,destino,imagen){
	this.titular = titular
	this.texto = texto
	this.fecha= fecha
	this.enlace = enlace
	this.destino = destino
	this.imagen=imagen
}
var noticias = new Array()
noticias[1]= new noticia("TIENDA","Puede ser la mejor zapatilla para tu entrenamiento del Maratón de New York..","21/02/2010","http://www.brooksrunning.es/run_happy_es.html","_blank","")
noticias[2]= new noticia("½ MARATON NEW YORK. ÚLTIMAS 5 INSCRIPCIONES","CAMBIO DE FECHA 1/2 MARATÓN NEW YORK: 21 MARZO ","21/03/2010","incluyeMedia.htm","_self","")
noticias[3]= new noticia("NUEVA PÁGINA WEB","ESTAMOS TRABAJANDO EN EL AÑO 2010. EN BREVE TE OFRECEREMOS PRECIOS Y CONDICIONES PARA QUE PUEDAS VIAJAR CON NOSOTROS A LOS MEJORES MARATONES DEL MUNDO.","10/12/09","home.htm","_self","")
noticias[4]= new noticia("½ MARATON NEW YORK","Pretendemos que tus vacaciones sean inolvidables. Atenderemos cualquier petición:Paquete completo, Avión + Inscripción, Alojamiento + Inscripción. Llámanos para informarte 958 589266/657 856 604","21/03/2010","incluyeMedia.htm","_self","")
noticias[5]= new noticia("MARATÓN BERLÍN","El circuito de las grandes marcas.  ABIERTO PLAZO DE INSCRIPCIÓN.","26/09/2010","incluyeBerlin.htm","_self","")
noticias[0]= new noticia("Más controles en los vuelos a EE.UU.","Tras el atentado fallido del vuelo Ámsterdam-Detroit de Delta, el Gobierno de Estados Unidos ha implantado medidas adicionales de seguridad","29/12/2009","transporte.htm","_self","")




var det = false
function escribe(){
document.write ('<div id="mami" style="width:' + ancho + 'px; height:' + alto + 'px; position:relative;  overflow:hidden ">')
document.write('<table bgcolor="' + fondo + '" border = "' + marco + '" width="' + ancho + 'px" height="100%"><tr><td valign="top">')
document.write ('<div id="uno" style="top:' + alto +'px; width:' + ancho + 'px; height:' + alto + 'px;  ">')
document.write ('<div class="titular1" id="titular1">')
document.write (noticias[0].titular)
document.write ('</div>')
document.write ('<div class="fecha">')
document.write (noticias[0].fecha)
document.write ('</div>')
document.write ('<div class="texto">')
document.write (noticias[0].texto)
document.write ('</div>')
if(masInfo == true){
	document.write ('<a class="enlace" href="')
	document.write (noticias[0].enlace)
	if (noticias[0].imagen != ""){document.write ('" target="' + noticias[0].destino + '"><br><img id="imagen" src="'+noticias[0].imagen+'"/></a>')}
	if (noticias[0].imagen == ""){
	document.write ('" target="' + noticias[0].destino + '">+ info...</a>')}
	}
document.write ('</div>')
document.write ('<div id="dos" style="top:' + (alto*2) +'px; width:' + ancho + 'px; height:' + alto + 'px; ">')
document.write ('<div class="titular" id="titular2">')
document.write (noticias[1].titular)
document.write ('</div>')
document.write ('<div class="fecha">')
document.write (noticias[1].fecha)
document.write ('</div>')
document.write ('<div class="texto">')
document.write (noticias[1].texto)
document.write ('</div>')
if(masInfo == true){
	document.write ('<a class="enlace" href="')
	document.write (noticias[1].enlace)
	if (noticias[1].imagen != ""){document.write ('" target="' + noticias[1].destino + '"><br><img  id ="imagen" src="'+noticias[1].imagen+'"/></a>')}
	if (noticias[1].imagen == ""){
	document.write ('" target = "' + noticias[1].destino + '">+ info...</a>')}
	}
document.write ('</div>')
document.write('</td></tr></table>')
document.write ('</div>')
if(navigator.appName == "Netscape")
{altoUno = document.getElementById('uno').offsetHeight}
else
{altoUno = document.getElementById('uno').clientHeight}
document.getElementById('uno').onmouseover =function(){
	det = true
	clearTimeout(tiempo)
	}
document.getElementById('uno').onmouseout =function(){
	det = false;
	clearTimeout(tiempo)
	escrolea()
	}

document.getElementById('dos').onmouseover =function(){
	det = true
	clearTimeout(tiempo)
	}
document.getElementById('dos').onmouseout =function(){
	det = false;
	clearTimeout(tiempo)
	 escrolea()
	 
	}
}
desp = 1
var cont = 1
var pos,pos2
function escrolea(){
pos = document.getElementById('uno').style.top
pos = pos.replace(/px/,"");
pos = pos.replace(/pt/,"");
pos = new Number(pos);
pos2 = document.getElementById('dos').style.top
pos2 = pos2.replace(/px/,"");
pos2 = pos2.replace(/pt/,"");
pos2 = new Number(pos2);
pos -= desp
pos2 -= desp

if (pos == desp){
	var contenidos = ""
	document.getElementById('dos').style.top = alto + "px"
	document.getElementById('dos').childNodes[0].firstChild.nodeValue  = noticias[cont].titular
 	if(cont == 0){
			 document.getElementById('titular2').style.color = "#FF0000"
		}else{
		document.getElementById('titular2').style.color = "#0B406F"
	}
	if(poneFecha == true){
	document.getElementById('dos').childNodes[1].firstChild.nodeValue  = noticias[cont].fecha
	}
	document.getElementById('dos').childNodes[2].firstChild.nodeValue  = noticias[cont].texto
	if(masInfo == true){
		document.getElementById('dos').childNodes[3].href = noticias[cont].enlace 
		document.getElementById('dos').childNodes[3].target = noticias[cont].destino
	}
	document.getElementById('uno').style.top = 0
	if(cont == noticias.length-1)
		{cont=0}
	else{
		cont++
		}
	pausa()
	return false
	}
else{
	if (pos2 == desp){
		var contenidos = ""
		document.getElementById('uno').style.top = alto + "px"
		document.getElementById('uno').childNodes[0].firstChild.nodeValue  = noticias[cont].titular
		if(cont == 0){
			 document.getElementById('titular1').style.color = "#FF0000"
		}else{
			document.getElementById('titular1').style.color = "#0B406F"
		}
		if(poneFecha == true){
		document.getElementById('uno').childNodes[1].firstChild.nodeValue  = noticias[cont].fecha
		}
		document.getElementById('uno').childNodes[2].firstChild.nodeValue  = noticias[cont].texto
		if(masInfo == true){
		document.getElementById('uno').childNodes[3].href  = noticias[cont].enlace
		document.getElementById('uno').childNodes[3].target  = noticias[cont].destino
		}
		document.getElementById('dos').style.top = 0
		if(cont == noticias.length-1)
		{cont=0

		}
	else{
		cont++
		//document.getElementById('titular1').style.color = "#0B406F"
		}
		pausa()
		return false
		}
	else{
		document.getElementById('uno').style.top = pos + "px"
		document.getElementById('dos').style.top = pos2 + "px"
		}

		
	}
tiempo = window.setTimeout('escrolea()',50)
}
var tiempo
function pausa()
{
clearTimeout(tiempo)
if (det == false){
	tiempo = setTimeout ('continuar()',2000)
	}
}
function continuar()
{
if(det == false)
	{escrolea()}
}

document.write('<style type="text/css">')
document.write ('#uno {')
document.write ('color: #006699;')
if(cursor == "pointer" || cursor == "hand"){
cursor = (navigator.appName == "Netscape")?'pointer;':'hand;';
}
document.write ('cursor:' + cursor + ";")
document.write ('position:absolute;}')
document.write ('#dos {')
document.write ('color: #006699;')
document.write ('cursor:' + cursor + ";")
document.write ('position:absolute;}')
document.write ('.titular{')
document.write ('color:' + colTitular +';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size :' + tamTitular + 'px;font-weight:bold}')
document.write ('.titular1{')
document.write ('color:' + colTitular1 +';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size :' + tamTitular + 'px;font-weight:bold}')
document.write ('.texto{')
document.write ('color:' + colTexto + ';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size:' + tamTexto + 'px;}')
if(poneFecha == true){
document.write ('.fecha{')
document.write ('color:' + colFecha +';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size :' + tamFecha + 'px;font-weight:bold}')
}
else{
document.write ('.fecha{display: none;}')
}
document.write ('.enlace{')
document.write ('color:' + colEnlace + ';')
document.write ('font-family:' + fuente + ';')
document.write ('font-size:' + tamEnlace + 'px;}')
document.write ('</style>')


