
if(window.hs) { // highslide settings

  hs.restoreCursor = 'zoomout.cur'; // necessary for preload
  hs.expandSteps = 12; // number of steps in zoom. Each step lasts for duration/step milliseconds.
  hs.expandDuration = 400; // milliseconds
  hs.restoreSteps = 9;
  hs.restoreDuration = 300;
  hs.marginLeft = 20;
  hs.marginRight = 20;
  hs.marginTop = 10;
  hs.marginBottom = 10;
  hs.zIndexCounter = 1001; // adjust to other absolutely positioned elements

  hs.restoreTitle = 'Verkleinern';
  hs.loadingText = 'Laden...';
  hs.loadingTitle = 'Abbrechen';
  hs.loadingOpacity = 1;
  hs.focusTitle = 'In den Vordergrund';
  hs.allowMultipleInstances= true;
  hs.numberOfImagesToPreload = 3;
  hs.captionSlideSpeed = 0; // set to 0 to disable slide in effect
  hs.padToMinWidth = false; // pad the popup width to make room for wide caption
  hs.outlineWhileAnimating = 0; // 0 = never, 1 = always, 2 = HTML only
  hs.outlineStartOffset = 10; // ends at 10
  hs.fullExpandTitle = 'Originalgröße';
  hs.fullExpandPosition = 'bottom right';
  hs.fullExpandOpacity = 1;
  hs.showCredits = false; // you can set this to false if you want
  hs.enableKeyListener = true;
  hs.transitions = [];
  hs.dimmingOpacity= 1; // Lightbox style dimming background
  hs.dimmingDuration= 0; // 0 for instant dimming

  // These settings can also be overridden inline for each image
  hs.anchor = 'auto'; // where the image expands from
  hs.align = 'center'; // position in the client (overrides anchor)
  hs.targetX= null; // the id of a target element
  hs.targetY= null;
  hs.captionId = null;
  hs.spaceForCaption = 100; // leaves space below images with captions
  hs.slideshowGroup = null; // defines groups for next/previous links and keystrokes
  hs.minWidth= 200;
  hs.minHeight= 200;
  hs.allowSizeReduction= true; // allow the image to reduce to fit client size. If false, this overrides
  hs.outlineType= 'drop-shadow'; // set null to disable outlines
  hs.wrapperClassName = 'highslide-wrapper'; // for enhanced css-control


  hs.overrides[hs.overrides.length] = 'getAdjacentAnchor';
  hs.getAdjacentAnchor = function(op) { // loop imageset
	var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
	if(as && as[current + op])
	  return (as && as[current + op]);
	else if(as && as.length && current + op == as.length)
	  return as[0];
	else if(as && as.length && current + op == -1)
	  return as[as.length-1];
	else
	  return null;
  };

}


function writeCaption(txt) {
  document.write('<div class="highslide-caption">'+txt
     +'<div class="prevnext">'
     +'<a href="#" class="prevnextButton" onfocus="this.blur()" title="vorheriges Bild"'
     +' onclick="return hs.previous(this)">&lt;<\/a>&nbsp;&nbsp;&nbsp;'
     +'<a href="#" class="prevnextButton" onfocus="this.blur()" title="nächstes Bild"'
     +' onclick="return hs.next(this)">&gt;<\/a>'
     +'<a href="#" class="close" title="Schließen" onfocus="this.blur()"'
     +' onclick="hs.close(this);return false">X<\/a>'
     +'<\/div><\/div>');
}


function toggleData(el) {
  var hide;
  if((hide=document.getElementById('tblhide')) && el) {
    if(el.innerHTML=='Weitere Daten ...') {
      el.innerHTML='Kurzversion ...';
      hide.style.display='block';
    }
    else {
      el.innerHTML='Weitere Daten ...';
      hide.style.display='none';
    }
  }
}


function getWindowHeight() {
  if(typeof(window.innerHeight)=='number')
    return window.innerHeight;
  else if(document.documentElement && document.documentElement.clientHeight)
    return document.documentElement.clientHeight;
  else if(document.body && document.body.clientHeight)
    return document.body.clientHeight;
  else return 0;
}


function setFooter() {
  var windowHeight = getWindowHeight();
  if (windowHeight > 0) {
    var contentHeight = document.getElementById('container').offsetHeight;
    if (windowHeight > contentHeight) {
      marginFooter+=(windowHeight - contentHeight);
      clearDiv.style.paddingBottom = marginFooter + 'px';
    }
    else if(marginFooter > 0 && contentHeight > windowHeight) {
      marginFooter = Math.max(marginFooter - (contentHeight - windowHeight), 0);
      clearDiv.style.paddingBottom = marginFooter + 'px';
    }
  }
}


window.onload=function() {
  var c, d;
  if((c=document.getElementById('content')) && (d=c.getElementsByTagName('div'))
  && (clearDiv=d[d.length-2]) && clearDiv.className=='clear') {
    marginFooter=0;
    setFooter();setFooter();
    window.onresize = setFooter;
  }
  for(var i=0, currentLink, dl=document.links, cl, loc=location.href; currentLink=dl[i]; i++) {
    if((cl=currentLink.className) && (cl=='external' || cl=='artistpage'))
      currentLink.onclick=function(){this.target='_blank'};
    else if(currentLink.href==loc) {
      currentLink.onclick=function(){return false;};
      currentLink.style.cursor='default';
    }
  }
}


