function swapMain(image){
	var idetails = image.split(":");
	var height = idetails[1];
	var width = idetails[2];
	var description = idetails[3];
	var title = idetails[4];
	
	
	var oImg=document.getElementById("gImage");
	oImg.setAttribute('src', "Images/spacer.gif");

	oImg.setAttribute('src', idetails[0]);
	oImg.setAttribute('height', height+'px');
	oImg.setAttribute('width', width+'px');
	oImg.setAttribute('title', title);
	document.getElementById("gImage").width = width;
	document.getElementById("gImage").height = height;
	document.getElementById("ImgDesc").innerHTML = description;

}

slideshow.cindex = 1;
slideshow.slides = new Array();

toggleSlideshow.running = false;
function toggleSlideshow(anchor){
	if (toggleSlideshow.running) {
		toggleSlideshow.running = false;
		if (ssTimer){
			window.clearTimeout(ssTimer);
		}
		anchor.innerHTML = "Start Slideshow";

	} else {
		toggleSlideshow.running = true;
		anchor.innerHTML = "Stop Slideshow";

		slideshow();
	}
	
}
var ssTimer = false;
function slideshow(){
	slideshow.cindex++;
	if (slideshow.cindex == slideshow.slides.length) slideshow.cindex = 0;
	image = slideshow.slides[slideshow.cindex];
	document.getElementById("gImage").src = slideshow.slides[slideshow.cindex].src;
	document.getElementById("gImage").height = slideshow.slides[slideshow.cindex].height;
	document.getElementById("gImage").width = slideshow.slides[slideshow.cindex].width;
	document.getElementById("gImage").title = slideshow.slides[slideshow.cindex].title;

	ssTimer=window.setTimeout('slideshow()',4500);
}
