
contador = 0;
num_imagenes = 4;

array_imagen = new Array( num_imagenes );
array_imagen[0] = new Image(635,266);
array_imagen[0].src = "img/home_sup1.jpg";
array_imagen[1] = new Image(635,266);
array_imagen[1].src = "img/home_sup2.jpg";
array_imagen[2] = new Image(635,266);
array_imagen[2].src = "img/home_sup3.jpg";
array_imagen[3] = new Image(635,266);
array_imagen[3].src = "img/home_sup4.jpg";

function alternar_imagenes() {
    window.document["banner"].src = array_imagen[contador].src;
    contador++;
    if ( contador == num_imagenes )
        contador = 0;
    setTimeout( "alternar_imagenes()", 9000 );
}

function load() {
  if ( GBrowserIsCompatible() ) {
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng( 40.406490, -3.885000 ), 13 );

      // Our info window content
      var infoTabs = [
	     new GInfoWindowTab("TEYDE", "Sofia de Grecia 39<br>28660 Boadilla del Monte (Madrid)"),
	     new GInfoWindowTab("Contacto", "Tlf: (+34) 91 351 90 99<br>Fax: (+34) 91 351 91 02<br>Email: comercial@teyde.es")
	  ];

	  // Place a marker in the center of the map and open the info window
	  // automatically
	  var marker = new GMarker(map.getCenter());
	  GEvent.addListener(marker, "click", function() {
	    marker.openInfoWindowTabsHtml(infoTabs);
	  });
	  map.addOverlay(marker);
	  marker.openInfoWindowTabsHtml(infoTabs);
   }
}

function popup( mylink, windowname ) {
    if ( !window.focus )
        return true;

    var href;

    if ( typeof( mylink ) == 'string' )
        href = mylink;
    else
        href = mylink.href;

    window.open( href, windowname, 'width=530,height=330,scrollbars=no' );

    return false;
}

