function startSlideShow() {
  movement = setInterval("switchPicRight();",slidetime);
}

function prepareNavBtns()
{
var newdesc = document.getElementById("detailname");
var temphead = "";
var i,j = 0;
var newref = "";

// Preload

if (document.images) {
  for(i=0; i< numpics; i++) {
    flipped[i] = new Image();
		j = i + 1;
		if (j < 10) newref = picpath + "0" +  j + picext;
		else
		newref = picpath + j + picext;
		
    flipped[i].src = newref;
  }
}
		startSlideShow();

		showright = document.getElementById("rightbtn");
		showright.onclick = function() { return switchPicRight(); }
		showright.onkeypress = showright.onclick;
		
		showleft = document.getElementById("leftbtn");
		showleft.onclick = function() { return switchPicLeft(); }
		showleft.onkeypress = showleft.onclick;

		showpause = document.getElementById("pausebtn");
		showpause.onclick = function() { return clearInterval(movement); }
			
		showplay = document.getElementById("playbtn");
		showplay.onclick = function() { return movement = setInterval("switchPicRight();",slidetime); }
		
		var tempspan2 = document.getElementById("itemqty");
		tempspan2.firstChild.nodeValue = numpics;			

}

