function rotatePhoto(direction){
	//var preview = photo.getAttribute("href");
	currentphoto+=direction;
	if(currentphoto > maxphoto - 1)
		currentphoto = 0;
	else if(currentphoto < 0)
		currentphoto = maxphoto - 1;
			
	var next = product_src[currentphoto];
	var holder = document.getElementById("productHolder");
	holder.setAttribute("src",next);
	document.getElementById('prodHeader').innerHTML = "<a href='" + product_links[currentphoto] +"'>" + product_header[currentphoto] + "</a>";
	document.getElementById('prodDesc').innerHTML = product_desc[currentphoto];
	document.getElementById('prodIndex').innerHTML = (currentphoto + 1) + " of " + maxphoto + " products"
};


