if (self != top){
   top.location.href = self.location.href;
}
var slideshow = {
	slides: null,
	slideshowtimer: null,
	last: 0,
	current: 1,
	nextimage: function() {
		for (var i = 0; i < slideshow.slides.length; i++) {
			slideshow.slides[i].style.display = "none";
		}
		
		slideshow.slides[slideshow.last].style.display = "block";
		slideshow.slides[slideshow.last].style.zIndex = "0";
		
		//slideshow.slides[slideshow.current].style.zIndex = "1";
		
		
		if ( ( slideshow.current + 1 ) < slideshow.slides.length ) {
			slideshow.current = slideshow.current + 1;
			slideshow.last = slideshow.current - 1;
		} else {
			slideshow.current = 0;
			slideshow.last = slideshow.slides.length - 1;
		}
		
		
		
		slideshow.slideshowtimer = setTimeout(slideshow.nextimage, 5000);
	},
	load: function() {
		if (document.getElementById("banner")) {
			this.slides = document.getElementById("banner").getElementsByTagName("img");
			
			for (var i = 0; i < this.slides.length; i++) {
				this.slides[i].style.zIndex = this.slides.length - i;
			}

			document.getElementById("banner").style.display = "block";
		
			this.nextimage();
		}
		
	},
	init: function() {
		if (window.addEventListener) {
			window.addEventListener("load", function() {slideshow.load()}, false)
		} else if (window.attachEvent()) {
			window.attachEvent("onload", function() {slideshow.load()});
		}
	}
};
slideshow.init();