// JavaScript Document

/***** High Slide *****/
hs.graphicsDir = 'highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.dimmingOpacity = 0.5;
hs.blockRightClick = true;
hs.showCredits = false;
hs.numberPosition = "caption";
hs.lang.number = "Image %1 of %2";

// Add the controlbar
hs.addSlideshow({
//slideshowGroup: 'group1',
	interval: 5000,
	repeat: false,
	useControls: true,
	fixedControls: 'fit',
	overlayOptions: {
		opacity: 0.75,
		position: 'bottom center',
		hideOnMouseOut: true
	}
});

/***** Rollover thumbnails *****/
function swapImage(obj) {
	originalPath = (obj.src);

	var aPath = originalPath.split("/");
	
	sNewPath = "";
	for (i=0; i<=aPath.length-4; i++)
	{
		sNewPath = sNewPath + aPath[i] + "/";
	}
	sNewPath = sNewPath + "large/";
	sNewPath = sNewPath + aPath[i+1] + "/";
	sNewPath = sNewPath + aPath[i+2];

	document.big.src = sNewPath;

	lastNode = obj.parentNode.parentNode.childNodes.length - 1;
	caption = obj.parentNode.parentNode.childNodes[lastNode].innerHTML;

	var captionObj = document.getElementById('onpageCaption');
	captionObj.innerHTML = caption;
}

function swapImageAbsolute(image) {
	document.big.src = image;
}

function swapImage2(obj) {
	sNewPath = (obj.parentNode.parentNode.childNodes[0]);
	document.big.src = sNewPath;
}

function swapImage3(obj) {
	sNewPath = (obj.parentNode.parentNode.childNodes[0]);
	document.big.src = sNewPath;
	
	lastNode = obj.parentNode.parentNode.childNodes.length - 1;
	caption = obj.parentNode.parentNode.childNodes[lastNode].innerHTML;
	
	var captionObj = document.getElementById('onpageCaption');
	captionObj.innerHTML = caption;
}


