scroll_largeur = 300;
scroll_hauteur = 120;
scroll_bgcolor = '';
scroll_background = "";
scroll_pause_seconde = 3;
scroll_mode =1;
scroll_actuel = 0;

news_message = new Array;
news_message[0]='<a href="news_dioptase_2009.html#pollutec_marocco_2009" class=scroll_news align="center">09-25-2009: DIOPTASE will be present on the<br>first Pollutec Marocco show</a>';

function StartScrollNews(){
	if(scroll_mode == 1)
		{
		scroller_haut = "scroller_1";
		scroller_bas = "scroller_2";
		scroll_mode = 0;
		}
	else
		{
		scroller_bas = "scroller_1";
		scroller_haut = "scroller_2";
		scroll_mode = 1;
		}
	scroll_nb_message = news_message.length-1;
	if(scroll_actuel == scroll_nb_message)
		scroll_suivant = 0;
	else
		scroll_suivant = scroll_actuel+1;
	if(document.getElementById)
		document.getElementById(scroller_bas).innerHTML = news_message[scroll_suivant];
	scroll_top = 0;
	if(document.getElementById)
		setTimeout( "ScrollTimer()", scroll_pause_seconde*1000);
	}

function ScrollTimer(){
	scroll_top -= 1;
	document.getElementById(scroller_haut).style.top = scroll_top;
	document.getElementById(scroller_bas).style.top = scroll_top+scroll_hauteur;
	if((scroll_top+scroll_hauteur) > 0)
		setTimeout("ScrollTimer()",50)
	else
		StopScrollNews();
	}

function StopScrollNews(){
	scroll_actuel = scroll_suivant;
	StartScrollNews();
	}

function ShowNewsListe(){
document.write('<div id=scroll_relativ style="position:relative;width:'+scroll_largeur+';height:'+scroll_hauteur+';background-color:'+scroll_bgcolor+';background-image:url('+scroll_background+')">'
				+'<div id=scroll_cadre style="position:absolute;width:'+(scroll_largeur-8)+';height:'+(scroll_hauteur-8)+';top:4;left:4;clip:rect(0 '+(scroll_largeur-8)+' '+(scroll_hauteur-8)+' 0)">'
				+'<div id=scroller_1 style="position:absolute;width:'+(scroll_largeur-8)+';left:0;top:0;" class=scroll_news>'+news_message[0]+'</div>'
				+'<div id=scroller_2 style="position:absolute;width:'+(scroll_largeur-8)+';left:0;top:'+scroll_hauteur+';" class=scroll_news>'+news_message[1]+'</div>'
				+'</div></div>');
}

function OnLoadBody(){
	StartScrollNews();
}

function UnCryptMailto( s )
{
	var n = 0;
	var r = "";
	for( var i = 0; i < s.length; i++)
	{
		n = s.charCodeAt( i );
		if( n >= 8364 )
		{
			n = 128;
		}
		r += String.fromCharCode( n - 1 );
	}
	return r;
}

function linkTo_UnCryptMailto( s )
{
	location.href=UnCryptMailto( s );
}
