﻿function Banner(ID){
	if(!(this.banner = $(ID))){return false;};
	this.banner.style.filter = "blendTrans(duration=2)";
	this.item=new Array();
	for(var i = 1; i<arguments.length; i++){
		if(typeof arguments[i] == 'string'){
			this.item=this.item.concat(arguments[i]);
			}
		}
	this.play();	
	}
Banner.prototype={
	currentIndex:0,
	play:function(){
		 if(this.currentIndex>=this.item.length)
		 {
			  this.currentIndex=0;
		 }
		 var str=this.item[this.currentIndex];
		 if (document.all){this.banner.filters.blendTrans.apply();}
		 this.banner.src="/UserFiles/Image/"+str;		 
		 if (document.all){this.banner.filters.blendTrans.play();}
		 this.currentIndex++;
		}	
	}
Banner.run = function(bannerObject){
    if(bannerObject){
        Banner.object = bannerObject;
        }    
    Banner.object.play();
    setTimeout("Banner.run()",5000)
    }