



// Swap document.img1.src with img2

function swapImg(img1, img2)
{
	document[img1].src = img2;
}


// Preload img with name imgName

function preloadImg(imgName, img)
{

	var imgName	= new Image();
	imgName.src	= img;

}

function openSlideShow(world, slideShow, x, y, useScrollBars) {
	popSlideShow = null;
	var defaultX = 434;
	var defaultY = 545;
	if(typeof(useScrollBars) != "undefined") {
		useScrollBars  = 'yes';
	} else {
		useScrollBars  = 'no';
	}
	
	slideShow = slideShow + "&world="+world;
	
	if(typeof(x) != "undefined") {
		var width  = x;
	} else {
		var width  = defaultX;
	}
	
	if(typeof(y) != "undefined") {
		var height = y;
	} else {
		var height = defaultY;
	}

	var screenWidth		=	(screen.width - width) / 2;
	var screenHeight	=	(screen.height - height) / 2;

	if(typeof(caption) != "undefined") {	url += "&caption="+escape(caption); }
	
	popSlideShow = window.open(slideShow,"popExpand","width="+width+",height="+height+",left="+screenWidth+",top="+screenHeight+",toolbar=no,resizable=no,scrollbars="+useScrollBars+",location=no,directories=no,menubar=no");
	
}