//Specify the marquee contents
var NTSC="";	
which = new TestNavigateur() //Crée l'objet "TestNavigateur"

if (document.all){
	document.write('<marquee direction="up" scrollAmount='+marqueespeed+' style="position:relative;left:0;top:0;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'">'+marqueecontents+'</marquee>')
}

if (which.ns4Win||which.ns4Mac)
{
	NTSC="<ilayer id='cmarquee01' width='"+marqueewidth+"' height='"+marqueeheight+"'>"+
	"<layer id='cmarquee02' width='"+marqueewidth+"' height='"+marqueeheight+"'>"+marqueecontents+"</layer>"+
	"</ilayer>";
	document.write(NTSC);
}

if (which.ns5Win||which.ns5Mac)
{
	document.write("<div style='overflow:hidden;height:"+marqueeheight+"'><div id='cmarquee01' style='position:relative;top:0'>"+marqueecontents+"</div></div>");
}

function regenerate()//Recharge la page sur le resize
{
window.location.reload()
}

function regenerate2()
{
	setTimeout("window.onresize=regenerate",450)
	intializemarquee()
}

function intializemarquee()
{
	if (which.ns4Win||which.ns4Mac) thelength=(document.cmarquee01.document.cmarquee02.document.height);
	if (which.ns5Win||which.ns5Mac) thelength=document.getElementById("cmarquee01").offsetHeight;
	scrollit();
}

function scrollit()
{
	if (which.ns5Win||which.ns5Mac)
	{
		if (parseInt(document.getElementById("cmarquee01").style.top)>=thelength*(-1))
		{
			document.getElementById("cmarquee01").style.top=parseInt(document.getElementById("cmarquee01").style.top)-marqueespeed;
			setTimeout("scrollit()",100);
		}
		else
		{
			document.getElementById("cmarquee01").style.top=marqueeheight;
			scrollit();
		}
	}
}

if (which.ns4Win||which.ns4Mac||which.ns5Win||which.ns5Mac) window.onload=regenerate2()//Quand la page est chargée on active le scroll

function TestNavigateur() 
{
	this.pltfrm=navigator.platform;
	var b = navigator.appName;
	this.agent=navigator.userAgent;
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.v = parseInt(navigator.appVersion);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4Win = (this.b=="ns" && this.v==4 && this.pltfrm=="Win32");
	this.ns5Win = (this.b=="ns" && this.v==5 && this.pltfrm=="Win32");
	this.ns6_0Win =	(this.ns5Win && navigator.userAgent.indexOf('Netscape6/6.0')>0);
	this.ns6_1Win = (this.ns5Win && navigator.userAgent.indexOf('Netscape6/6.1')>0);
	this.ns6_2Win =	(this.ns5Win && navigator.userAgent.indexOf('Netscape6/6.2')>0);
	this.ns4Mac = (this.b=="ns" && this.v==4 && this.pltfrm=="MacPPC");
	this.ns5Mac = (this.b=="ns" && this.v==5 && this.pltfrm=="MacPPC");
	this.ns6_0Mac =	(this.ns5Mac && navigator.userAgent.indexOf('Netscape6/6.0')>0);
	this.ns6_1Mac = (this.ns5Mac && navigator.userAgent.indexOf('Netscape6/6.1')>0);
	this.ns6_2Mac =	(this.ns5Mac && navigator.userAgent.indexOf('Netscape6/6.2')>0);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4Win = (navigator.userAgent.indexOf('MSIE 4')>0 && this.pltfrm=="Win32");
	this.ie5Win = (navigator.userAgent.indexOf('MSIE 5')>0 && this.pltfrm=="Win32");
	this.ie6Win = (navigator.userAgent.indexOf('MSIE 6')>0 && this.pltfrm=="Win32");
	this.ie4Mac = (navigator.userAgent.indexOf('MSIE 4')>0 && this.pltfrm=="MacPPC");
	this.ie5Mac = (navigator.userAgent.indexOf('MSIE 5')>0 && this.pltfrm=="MacPPC");
	this.ie6Mac = (navigator.userAgent.indexOf('MSIE 6')>0 && this.pltfrm=="MacPPC");

	if (this.ie5) this.v = 5;
	this.min = (this.ns||this.ie);
}

