function RandPhotoRotate(strArrayThumbs, intNumShow) {
	if (typeof RandPhotoRotate._initialized == "undefined") {
		RandPhotoRotate.prototype.createOneThumb = function (strImgURL, strClickURL) {
			var img = document.createElement("img");
			img.src = strImgURL;
			img.width = 75;
			img.height = 75;
			img.border = 0;

			var a = document.createElement("a");
			a.href = strClickURL;
			a.appendChild(img);

			var div = document.createElement("div");
			div.className = "photo_home";
			div.appendChild(a);

			return div;
		};

		RandPhotoRotate.prototype.realShow = function (strDiv, boolInit) {
			var objTempDiv = document.createElement("div");
			objTempDiv.style.width = "100%";
			objTempDiv.style.height = "100%";
			objTempDiv.style.position = "relative";
			objTempDiv.style.left = "0px";
			objTempDiv.style.top = "0px";

			for (var i=this.intCurrStarter; i<this.intCurrStarter + this.intNumShow; i++) {
				objTempDiv.appendChild(this.objArrayThumbCells[i % this.objArrayThumbCells.length]);
			}

			var objDiv = document.getElementById(strDiv);
			if (boolInit == true) {
				objDiv.appendChild(objTempDiv);
			} else {
				objDiv.replaceChild(objTempDiv, this.objInnerDiv);
			}
			this.objInnerDiv = objTempDiv;
		};

		RandPhotoRotate.prototype.show = function (strDiv) {
			this.realShow(strDiv, true);
		};

		RandPhotoRotate.prototype.moveLeft = function (strDiv) {
			if ( (this.intCurrStarter + 1) >= this.objArrayThumbCells.length ) {
				this.intCurrStarter = 0;
			} else {
				this.intCurrStarter++;
			}
			this.realShow(strDiv, false);
		};

		RandPhotoRotate.prototype.moveRight = function (strDiv) {
			if ( (this.intCurrStarter - 1) < 0 ) {
				this.intCurrStarter = this.objArrayThumbCells.length - 1;
			} else {
				this.intCurrStarter--;
			}
			this.realShow(strDiv, false);
		};

		RandPhotoRotate._initialized = true;
	}

	this.boolIsMoving = false;
	this.strArrayThumbs = strArrayThumbs;
	this.intNumShow = intNumShow;
	this.intCurrStarter = 0;
	this.objInnerDiv = null;

	this.objArrayThumbCells = new Array(this.strArrayThumbs.length);
	for (var i=0; i<this.strArrayThumbs.length; i++) {
		this.objArrayThumbCells[i] = this.createOneThumb(this.strArrayThumbs[i][0], this.strArrayThumbs[i][1]);
	}
}