function ierotator(config,me) {
	me=this;
	this.arDiv=new Array();
	this.arNum=new Array();
	this.nowNum=0;
	var i,count;
	this.area = document.getElementById(config.id);
	this.area.style.width=config.width;
	this.area.style.height=config.height;
	
	this.changeDiv = function(n) {
		if(me.nowNum==n) return;
		me.nowNum=n;
		for(var i=0;i<me.arNum.length;i++)
		{
			me.arNum[i].src=me.arNum[i].mout;
		}
		me.arNum[n].src=me.arNum[n].mover;
		
		
		me.bannerArea.filters[0].apply();
		me.bannerArea.innerHTML=me.arDiv[n];
		me.nowNum=n;
		me.bannerArea.filters[0].play();
	}

	this.nextDiv = function() {
		if((me.nowNum+1)==me.arNum.length) me.changeDiv(0);
		else me.changeDiv(me.nowNum+1);
	}


	if(config.numimg.length<this.area.childNodes.length) count=config.numimg.length;
	else count=this.area.childNodes.length;

	for(i=0;i<count;i++)
	{
		this.arDiv.push(this.area.childNodes[i].innerHTML);
	}
	this.area.innerHTML="";
	
	this.numArea = document.createElement("ul");
	this.numArea.style.left=0;
	this.numArea.style.top=0;
	this.numArea.style.margin=0;
	this.numArea.style.padding=0;
	this.numArea.style.position="absolute";
	this.numArea.style.zIndex=1;
	this.numArea.style.width=config.width;
	this.numArea.style.textAlign="right";
	this.numArea.style.listStyle="none";
	this.numArea.style.display=config.numDisplay;
	for(i=0;i<count;i++)
	{
		var oImg=document.createElement("IMG");
		oImg.src=config.numimg[i][0];
		oImg.num=i;
		oImg.mover=config.numimg[i][1];
		oImg.mout=config.numimg[i][0];
		oImg.onmouseover=function() {
			me.changeDiv(this.num);
		}
		this.arNum.push(oImg);
		var oLi=document.createElement("li");
		oLi.style.display="inline";
		oLi.appendChild(oImg);
		this.numArea.appendChild(oLi);
	}
	
	this.bannerArea = document.createElement("div");
	this.bannerArea.style.filter=config.effect;
	this.bannerArea.style.width=config.width;
	this.bannerArea.style.height=config.height;
	this.bannerArea.style.overflow='hidden';
	this.area.appendChild(this.numArea);
	this.area.appendChild(this.bannerArea);
	
	this.bannerArea.innerHTML=me.arDiv[0];
	this.arNum[0].src=this.arNum[0].mover;

	this.area.style.display="block";

	this.area.onmouseover=function(){
		window.clearInterval(me.interval_moving);
	};

	this.area.onmouseout=function(){
		me.interval_moving = window.setInterval(me.nextDiv,config.wait);
	};
	this.interval_moving = window.setInterval(this.nextDiv,config.wait);
	
}
