var slideShowURL = 'slideShow.asp'; //parameter

function Slide(url, height, width, caption)
{
	this.url = url;
	this.height = height;
	this.width = width;
	this.caption = caption;
}

function openSlideShow(initialIndex) {
	//alert("In open Slide show");
	var myWidth = (screen.availWidth > 700) ? (740) : screen.availWidth;//(screen.availWidth - 100) : screen.availWidth;		// if 800x600 or less, take up
	var myHeight = (screen.availHeight > 600) ? (screen.availHeight - 100) : (screen.availHeight - 70);	// the whole screen.
	var myLeft = Math.round((screen.availWidth - myWidth) / 2);
	var myTop = Math.round((screen.availHeight - myHeight) / 2)-25;

	if (myTop < 0) { myTop = 0; }	// bugfix for Opera
	if (screen.availHeight < 600) { myTop-=20; }

	currentSlideIndex = initialIndex;//initialize the global

	var slideWindow = window.open(slideShowURL, 'slideshow', 'scrollbars=yes,resize=yes,titlebar=no,location=no,status=no,toolbar=no,width='+myWidth+',height='+myHeight+',top='+myTop+',left='+myLeft);

	slideWindow.focus();
}
