/*****************************************************
*             DHTML Alternating Marquee              *
*                   (IE4+, NS4+)                     *
*              Programmer:  Jim Salyer               *
*****************************************************/

// Warnings:
// Users of Netscape will not see the transitions, just the messages being flashed.
// Users of Netscape 4 must be aware that the border will look different than the border in Internet Explorer and Netscape 6.

// Set the functionality of the marquee below.
var altTime  = 2000; // Set the time between message displays (in milliseconds). 
var altSpeed = .5;   // Set the transition duration.
var msgTrans =  35;  // Set the number of the transition to apply to the messages.

// Set the style of the marquee below.
var mLeft      = 182;          // Set the left position of the marquee (in pixels).
var mTop       = 212;         // Set the top position of the marquee (in pixels).
var mHeight    = 32;        // Set the height of the marquee (in pixels).
var mWidth     = 578;        // Set the width of the marquee (in pixels).
var bgColor    = 'yellow';     // Set the marquee's background color.
var brdrWidth  = 2;          // Set the marquee's border width.
var brdrStyle  = 'solid';    // Set the marquee's border style ('solid', 'dashed', 'dotted', etc.).  Different border styles only work in Netscape 6 and up, and not in Internet Explorer.
var brdrColor  = 'aqua';     // Set the marquee's border color.
var fontFamily = 'Tahoma';  // Set the font family.
var fontSize   = 18;         // Set the font size (in pixels).
var fontStyle  = 'normal';   // Set the font style ('normal' or 'italic').
var fontWeight = 'bold';     // Set the font weight ('normal' or 'bold').
var txtDec     = 'none';     // Set any decorations for the marquee's text.
var fontColor  = 'navy';     // Set the font color.
var msgZIndex  = 1000;       // Set the z-index of the marquee.  Make sure that the number is bigger than the z-index of what you want it to appear over on the page.

// Input your messages here.  Your messages can contain HTML tags.
// If you want an apostrophe in your text, type \' instead of just '.
var msgArray = new Array();
msgArray[0] = 'CECI EST UNE LISTE INITIALE DES ITEMS DISPONIBLE.';
msgArray[1] = 'Veillez prendre note que le site est en construction.';
msgArray[2] = 'Plusieurs liens ne sont pas encore disponibles.';
msgArray[3] = 'Excuser-nous pour les inconvénients occasionnés.';
msgArray[4] = 'N\'hésitez pas à nous poser vos question.';
msgArray[5] = 'Nous espérons que votre expérience';
msgArray[6] = 'en sera une des plus agréable.';
msgArray[7] = 'Nous prenons la qualité des produits très au sérieux.';
msgArray[8] = 'Nous nous efforçons constamment d\'atteindre';
msgArray[9] = 'l\'excellence en matière de service à la clientele.';
msgArray[10] = 'Notre priorité, c\'est votre satisfaction.';

// Do not edit below this line!!!

var brwsr;
if (navigator.appName == 'Microsoft Internet Explorer')
{
	if (parseInt(navigator.appVersion) >= 3)
		brwsr = 'IE';
	else
		brwsr = null;
}
else if (navigator.appName == 'Netscape')
{
	if (parseInt(navigator.appVersion) >= 5)
		brwsr = 'NS6';
	else if (parseInt(navigator.appVersion) >= 4)
		brwsr = 'NS4';
	else
		brwsr = null;
}
if (brwsr == null)
	alert('Your browser does not support this marquee script.');

function Ret(msgNum)
{
	if (brwsr == 'IE')
		return(document.all['msg' + msgNum]);
	else if (brwsr == 'NS4')
		return(document.layers['msg' + msgNum]);
	else if (brwsr == 'NS6')
		return(document.getElementById('msg' + msgNum));
	else
		return(null);
}

function ShowOrHide(msgNum)
{
	var msgRet;
	if (brwsr == 'IE' || brwsr == 'NS6')
		msgRet = Ret(msgNum).style;
	else
		msgRet = Ret(msgNum);

	if (msgRet.visibility == 'hidden' || msgRet.visibility == 'hide')
	{
		if (brwsr == 'IE')
		{
			msgRet.filter = 'revealTrans(duration=' + altSpeed + ', transition=' + msgTrans + ')';
			Ret(msgNum).filters.revealTrans.apply();
		}
		brwsr == 'NS4' ? msgRet.visibility = 'show' : msgRet.visibility = 'visible';
		if (brwsr == 'IE')
			Ret(msgNum).filters.revealTrans.play();
	}
	else if (msgRet.visibility == 'visible' || msgRet.visibility == 'show')
		brwsr == 'NS4' ? msgRet.visibility = 'hide' : msgRet.visibility = 'hidden';
}

function ShowOrHide2(msgNum)
{
	ShowOrHide(msgNum);
	setTimeout('ShowOrHide(' + msgNum + ')', altTime);
}

function LoopIt()
{
	for (i=0; i<=msgArray.length-1; i++)
		setTimeout('ShowOrHide2(' + i + ')', altTime*i);
}

function BuildMarquee()
{
	var msgBlock = '';
	if (brwsr == 'IE' || brwsr == 'NS6')
	{
		msgBlock += '<div style="height:' + mHeight + 'px; width:' + mWidth + 'px; position:absolute; left:' + mLeft + 'px; top:' + mTop + 'px; background-color:' + bgColor + '; border:' + brdrWidth + 'px ' + brdrStyle + ' ' + brdrColor + '; z-index:' + msgZIndex + ';">\r';
		for (i=0; i<=msgArray.length-1; i++)
		{
			msgBlock += '  <span id="msg' + i + '" style="visibility:hidden; height:' + (mHeight - brdrWidth * 3) + 'px; width:' + (mWidth - brdrWidth * 3) + 'px; position:absolute; left:2px; top:2; font-family:' + fontFamily + '; font-size:' + fontSize + 'px; font-style:' + fontStyle + '; font-weight:' + fontWeight + '; text-decoration:' + txtDec + '; color:' + fontColor + '; z-index:' + (msgZIndex + 1) + '; ">\r'
			+ '    ' + msgArray[i] + '\r'
			+ '  </span>\r';
		} 
		msgBlock += '</div>';
		document.write(msgBlock);
	}
	else if (brwsr == 'NS4')
	{
		var msgBlockNS4 = new Array();
		for (i=0; i<=msgArray.length-1; i++)
		{
			msgBlockNS4[i] = '  <layer bgColor="' + bgColor + '" left="' + mLeft + '" name="msg' + i + '" top="' + mTop + '" visibility="hide" z-index="' + msgZIndex + '">\r'
			+ '    <table bgColor="' + bgColor + '" border="' + brdrWidth + '" borderColor="' + brdrColor + '" cellPadding="2" cellSpacing="0" height="' + mHeight + '" width="' + mWidth + '"><tr><td height="100%" width="100%"><p style="font-family:' + fontFamily + '; font-size:' + fontSize + 'px; font-style:' + fontStyle + '; font-weight:' + fontWeight + '; text-decoration:' + txtDec + '; color:' + fontColor + ';">' + msgArray[i] + '</p></td></tr></table>\r'
			+ '  </layer>\r';
		}

		var arrayStr = '';
		for (j=0; j<=msgBlockNS4.length-1; j++)
			arrayStr += msgBlockNS4[j];
		document.write(arrayStr);
	}
	else
		return(null);
}

BuildMarquee();
if (brwsr == 'NS4')
	setTimeout('LoopIt()', 100);
else
	LoopIt();
setInterval('LoopIt()', altTime*msgArray.length-1);