hs.addEventListener(window, "load", function() {
var autoload = /[?&]autoload=([^&#]*)/.exec(window.location.href);
if (autoload) document.getElementById(autoload[1]).onclick();
});
hs.addEventListener(document, "ready", function() {
var autoload = /[?&]autoload=([^&#]*)/.exec(window.location.href);
if (autoload) document.getElementById(autoload[1]).focus();
});
function toggleDiv(id) {
	var e = document.getElementById(id);
	if(e.style.display == 'block')
		e.style.display = 'none';
	else
		e.style.display = 'block';
}
hs.graphicsDir = 'res/graphics/';
hsp.stylesFile = 'res/common.css';
hs.marginBottom = 15;
hs.marginTop = 15;
hs.marginLeft = 104;
hs.marginRight = 104;
hs.dragByHeading = false;
hs.preserveContent = false;
hs.outlineType = 'rounded-white';
hs.lang.loadingTitle = 'Click to cancel';
hs.lang.previousTitle = 'Previous (left arrow)';
hs.lang.playTitle = 'Play slideshow (spacebar)';
hs.lang.pauseTitle = 'Pause slideshow (spacebar)';
hs.lang.nextTitle = 'Next (right arrow)';
hs.lang.moveTitle = 'Click and drag to move';
hs.lang.fullExpandTitle = 'Expand to actual size (up arrow)';
hs.lang.closeTitle = 'Close (ESC or Enter)';
hs.lang.previousText = 'Prev';
hs.lang.playText = 'Play';
hs.lang.pauseText = 'Pause';
hs.lang.nextText = 'Next';
hs.lang.fullExpandText = '1:1';
hs.lang.closeText = 'Close';
hs.lang.loadingText = 'Loading...';
hs.lang.restoreTitle = 'Click for next';
hs.lang.focusTitle = 'Click to bring to front';
hs.lang.resizeTitle = 'Resize';
hs.align = 'center';
hs.expandDuration = 500;
hs.restoreDuration = 500;
hs.showCredits= false;
hs.allowSizeReduction = true;
hs.dimmingOpacity = 0.7;
hs.dimmingDuration = 100;
hs.transitionDuration = 500;
hs.allowMultipleInstances = true;
hs.allowWidthReduction = true;
hs.blockRightClick = false;
hs.flushImgSize = false;
hs.numberOfImagesToPreload = 5;
hs.transitions = ['expand', 'crossfade'];
hs.captionOverlay.position='rightpanel';
hs.captionOverlay.width='250px';
hs.restoreCursor = null;
hs.Expander.prototype.onImageClick = function() {
	return hs.next();
}
hs.onKeyDown = function(sender, e) {
	if(e.keyCode == 40 || e.keyCode == 70) return false;
	if(e.keyCode == 38) return false;
}
hs.addSlideshow({
	interval: 5000,
	repeat: false,
	thumbstrip: {
		position: 'top left',
		mode: 'vertical',
		relativeTo: 'viewport'
	},
	overlayOptions: {
		opacity: 1.0,
		position: 'top right',
		offsetY: 0,
		offsetX: 0,
		hideOnMouseOut: true
	},
	fixedControls: false,
	useControls: true
});
