var NewWindow = null;
var NewWindow2 = null;
var globalImage = null;
var globalImageWidth = null;
var globalImageHeight = null;
var globalCaption = null;

function chgImg(myImg) {
	if (document.images) {
	document.slideshow.src = myImg;
	}
}

//Version with (c) FD loads in Photo.html. Position top centre. 
function myOpen(localImage,localCaption,imageWidth,imageHeight)
	{
	globalImage = localImage;
	globalCaption = localCaption;
	globalImageWidth = imageWidth;
	globalImageHeight = imageHeight;
	windowWidth = imageWidth + 34;
	if (imageHeight > screen.height - 160)		
		{
		windowHeight = screen.height - 50;
		}
	else
		{
		windowHeight = imageHeight + 140;
		}
	posX = screen.width/2 - imageWidth/2 - 20;
	NewWindow = 
	window.open('photo.html','windowName','toolbar=no,location=no,status=no,scrollbars=yes,resizable=no,width='+ windowWidth +',height='+ windowHeight +',top=0,left='+ posX );
	}

//Version without copyright FD loads in Photo1.html. Size is also different. Position top right.
function myOpen1(localImage,localCaption,imageWidth,imageHeight)
	{
	globalImage = localImage;
	globalCaption = localCaption;
	globalImageWidth = imageWidth;
	globalImageHeight = imageHeight;
	windowWidth = imageWidth + 34;
	if (imageHeight > screen.height - 110)
		{		
		windowHeight = screen.height - 50;
		}
	else
		{
		windowHeight = imageHeight + 126;
		}
	posX = screen.width - imageWidth;	
	NewWindow = 
	window.open('photo1.html','windowName1','toolbar=no,location=no,status=no, scrollbars=yes,resizable=no,width='+ windowWidth +',height='+ windowHeight +',top=0,left='+ posX );
	}

//Version with &copy; FD loads in Photo3.html. Position top left.
function myOpen3(localImage,localCaption,imageWidth,imageHeight)
	{
	globalImage3 = localImage;
	globalCaption3 = localCaption;
	globalImageWidth3 = imageWidth;
	globalImageHeight3 = imageHeight;
	windowWidth = imageWidth + 34;
	if (imageHeight > screen.height - 160)
		{		
		windowHeight = screen.height - 40;
		}
	else
		{
		windowHeight = imageHeight + 150;
		}
	posX = screen.width - imageWidth;
	NewWindow = 
	window.open('photo3.html','windowName3','toolbar=no,location=no,status=no,scrollbars=yes,resizable=no,width='+ windowWidth +',height='+ windowHeight +',top=0,left=0' );
	}

//Version with image as background loads in Photo4.html. Position top centre. 
function myOpen4(localImage,localCaption){
	globalImage4 = localImage;
	globalCaption4 = localCaption;
	posX = screen.width/2 - 380;		
	NewWindow = window.open('photo4.html','windowName4','toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=760,height=720,top=0,left='+ posX);
	}
	
function changeIt(MyImage1, MyImage2) { 
if (document.images) { document[MyImage1].src = MyImage2; } 
} 


