function openSS()
{
		var height=650;
		var width=820;
		var newLeft = (window.screen.availWidth - width) / 2;
		var newHeight = (window.screen.availHeight - height) /2;
		var url = "index.php?method=main.slideshowInit";
		var detailWin = window.open(url,'ssWin','height=' + height + ',width=' + width + ',left=' + newLeft + ',top=' + newHeight + ',menubar=0,status=0,scrollbars=0,directories=0,resizable=1');
		detailWin.focus();
}

		function slideShowInit()
		{
			var id = 0;
			var query = url + id;
			xmlHttp.open("GET", query, true);
			xmlHttp.onreadystatechange=handleInit;
			xmlHttp.send(null);
		}
		function handleInit()
		{
			if (xmlHttp.readyState == 4)
			{
				if (xmlHttp.status == 200)
					{
					response=xmlHttp.responseXML;
					var title = response.getElementsByTagName('title')[0].firstChild.nodeValue;
					var medium = response.getElementsByTagName('medium')[0].firstChild.nodeValue;
					var dimensions = response.getElementsByTagName('dimensions')[0].firstChild.nodeValue;
					var filename = response.getElementsByTagName('filename')[0].firstChild.nodeValue;
					var caption = title + "<br />" + medium + "<br />" + dimensions;
					var target = document.getElementById('caption');
					target.innerHTML = caption;
					var placeholder = document.getElementById("placeholder");
					var theSrc = placeholder.getAttribute("src");
					newImg = "jpgs/ss/" + filename + ".jpg";
					placeholder.setAttribute("src",newImg);
					}
			}
		}
		
		function imgTimer()
		{
			if (counter == ssLen - 1)
			{
			endSS();
			}
			else
			{
				counter++;
				ct++;
				getImg(counter);
			}
			
			var ctBox = document.getElementById("counterBox");
			ctBox.innerHTML = "<h2>" + ct + " of " + ssLen + "</h2>";
		}
		
				function getImg(id)
				{
					var imgQuery = url + id;
					xmlHttp.open("GET", imgQuery, true);
					xmlHttp.onreadystatechange=handleGetImg;
					xmlHttp.send(null);
				}
				function handleGetImg()
				{
					response=xmlHttp.responseXML;
					var title = response.getElementsByTagName('title')[0].firstChild.nodeValue;
					var medium = response.getElementsByTagName('medium')[0].firstChild.nodeValue;
					var dimensions = response.getElementsByTagName('dimensions')[0].firstChild.nodeValue;
					var filename = response.getElementsByTagName('filename')[0].firstChild.nodeValue;
					var caption = title + "<br />" + medium + "<br />" + dimensions;
					var target = document.getElementById('caption');
					target.innerHTML = caption;
					var placeholder = document.getElementById("placeholder");
					var theSrc = placeholder.getAttribute("src");
					newImg = "jpgs/ss/" + filename + ".jpg";
					placeholder.setAttribute("src",newImg);
				}
		
		
		function startSS()
		{
			timerId = setInterval("imgTimer()", timer * 1000);
		}
		
		function endSS()
		{
			clearInterval(timerId);
		}