var interV,interVX,i=0;

function accessCSS(layerID){
	if(document.getElementById){
		return document.getElementById(layerID).style;
	}else if(document.all){
		return document.all[layerID].style;
	}else if(document.layers){
		return document.layers[layerID];
	}
}

function moveLayer(layer, wid)
{
	layerPos = parseInt(accessCSS(layer).left)
	layerPos>(-480)?layerPos-=1:layerPos=wid;
	accessCSS(layer).left=layerPos + 'px';
}

function moveLayers(wid){
	moveLayer("SAMPLE1", wid);
	moveLayer("SAMPLE2", wid);
	moveLayer("SAMPLE3", wid);
	moveLayer("SAMPLE4", wid);
	moveLayer("SAMPLE5", wid);
	moveLayer("SAMPLE6", wid);
	interV = setTimeout("moveLayers('"+wid+"')",25);
}

function init(wid)
{
	setTimeout("moveLayers('"+wid+"')", 500);
}

function writeLayer(layerID,txt){
	if(document.getElementById){
		document.getElementById(layerID).innerHTML=txt;
	}else if(document.all){
		document.all[layerID].innerHTML=txt;
	}else if(document.layers){
		with(document.layers[layerID].document){
			open();
			write(txt);
			close();
		}
	}
}

