
hs.restoreCursor = 'zoomout.cur'; // necessary for preload
hs.expandSteps = 16; // number of steps in zoom. Each step lasts for duration/step milliseconds.
hs.expandDuration = 500; // milliseconds
hs.restoreSteps = 12;
hs.restoreDuration = 400;
hs.marginLeft = 20;
hs.marginRight = 20;
hs.marginTop = 20;
hs.marginBottom = 30; // zu klein = bildlaufleiste springt
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= false;
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 = 'g0'; // 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'; //rounded-white set null to disable outlines
hs.wrapperClassName = 'highslide-wrapper'; // for enhanced css-control
hs.preserveContent = false;
//hs.allowHeightReduction = false; /////////////////////////////////////////////////////

// HsExpander.prototype.createFullExpand = function () {};


hs.getAdjacentAnchor = function(key, op) {
	var aAr = document.getElementsByTagName('A'), hsAr = [], activeI = -1, j = 0;
	for (var i = 0; i < aAr.length; i++) {
		if (hs.isHsAnchor(aAr[i]) && ((hs.expanders[key].slideshowGroup
				== hs.getParam(aAr[i], 'slideshowGroup')))) {
			hsAr[j] = aAr[i];
			if (hs.expanders[key] && aAr[i] == hs.expanders[key].a) {
				activeI = j;
			}
			j++;
		}
	}
	if (hsAr[activeI + op])
	  return hsAr[activeI + op];
	else if (op < 0)
	  return hsAr[hsAr.length - 1]; // last in group
	else return hsAr[0]; // first in group
};

hs.setZindex = function(el) {
	if(!el.onmouseout) {
	  el.zi=0;
	  if(el.parentNode.innerHTML.toLowerCase().split('index:')[1])
            el.zi=parseInt(el.parentNode.innerHTML.toLowerCase().split('index:')[1]);
	  el.onmouseout=function() {this.style.zIndex=this.zi;}
	}
	el.style.zIndex='100';

	if(el.title)
	  el.title='';
	if(hs.restoreTitle)
	  hs.restoreTitle='';
};

var lang_de=1;
if(top.location.href.indexOf('paintings')+1)
  lang_de=0;
var titleprev=lang_de?"vorheriges Bild":"previous";
var titlenext=lang_de?"nächstes Bild":"next";
var titleclose=lang_de?"Schließen":"close";


function writeCaption(de, en) {
  document.write('<div class="highslide-caption">'+(lang_de?de:(en||de))
     +'<div class="prevnext">'
     +'<a href="#" class="prevnextButton" onfocus="this.blur()" title="'+titleprev+'"'
     +' onclick="return hs.previous(this)">&lt;<\/a>&nbsp;&nbsp;&nbsp;'
     +'<a href="#" class="prevnextButton" onfocus="this.blur()" title="'+titlenext+'"'
     +' onclick="return hs.next(this)">&gt;<\/a>'
     +'<a href="#" class="close" title="'+titleclose+'" onfocus="this.blur()"'
     +' onclick="hs.close(this);return false">X<\/a>'
     +'<\/div><\/div>');
}


function MouseWheel(e) {
  var rolled = 0;
  if(e.wheelDelta === undefined) // Firefox
    rolled = -40 * e.detail;
  else
    rolled = e.wheelDelta;
  var amount = 100;
  if(rolled < 0)
    window.scrollBy(amount, 0);
  else if(rolled > 0)
    window.scrollBy(amount*-1, 0);
}

window.onload=function() {
  if(document.addEventListener && document.getElementById('d3b')) {
    document.addEventListener("DOMMouseScroll", MouseWheel, false);
    document.addEventListener("mousewheel", MouseWheel, false);
  }
  if(location.href.indexOf('inkm')>0) {
    var lh=location.href.slice(location.href.lastIndexOf('/')-1);
    lh=lh.split('.').join('-');
    var param="&w="+screen.width+"&h="+screen.height+"&r="+escape(lh);
    var newScr=document.createElement('script');
    newScr.src="/malerei/highslide/zcounter.php?id=307"+param;
    document.getElementsByTagName('head')[0].appendChild(newScr);
  }
}

