// definition of images
uvita       = new Image();
uvita.src   = "./images/map/uvita-map.jpg";
uvita.name = "uvita";
ballena     = new Image();
ballena.src = "./images/map/ballena-map.jpg";
ballena.name = "ballena";
hermosa     = new Image();
hermosa.src = "./images/map/hermosa-map.jpg";
hermosa.name = "hermosa";
ojochal     = new Image();
ojochal.src = "./images/map/ojochal-map.jpg";
ojochal.name = "ojochal";

//flag
exit = 0;

// definition of images (scrollbar)
u       = new Image();
u.src   = "./images/map/u.jpg";
b       = new Image();
b.src   = "./images/map/b.jpg";
h       = new Image();
h.src   = "./images/map/h.jpg";
o       = new Image();
o.src   = "./images/map/o.jpg";

function ShowLocation (left, top, picture) {
 // alert("ShowLocation");

switch (picture) {
  case "uvita":
    ShowMap(uvita, u);
    break;
  case "ballena":
    ShowMap(ballena, b);
    break;
  case "hermosa":
    ShowMap(hermosa, h);
    break;
  case "ojochal":
    ShowMap(ojochal, o);
    break;
  default:
    // no object selected, therefore no location marker
    exit=1;
    break;
  }

  // position location marker
  window.document.images.bluete.style.top= top;
  window.document.images.bluete.style.left=left;
  if (exit == 0) {
    window.document.images.bluete.style.visibility='visible';
  }
}

function HideLocation() {
  //alert("HideLocation");
  window.document.images.bluete.style.visibility ='hidden';
}


function ShowMap(picture1, picture2) {
  //alert("ShowMap");
  window.document.images.map.src = picture1.src;
  window.document.images.all.src = picture2.src;

  if(picture1.name == picture) {
    window.document.images.bluete.style.visibility='visible';
  }
  else {
    window.document.images.bluete.style.visibility='hidden';
  }
}

