<!--
var timerID=0, stillInside=false, speed=50, inScroller, outScroller;

// up
function up()
{
	if (!inScroller)
		init_scroll(10);
	stillInside = true;
	timerID = setTimeout("inScroller.scroll(-4)", 100);
}

// down	
function down()
{
	if (!inScroller)
		init_scroll(10);
	stillInside = true;
	timerID = setTimeout("inScroller.scroll(+4)", 100);
}

// scrollto
function doscroll(y)
{
	if (!inScroller)
		init_scroll(10);
	inScroller.scrollto(-y);
}

// out
function out()
{
	stillInside = false;
	if (timerID)
		clearTimeout(timerID);
}

// init_scroll
function init_scroll(v)
{
	speed = v;
	outScroller = new CompatibleObject("outScroller") 
	inScroller = new CompatibleObject("inScroller", "outScroller") 
	inScroller.css.position = (bw.ns5 || bw.ns4) ? "relative" : "absolute";
	inScroller.move(0, 0);
}

// browserCaps	
function browserCaps()
{ 
	this.ver = navigator.appVersion;
	this.dom = document.getElementById ? 1 : 0;
	this.ie5 = (this.ver.indexOf("MSIE 5") > -1 && this.dom) ? 1 : 0; 
	this.ie4 = (document.all && !this.dom) ? 1 : 0; 
	this.ns5 = (this.dom && parseInt(this.ver) >= 5) ? 1 : 0; 
	this.ns4 = (document.layers && !this.dom) ? 1 : 0; 
	this.bw = (this.ie5 || this.ie4 || this.ns4 || this.ns5);
	return this;
} 
bw = new browserCaps();

// CompatibleObject
function CompatibleObject(obj, nest)
{ 
	nest = (!nest) ? '':'document.' + nest + '.';
	this.el = (bw.dom ? document.getElementById(obj) : (bw.ie4 ? document.all[obj] : (bw.ns4 ? eval(nest+'document.'+obj) : 0))); 
	this.css = (bw.dom ? document.getElementById(obj).style : (bw.ie4 ? document.all[obj].style : (bw.ns4 ? eval(nest+'document.'+obj):0))); 
	this.scrollHeight = (bw.ns4 ? this.css.document.height : this.el.offsetHeight); 
	this.clipHeight = (bw.ns4 ? this.css.clip.height : this.el.offsetHeight);
	this.scroll = scroll; 
	this.move = move; 
	this.scrollto = scrollto; 
	this.x; 
	this.y; 
	this.obj = obj + "Object"; 
	eval(this.obj + " = this");
	return this; 
} 

// move
function move(x,y)
{ 
	this.x = x;
	this.y = y; 
	this.css.left = this.x; 
	this.css.top = this.y; 
} 
 
// scroll
function scroll(d)
{ 
	var y = this.y - d;
	if (y <= 0 && y >= -this.scrollHeight + outScroller.clipHeight)
	{ 
		this.move(0, y);
		if (stillInside) 
			setTimeout(this.obj + ".scroll(" + d + ")", speed);
	} 
} 

// scrollto
function scrollto(y)
{ 
	if (y > 0)
		y = 0;
	if (y < -this.scrollHeight + outScroller.clipHeight)
		y = -this.scrollHeight + outScroller.clipHeight;
	this.move(0, y);
} 


/* auto scroll */

var current_item = new Array;
current_item['breve'] = 1;
current_item['article'] = 1;

function show_actu(type,item) {
	if (!item) var item = 1;
	if (document.getElementById(type+'_txt')) {
		if (navigator.appVersion.indexOf("MSIE")!=-1) {
		// pour IE : on applique un effet de transition sur le texte
			document.getElementById(type+'_txt').filters[0].apply();
			document.getElementById(type+'_txt').innerHTML = document.getElementById(type+'_'+item).innerHTML;
			document.getElementById(type+'_txt').filters[0].play();
		} else {
		// pour FF et autres navigateurs : transition sans effet
			document.getElementById(type+'_txt').innerHTML = document.getElementById(type+'_'+item).innerHTML;
		}
	}
}
function auto_scrolling(vars) {
	var type_tab = vars.split(",");
	
	for (i = 0; i < type_tab.length; i++) {
		var item_tab = type_tab[i].split("#");
		var type = item_tab[0];
		var nb_item = item_tab[1];
		if (current_item[type] > nb_item) current_item[type] = 1;
		show_actu(type,current_item[type]);	
		current_item[type] ++;
		
	}
	timer = setTimeout("auto_scrolling('"+vars+"')",5000);
}
function switch_item(type,operator,nb_item) {
	if (operator == '+') new_item = current_item[type] - 1 + 1;
	else if (operator == '-') new_item = current_item[type] - 1 - 1;
	
	if (new_item < 1) new_item = nb_item;
	if (new_item > nb_item) new_item = 1;
	
	current_item[type] = new_item + 1;
	show_actu(type,new_item);
	//clearTimeout(timer);
}

// -->	