function switchBachgroundImage(element, url) {
	var pars = '';
	var myAjax = new Ajax.Request(url, {
		method: 'get', parameters: pars, onComplete: function(req){
			Preload = new Image(600,200);
			Preload.src = req.responseText;
			
			element.style.background = "url(" + Preload.src + ") no-repeat right";
		} });
}


// this array consists of the id attributes of the divs we wish to alternate between
var divs_to_fade = new Array('box1', 'box2', 'box3');
var imgs_to_switch = new Array('headerImage2', 'headerImage3', 'headerImage1');
		
// the starting index in the above array.  It should be set to the value of the div which doesn't have the CSS Display property set to "none"
var i = 0;

function switchImage(_images, url) {
			Effect.Fade(divs_to_fade[i], { duration:1, from:1.0, to:0.0 });
			i++;
			if (i == 3) i = 0;
			Effect.Appear(divs_to_fade[i], { duration:1, from:0.0, to:1.0 });
			var pars = '';
			var myAjax = new Ajax.Request(url, {
				method: 'get', parameters: pars, onComplete: function(req){
				$(imgs_to_switch[i]).src = req.responseText;
		} });
}