//set image paths
src = ["http://intension.org/flash/pics/pic31.jpg", "http://intension.org/flash/pics/pic42.jpg", "http://intension.org/flash/pics/pic53.jpg", "http://intension.org/flash/pics/pic81.jpg", "http://intension.org/flash/pics/pic30.jpg", "http://intension.org/flash/pics/pic62.jpg", "http://intension.org/flash/pics/pic56.jpg", "http://intension.org/flash/pics/pic23.jpg"]

//set duration for each image
duration = 6;

//just a booolean variable to tell if the mouse if over the image or not!
over = false;
//Please do not edit below
ads=[]; ct=0;



function changeImage()
{
	var n=(ct+1)%src.length;
	if (ads[n] && (ads[n].complete || ads[n].complete==null)) {
		$('image').background = ads[ct=n].src;
		setTimeout("fadeup()", 1000);	
	}
	else{
		setTimeout("fadedown()", duration*1000);
	}
	
	ads[n=(ct+1)%src.length] = new Image;
	ads[n].src = src[n];


}

function switchAd() {
	setTimeout("fadedown()", 2000);
}

function fadedown(){
	if(over)
	{
		switchAd();
	}
	else{
		new Effect.Opacity("hide", {duration:2.0, from:0.0, to:0.0});
		setTimeout("changeImage()", 2000);
	}
}

function fadeup()
{
	new Effect.Opacity('hide', {duration:2.0, from:1.0, to:1.0});
	setTimeout("fadedown()", duration*1000);
}

function doLink(){
location.href = src[ct];
} onload = function(){
if (typeof document["Ad_Image"] !="undefined"){

changeImage();



}

}
