var thislocation = location.href.toLowerCase();
var rotateImg = new Array();
 	rotateImg[0]= "images/middle_building.jpg";
	rotateImg[1]= "images/middle_uglies.jpg";
	rotateImg[2]= "images/middle_building.jpg";
	rotateImg[3]= "images/middle_putmantowork.jpg";

var newRotate = 0;
var totalImgs = rotateImg.length;

function cycleImgs() {
	if (totalImgs > 1 ) {
		if (document.all){
			document.images.rotatingimg.style.filter = "blendTrans(duration=3)";
			document.images.rotatingimg.style.filter = "blendTrans(duration=crossFadeDuration)";
			document.images.rotatingimg.filters.blendTrans.Apply();
		}
	  document.rotatingimg.src = rotateImg[newRotate];
		if (document.all){
			document.images.rotatingimg.filters.blendTrans.Play()
		}
	  newRotate++;
	  if (newRotate > totalImgs-1) {
	    newRotate = 0;
	  }
	  if (newRotate == 1 || newRotate == 3) {
		  //building pic
		  setTimeout("cycleImgs()", 10*1000);
		 } else {
			//other pics
			setTimeout("cycleImgs()", 4*1000);
		}
	}
	else {
		document.rotatingimg.src = rotateImg[0];
	}
}

