var __BannerList=null;
function SlideShow(){
	if(__BannerList!=null){
		__BannerList.ShowNext();
		if(__BannerList.List.length==1)
			clearInterval(__BannerList.IntervalID);
		}
	}
Banner=function(__Path,__Url){
	this.Path=__Path;
	this.Url=__Url;
	}
BannerList=function(__Container){
	this.Container=__Container;
	this.ImageElement=__Container.getElementsByTagName('IMG')[0];	
	this.ImageElement.BannerList=this;
	this.RefreshRate=3000;
	this.SelectedIndex=-1;
	this.List=new Array();
	this.IntervalID=null;

	this.AddItem=function(__Banner){
		__Banner.BannerList=this;
		this.List[this.List.length]=__Banner;
		}
	this.ShowNext=function(){	
		this.SelectedIndex=this.SelectedIndex==-1?0:this.SelectedIndex;
		this.ImageElement.SI=this.SelectedIndex;
		this.ImageElement.src=this.List[this.SelectedIndex].Path;		
		this.ImageElement.onclick=function(e){
			var Parent=this.BannerList;	
			PageLink({'Url':Parent.List[this.SI].Url});
		}
		this.SelectedIndex++;
		if(this.SelectedIndex>=this.List.length){
			this.SelectedIndex=0;
			}
		}
	this.SlideShow=function(){
		this.ShowNext();
		this.IntervalID=setInterval('SlideShow()',this.RefreshRate);
		}
	}




