activereg = null;
activeoverlay = null;
activelink = null;

function windowload(){
  if (document.getElementById('content').clientHeight > 320){
    document.getElementById('cornLeft').style.display = 'block';
    document.getElementById('cornRight').style.display = 'block';
  }  
}

function showPicture (pic) {
  var picWindow = window.open('/showPicture.html?picture=' + pic, 'DiaShow', 'width=840,height=640,left=320,top=0');
  picWindow.focus();
}

function showRegion (regionName) {
  if (activereg) {
    activereg.style.display = 'none';
  }
  if (activelink) {
    activelink.className= 'picLink';
  }

  if (! activeoverlay) {
    activeoverlay = document.getElementById('regionOverlay');
  }

  activeoverlay.className = regionName;

  activelink = document.getElementById('linkTo'+regionName);
  activelink.className= 'picLink active';

  activereg = document.getElementById('region'+regionName);
  activereg.style.display = 'block';
}

window.onload=windowload;


