<!--



//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 + ")"; 
}


// (C) 2003 CodeLifter.com
// Free for all users, but leave in this  header

// =======================================
// set the following variables
// =======================================

// Set speed (milliseconds)
var speed = 5000

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

//Pic[0] = '/images/home-bg-1.jpg'
Pic[0] = '/images/home-bg-2-workers.jpg'
Pic[1] = '/images/home-bg-3-sparks.jpg'
Pic[2] = '/images/home-bg-4-truck.jpg'


// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length
var speed = Math.round(600 / 100); 
var timer = 0; 
	
var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runBGSlideShow(){
   /*if (document.body){*/
   //document.body.background = Pic[j];
   
   elback = document.getElementById('content');
   elfront = document.getElementById('contentbg');
   
   elback.style.backgroundImage=elfront.style.backgroundImage; //First set the actual background to the current image.
   changeOpac(0, 'contentbg'); //now we can change the forground to be transparent
   
   elfront.style.backgroundImage="url("+Pic[j]+")";



	//fade in image
	var timer = 0;
    for(i = 0; i <= 100; i++) { 
        setTimeout("changeOpac(" + i + ",'" + 'contentbg' + "')",(timer * speed)); 
        timer++; 
    }
   
   j = j + 1;
   if (j > (p-1)) j=0;
   t = setTimeout('runBGSlideShow()', 7000)
   //}
}

//-->





