var previousLayer;

function switchOverlay(theLayer) {
  if(previousLayer) {
    document.getElementById('info_' + previousLayer).style.display = "none";  
  }
  document.getElementById('info_' + theLayer).style.display = "block";
  document.getElementById('mapOverlay').style.backgroundImage = "url(/media/karta/map_" + theLayer + ".png)";
  previousLayer = theLayer;
}

function viewBalloon(theLayer) {
  document.getElementById('balloonInfo').style.visibility = "visible";
}

function hideBalloon() {
  document.getElementById('balloonInfo').style.visibility = "hidden";
}
