
Slides = new Array("box1","box2","box3","box4","box5")

var wait = 5000;
var x = 0;
var play = 1;

function start_slideshow() {
	setInterval(SlideShow(), wait);
}

function SlideShow() {
	if(play==1) { 
		
        if(isMSIE()==true) {
        
            document.getElementById(Slides[x]).style.display = "none";
            x++;
            if (x == Slides.length) x = 0;
            document.getElementById(Slides[x]).style.display = "block";
        
        } else {
        
            new Effect.Fade(Slides[x], { duration:1, from:1.0, to:0.0 });
            x++;
            if (x == Slides.length) x = 0;
            new Effect.Appear(Slides[x], { duration:1, from:0.0, to:1.0 });
        
        }
        
        changeDots(x);
		
	}
}


function changeDiv2(num) {
	play=0;
	//document.getElementById('play_status').className = 'play0';
	if(x != num) {
		$(Slides[x]).fade();
		$(Slides[num]).appear();
		
		changeDots(num);
		x=num;
	}
}

function changeDots(which) {
	document.getElementById('dots_position').className = 'active'+which;
}

function startPlay() {
	if(play==0) {
		play=1;
		document.getElementById('play_status').className = 'play1'; 
	} else {
		play=0;
		document.getElementById('play_status').className = 'play0'; 
	}
}
