var tss;
var iPic = 0;
var slideNbPics = picImg.length;

var clearCorner = new Image();
clearCorner.src = "images/clear.gif";

var preLoad = new Array();
for (i=0; i < slideNbPics; i++) {
	preLoad[i] = new Image();
	preLoad[i].src = "property/" + picIds[i] + "/" + picImg[i];
}

function runSlideShow() {
	tss = setTimeout('runSlideShow()', slideShowSpeed);
	
	if (document.all) {
		document.images.PictureBox.style.filter = "blendTrans(duration=1)";
		document.images.PictureBox.filters.blendTrans.Apply();
		document.images.PictureBox.src = preLoad[iPic].src;
		document.images.PictureBox.filters.blendTrans.Play();
		
		if (picSold[iPic] == 1) {
			document.images.PictureBoxSoldCorner.style.filter = "blendTrans(duration=1)";
			document.images.PictureBoxSoldCorner.filters.blendTrans.Apply();
			document.images.PictureBoxSoldCorner.src = soldCorner.src;
			document.images.PictureBoxSoldCorner.filters.blendTrans.Play();
		}
		else {
			document.images.PictureBoxSoldCorner.src = clearCorner.src;
		}
		
		for (i=0; i < document.links.length; i++) {
			if (document.links[i].id.substring(0,15) == "houseMiddleLink") {
				document.links[i].href = "view.php?req=" + picIds[iPic];
				document.getElementById("houseMiddleDescr").innerHTML = picPrice[iPic];
			}
		}
		
		iPic += 1;
	}
	
	if (iPic >= slideNbPics) iPic = 0;
}

