function slideshowWindowOptions(height, width) {
	var imageScale;
	var slideWidth;
	var slideHeight;
	var screenWidth;
	var screenHeight;
	var options;

	options = 'menubar=no,';

	if (screen.availHeight > 975) { 	
			slideWidth = "800";
			slideHeight = "800";
		}	else if (screen.availHeight > 775) {
			slideWidth = "800";
			slideHeight = "600";
		} else {
			slideWidth = "711";
			slideHeight = "533";
		}
		
	// if an image size is provided, rescale the width & height to reflect the actual image dimensions	
		
	if (width != null && height != null) {	
		if (slideWidth < width || slideHeight < height) {
			imageScale = slideWidth/width < slideHeight/height ? slideWidth/width : slideHeight/height;
		} else { 
			imageScale = 1; 
		}		
		slideWidth = slideWidth * imageScale;
		slideHeight = slideHeight * imageScale;
		screenWidth = slideWidth + 200 > screen.availWidth ? screen.availWidth : slideWidth + 200;
		screenHeight = slideHeight + 200 > screen.availHeight ? screen.availHeight : slideHeight + 200;
	} else {	
		screenWidth = parseInt(slideWidth) + 200 > screen.availWidth ? screen.availWidth : parseInt(slideWidth) + 200;
		screenHeight = parseInt(slideHeight) + 250 > screen.availHeight ? screen.availHeight : parseInt(slideHeight) + 250;
	}
	
	options = options + 'width=' + screenWidth + ',height=' + screenHeight;
	return options;

}