var c = 0;
var p = true;
var t;
var a = new Array("","one","two","three");
var b = new Array("","l_one","l_two","l_three");
function nextNews(){
	c++;
	if(c>3)
	c=1;
	toTop(c);
}
/*function prevNews(){
	c--;
	if(c<=0)
	c=2;
	toTop(c);
}*/
function toTop(d){
	c=d;
	for(var i=1;i<=3;i++){
		if(i==c){
			document.getElementById(b[i]).style.background="#C8D8C8";
			document.getElementById(a[i]).style.visibility="visible";
		}
		else{
			document.getElementById(b[i]).style.background="url(images/adv_back.gif)";
			document.getElementById(a[i]).style.visibility="hidden";
		}
	}
	/*else if(c==2)
	{
	document.getElementById('1').style.visibility="hidden";
	document.getElementById('2').style.visibility="visible";
	document.getElementById('l_one').style.color="#000000";
	document.getElementById('l_two').style.color="#FF0000";
	}*/
	//document.getElementById('control').innerHTML=c+"/2";
}
function play(){
		if(p){
	    nextNews();
		t=setTimeout("play()",3000);
		}
	}
function stopit(){
	p=false;

}
function playit(){
	p=true;
	t=clearTimeout(t);
	t=setTimeout("play()",3000);
}
function setc(){
	p=true;
	//document.getElementById('play').style.color="#9A1C2D";
}

var c1 = 0;
var p1 = true;
var t1;
var a1 = new Array("","one1","two1","three1");
var b1 = new Array("","l_one1","l_two1","l_three1");
function nextNews1(){
	c1++;
	if(c1>3)
	c1=1;
	toTop1(c1);
}
/*function prevNews(){
	c--;
	if(c<=0)
	c=2;
	toTop(c);
}*/
function toTop1(d){
	c1=d;
	for(var i=1;i<=3;i++){
		if(i==c1){
			document.getElementById(b1[i]).style.background="#C8D8C8";
			document.getElementById(a1[i]).style.visibility="visible";
		}
		else{
			document.getElementById(b1[i]).style.background="url(images/adv_back.gif)";
			document.getElementById(a1[i]).style.visibility="hidden";
		}
	}
	/*else if(c==2)
	{
	document.getElementById('1').style.visibility="hidden";
	document.getElementById('2').style.visibility="visible";
	document.getElementById('l_one').style.color="#000000";
	document.getElementById('l_two').style.color="#FF0000";
	}*/
	//document.getElementById('control').innerHTML=c+"/2";
}
function play1(){
		if(p1){
	    nextNews1();
		t1=setTimeout("play1()",3000);
		}
	}
function stopit1(){
	p1=false;

}
function playit1(){
	p1=true;
	t1=clearTimeout(t1);
	t1=setTimeout("play1()",3000);
}
function setc1(){
	p1=true;
	//document.getElementById('play').style.color="#9A1C2D";
}

var c2 = 0;
var p2 = true;
var t2;
var a2 = new Array("","one2","two2","three2");
var b2 = new Array("","l_one2","l_two2","l_three2");
function nextNews2(){
	c2++;
	if(c2>3)
	c2=1;
	toTop2(c2);
}
/*function prevNews(){
	c--;
	if(c<=0)
	c=2;
	toTop(c);
}*/
function toTop2(d){
	c2=d;
	for(var i=1;i<=3;i++){
		if(i==c2){
			document.getElementById(b2[i]).style.background="#C8D8C8";
			document.getElementById(a2[i]).style.visibility="visible";
		}
		else{
			document.getElementById(b2[i]).style.background="url(images/adv_back.gif)";
			document.getElementById(a2[i]).style.visibility="hidden";
		}
	}
	/*else if(c==2)
	{
	document.getElementById('1').style.visibility="hidden";
	document.getElementById('2').style.visibility="visible";
	document.getElementById('l_one').style.color="#000000";
	document.getElementById('l_two').style.color="#FF0000";
	}*/
	//document.getElementById('control').innerHTML=c+"/2";
}
function play2(){
		if(p2){
	    nextNews2();
		t2=setTimeout("play2()",3000);
		}
	}
function stopit2(){
	p2=false;

}
function playit2(){
	p2=true;
	t2=clearTimeout(t2);
	t2=setTimeout("play2()",3000);
}
function setc2(){
	p2=true;
	//document.getElementById('play').style.color="#9A1C2D";
}