var scroll_off=0;
var run1=1;
var run2=0;

document.write('<div onMouseOver="scroll_stop()" onMouseOut="scroll_start()" style="position:relative;width:'+banner_width+';height:'+banner_height+';background-color:'+banner_bgcolor+');">');
document.write('<div style="position:absolute;width:'+(banner_width)+';height:'+(banner_height)+';top:0;left:0;clip:rect(0 '+(banner_width)+' '+(banner_height)+' 0);background-color:'+banner_bgcolor+');">');
document.write('<div id="scroller1" style="position:absolute;width:'+(banner_width)+';left:0;top:0;">'+comptent[0]+'</div>');
document.write('<div id="scroller2" style="position:absolute;width:'+(banner_width)+';left:'+banner_width+';top:0;">'+comptent[1]+'</div>');
document.write('</div></div>');

function scroll_step1()
{
	if(run1 == 1) {scroll_first = "scroller1";scroll_sec = "scroller2";run1 = 0;}else{scroll_first = "scroller2";scroll_sec = "scroller1";run1 = 1;}
		
	nbr_items = comptent.length-1; 
	if(run2 == nbr_items) {next_item = 0;}else{next_item = run2+1;}
	
	if(document.getElementById)	{document.getElementById(scroll_sec).innerHTML = comptent[next_item];}
	item_left = 0;
	if(document.getElementById)	{move1=setTimeout("scroll_step2()",banner_tempo);}
}

function scroll_step2()
{
	if (scroll_off == 0) {item_left -= 2;document.getElementById(scroll_first).style.left = item_left;document.getElementById(scroll_sec).style.left = item_left+banner_width;
		if((item_left+banner_width) > 0) {move2=setTimeout("scroll_step2()",10);}else{txt_defil_f3();}
	}
	else
	{
		move1=setTimeout("scroll_step2()",1000);
	}
}

function txt_defil_f3() {run2 = next_item;scroll_step1()}
function scroll_stop() {scroll_off=1;}
function scroll_start() {scroll_off=0;}	
function write_to_doc(txt) {document.write(txt);}

window.onload = scroll_step1;

