	var textArrayInFocus = new Array(escape("")
              ,escape("")
              ,escape("")
              ,escape("")
              ,escape("")
			  ,escape("")
			  ,escape("")
			  ,escape(""));

		var imageArrayInFocus = new Array("/oilspills/OSHApics/100_0860.JPG"
    ,"/oilspills/OSHApics/100_0861.JPG"
    ,"/oilspills/OSHApics/100_0862.JPG"
    ,"/oilspills/OSHApics/100_0870.JPG"
    ,"/oilspills/OSHApics/P1000004.JPG"
    ,"/oilspills/OSHApics/P1000005.JPG"
    ,"/oilspills/OSHApics/P1000006.JPG"
    ,"/oilspills/OSHApics/P1000007.JPG");

		var imageArrayAltInFocus = new Array(
								""
		                        ,""
		                        ,""
								,""
								,""
		                        ,""
		                        ,""
								,"");

		var counterInFocus = 0;

		//change the opacity for different browsers
		function changeOpac(opacity, id) {
		    var object = document.getElementById(id).style;
		    object.opacity = (opacity / 100);
		    object.MozOpacity = (opacity / 100);
		    object.KhtmlOpacity = (opacity / 100);
		    object.filter = "alpha(opacity=" + opacity + ")";
		}

		function blendimage(imageid, imagefile, millisec) {
		    var speed = Math.round(millisec / 100);
		    var timer = 0;

		    //make image transparent
		    changeOpac(0, imageid);

		    //make new image
		    document.getElementById(imageid).src = imagefile;

		    //fade in image
		    for(i = 0; i <= 100; i++) {
		        setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		        timer++;
		    }
		}

		function changeInFocusText() {
		  try {
		    //set the current image as background
		    document.getElementById("ImageHolder").style.backgroundImage = "url(" + document.getElementById("theImage").src + ")";

		    //setTimeout used to counter a strange caching behaviour on the main Div tag
		    setTimeout('blendimage("theImage",  imageArrayInFocus['+ counterInFocus + '], 700)', 500);
		    setTimeout('document.getElementById("theImage").alt = imageArrayAltInFocus[' + counterInFocus + ']', 500);
		    setTimeout('document.getElementById("TextHolder").innerHTML = unescape(textArrayInFocus[' + counterInFocus++ + '])', 500);

		    if (counterInFocus == textArrayInFocus.length) {
		      counterInFocus = 0;
		    }

		    setTimeout("changeInFocusText();", 5000);
		  } catch (e) {
		    alert("Error: " + e);
		  }
		}
