	var tis = new Array ("bann1", "bann2", "bann3", "bann4", "bann5", "bann6", "bann7");
	var curTis = new Array();
	var TIME = new Array();
	var moveState = 0;
	var tiCount = 4;
	var tiVisHeight = 65;
	var tiVisWidth = 87;
	var tiTop = 635;
	var tiLeft = 311;
	var tiSpeed =1;
	var tiTime = 1;
	var maxMoveState = 0;
	var nextRight = tis.length - 1;
	var nextLeft = tiCount;
	var nextStart = 1;
	var tiMoving = 0;
	var ie = document.all ? true : false;
	
	function init(){
		for (var i=1; i<=tiCount; i++){
			curTis[i-1] = tis[i-1];
			tiPlace(curTis[i-1], i);
		}
		maxMoveState = tiVisWidth / tiSpeed;
	}
	
	function goti(dir){
		if (tiMoving == 0){
			addTi(dir);
			if (dir == 1){
				if (tiMoving == 0){
					TIME = setInterval('moveTi ('+dir+')', tiTime);
				}
			}
			else if(dir == -1){
				if (tiMoving == 0){
					TIME = setInterval('moveTi ('+dir+')', tiTime);
				}
			}
			tiMoving = 1;
		}
	}
	
	function addTi(dir){
		if (dir == 1){
			newTi = tis[nextRight];
			nextRight--;
			if (nextRight == -1){
				nextRight = tis.length - 1;
			}
			nextLeft--;
			if (nextLeft == -1){
				nextLeft = tis.length - 1;
			}
			curTis.unshift(newTi);
			tiPlace(newTi,0);
			mo = "rect(auto, auto, auto, "+tiVisWidth+"px)";
			if (ie){
				document.all[newTi].style.clip = mo;
			}
			else{
				document.getElementById(newTi).style.clip = mo;
			}
		}
		else{
			newTi = tis[nextLeft];
			nextLeft++;
			if (nextLeft == tis.length){
				nextLeft = 0;
			}
			nextRight++;
			if (nextRight == tis.length){
				nextRight = 0;
			}
			curTis.push(newTi);
			tiPlace(newTi,tiCount+1);
			mo = "rect(auto, 0px, auto, auto)";
			if (ie){
				document.all[newTi].style.clip = mo;
			}
			else{
				document.getElementById(newTi).style.clip = mo;
			}
		}
	}
	
	function moveTi (dir){
		//alert (document.all[id].style.posLeft);
		for (var tiID = 0; tiID <= curTis.length - 1; tiID++){
			laID = curTis[tiID];
			if (ie){
				document.all[laID].style.posLeft += tiSpeed*dir;
			}
			else{
				document.getElementById(curTis[tiID]).style.left = tiLeft + ((tiVisWidth) * (tiID-((dir == 1)?(1):(0))))+moveState*tiSpeed*dir;
			}
		}
		
		if (dir == 1){
			cutt = tiVisWidth - (moveState+1)*tiSpeed;
			mo = "rect(auto, "+cutt+"px, auto, auto)";
			if (ie){
				document.all[curTis[curTis.length -1]].style.clip = mo;
			}
			else{
/*				if (moveState == 1){
					alert (cutt);
				}*/
				mo = "rect(auto, "+cutt+"px, 1000px, auto)";
				document.getElementById(curTis[curTis.length -1]).style.clip = mo;
			}
			
			cutt2 = tiVisWidth - (moveState+1)*tiSpeed;
			mo2 = "rect(auto, auto, auto, "+cutt2+"px)";
			if (ie){
				document.all[curTis[0]].style.clip = mo2;
			}
			else{
				mo2 = "rect(auto, auto, 1000px, "+cutt2+"px)";
				document.getElementById(curTis[0]).style.clip = mo2;
			}
			//alert (mo);
		}
		else{
			cutt = (moveState+1)*tiSpeed;
			mo = "rect(auto, auto, auto, "+cutt+"px)";
			if (ie){
				document.all[curTis[0]].style.clip = mo;
			}
			else{
				mo = "rect(auto, auto, 1000px, "+cutt+"px)";
				document.getElementById(curTis[0]).style.clip = mo;
			}
			
			cutt2 = (moveState+1)*tiSpeed;
			mo2 = "rect(auto, "+cutt2+"px, auto, auto)";
			if (ie){
				document.all[curTis[curTis.length - 1]].style.clip = mo2;
			}
			else{
				mo2 = "rect(auto, "+cutt2+"px, 1000px, auto)";
				document.getElementById(curTis[curTis.length - 1]).style.clip = mo2;
			}
		}
		
		moveState ++;
		if (moveState >= maxMoveState){
			moveState = 0;
			clearInterval(TIME);
			if (dir == 1){
				laHide = curTis[curTis.length -1];
				curTis.pop();
			}
			else{
				laHide = curTis[0];
				curTis.shift();
			}
			if (ie){
				document.all[laHide].style.visibility = "hidden";
			}
			else{
				document.getElementById(laHide).style.visibility = "hidden";
				//document.getElementById("bann1").style.left = 1000;
				//alert(document.getElementById(laHide).style.left);
			}
			tiMoving = 0;
		}
	}
	
	function tiPlace(id, place){
		if (ie){
			document.all[id].style.width = tiVisWidth;
			document.all[id].style.height = tiVisHeight;
			document.all[id].style.posTop = tiTop;
			document.all[id].style.posLeft = tiLeft + ((tiVisWidth) * (place - 1));
			//document.all[id].style.clip = "rect(auto, auto, auto, auto)";
			document.all[id].style.visibility = "visible";
		}
		else{
			document.getElementById(id).style.width = tiVisWidth;
			document.getElementById(id).style.height = tiVisHeight;
			document.getElementById(id).style.top = tiTop;
			document.getElementById(id).style.left = tiLeft + ((tiVisWidth) * (place -1));
			//document.getElementById(id).style.clip = "rect(auto, auto, auto, auto)";
			document.getElementById(id).style.visibility = "visible";
		}
		//document.all[id].style.clip = "rect(auto "+tiVisWidth+"px auto "+tiVisHeight+"px)";
	}
	
	function start(dir){
//		if (ie){
		goTime = setInterval ('goti('+dir+')', tiTime*maxMoveState-10);
//		}
	}
	function stop(dir){
//		if (ie){
		clearInterval(goTime);
//		}
	}
