// JavaScript Document
/**********************************************************************************   
ChangeText 
*   Copyright (C) 2001 Thomas Brattli
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by Thomas Brattli
*
*   Script date: 08/02/2001 (keep this date to check versions) 
*********************************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=lib_bwcheck()
if(document.layers){ //NS4 resize fix...
	scrX= innerWidth; scrY= innerHeight;
	onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}

/****
Variables to set 
****/
msgFont= "Verdana, arial,helvetiva"	// The font for the message
msgFontSize= 10				// Set the fontSize in px
msgFontColor="#000000"		// Set the fontColor
msgWidth= "300"				// Set the width of the messageblock here for netscape 4

/********************************************************************************
You don't have to change anything below this
********************************************************************************/

//ChangeText object constructor.
function makeChangeTextObj(obj){
   	this.css = bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;	
   	this.writeref = bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;	
	this.writeIt = b_writeIt;					
}
function b_writeIt(text,num){
	if (bw.ns4){
		this.writeref.write(text)
		this.writeref.close()
	}
    else this.writeref.innerHTML = messages[num]
}

//The mouoseover function. Calls the writeIt method to write the text to the div.
function changeText(num){
	if(bw.bw) oMessage.writeIt(messages[num], num)
}

//The init function. Calls the object constructor and initiates some properties.
function changeTextInit(){
	//Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
	bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
	if (bw.opera5) bw.ns6 = 0
	
	oMessage = new makeChangeTextObj('divMessage')
	//Setting the style properties of the text layer.
	if(bw.dom || bw.ie4){
		with(oMessage.writeref.style){fontFamily=msgFont; fontSize=msgFontSize+"px"; color=msgFontColor}
	}
	//Both layers are hidden by default to prevent users from mousing over them and creating errors while the page loads.
	oMessage.css.visibility= "visible"
}

//If the browser is ok, the init function is called on pageload. 
//if (bw.bw) onload = changeTextInit



/**********************************************************************************
ScrollText
* Copyright (C) 2001 <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a>
* This script was released at DHTMLCentral.com
* Visit for more great scripts!
* This may be used and changed freely as long as this msg is intact!
* We will also appreciate any links you could give us.
*
* Made by <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a>
*********************************************************************************/

/*
function lib_bwcheck(){ //Browsercheck (needed)
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
return this
}*/
var bw=new lib_bwcheck()

//If you want it to move faster you can set this lower, it's the timeout:
var speed = 60

//Sets variables to keep track of what's happening
var loop, timer

//Object constructor
function makeObj(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.up=goUp;this.down=goDown;
	this.moveIt=moveIt; this.x=0; this.y=0;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

function moveIt(x,y){
	this.x = x
	this.y = y
	this.css.left = this.x+px
	this.css.top = this.y+px
}

//Makes the object go up
function goDown(move){
	if (this.y>-this.scrollHeight+oCont.clipHeight){
		this.moveIt(0,this.y-move)
			if (loop) setTimeout(this.obj+".down("+move+")",speed)
	}
}
//Makes the object go down
function goUp(move){
	if (this.y<0){
		this.moveIt(0,this.y-move)
		if (loop) setTimeout(this.obj+".up("+move+")",speed)
	}
}


//Calls the scrolling functions. Also checks whether the page is loaded or not.
function scroll(speed){
	if (scrolltextLoaded){
		loop = true;
		if (speed>0) oScroll.down(speed)
		else oScroll.up(speed)
	}
}

//Stops the scrolling (called on mouseout)
function noScroll(){
	loop = false
	if (timer) clearTimeout(timer)
}


//Makes the object
var scrolltextLoaded = false
function scrolltextInit(){
	oCont = new makeObj('divScrollTextCont')
	oScroll = new makeObj('divText','divScrollTextCont')
	oScroll.moveIt(0,0)
	oCont.css.visibility = "visible"
	scrolltextLoaded = true
}
//Call the init on page load if the browser is ok...
//if (bw.bw) onload = scrolltextInit

/****************DW Fonctions*********************/

<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

var vis = new Array();

function swap_couche_perso(couche){
	if (vis[couche] == 'show'){
		MM_swapImage('triangle'+couche,'','images/droite.gif?'+couche,1)
		MM_showHideLayers('Layer'+couche,'','hide');
		vis[couche] = 'hide';
	} else {
		MM_swapImage('triangle'+couche,'','images/bas.gif?'+couche,1)
		MM_showHideLayers('Layer'+couche,'','show');
		vis[couche] = 'show';
	}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v='hide')?'none':v; }
    obj.display=v; }
}

/*
 SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT - Gestion des Favoris
 http://www.editeurjavascript.com
 */
 
 if(document.getElementById)
 	{
 	/* LE HAUT DU CADRE */
 	access_list_haut = "<TABLE WIDTH=270 CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR=#000000><TR><TD><TABLE WIDTH=100% CELLPADDING=3 CELLSPACING=1 BORDER=0><TR><TD BGCOLOR=#000000><FONT FACE=Verdana SIZE=1 COLOR=#FFFFFF><B>Accès rapides :</B></FONT></TD></TR><TR><TD BGCOLOR=#FFFFFF><FONT FACE=Verdana SIZE=1 COLOR=#000000><B>Visite éclair :</B><BR><a href='article.php3?id_article=541'>Programme du week-end</a><BR><a href='article.php3?id_article=33'>Resultats de la semaine dernière</a><BR>";
 	/* LE BAS DU CADRE */
 	access_list_bas = "<BR><BR><A HREF=# onClick='accessAdd(1);return(false)'>Mettre la page actuelle en accès rapide</A><BR><A HREF=# onClick=\"accessAff(0);return(false)\">Fermer cette fenêtre</A></FONT></TD></TR></TABLE></TD></TR></TABLE>";
 	access_list_1 = new Array;
 	access_list_2 = new Array;
 	access_book = "";
 	if(navigator.appName.substring(0,3) == "Net")
 	document.captureEvents(Event.MOUSEMOVE);
 	document.onmousemove = acces_get_mouse;
 	}
 
 function accessRead()
 	{
	access_list = "<BR><B>Vos pages en accès rapide :</B><BR>";
 	access_cook = document.cookie;
 	access_variable = "access_book=";
 	access_place = access_cook.indexOf(access_variable,0);
 	if (access_place <= -1)
 		access_list = "<br>Vous n'avez pas de page en accès rapide";
 	else
 		{
 		access_end = access_cook.indexOf(";",access_place)
 		if (access_end <= -1)
 			access_book = unescape(access_cook.substring(access_place+access_variable.length,access_cook.length));
 		else
 			access_book = unescape(access_cook.substring(access_place+access_variable.length,access_end));
 		if(access_book.indexOf("|",0)>=0)
 			{
 			access_list_1 = access_book.split("|");
 			for(a=0;a<access_list_1.length;a++)
 				{
 				if(access_list_1[a].indexOf("%",0)>=0)
 					{
 					access_list_2 = access_list_1[a].split("%");
 					if(access_list_2[1].length > 40)
 						access_list_2[1] = access_list_2[1].substring(0,35)+"...";
 					access_list += '. <A HREF="'+access_list_2[0]+'">'+access_list_2[1]+'</A> [<A HREF=# onClick="accessDel(\''+access_list_2[0]+'\');return(false)" alt="Effacer">eff</A>]<BR>';
 					}
 				}
 			}
 		else
 			access_list = "Vous n'avez pas de page en accès rapide";
 		}
 	return(access_list);
 	}
 
 
 function acces_get_mouse(e)
 	{
 	access_X = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
 	access_Y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
 	}
 	
 function accessAff(access_mode)
 	{
 	if(access_mode == 0 && document.getElementById)
 		{
 		document.getElementById("access_box").style.visibility = 'hidden';
 		}
 	if(access_mode == 1 && document.getElementById)
 		{
 		document.getElementById("access_box").innerHTML = access_list_haut+accessRead()+access_list_bas;
 		document.getElementById("access_box").style.visibility = 'visible';
 		document.getElementById("access_box").style.left = access_X;
 		document.getElementById("access_box").style.top = access_Y;
 		}
 	if(!document.getElementById)
 		alert('Cette fonction n\'est pas compatible avec votre navigateur.\nMettez à jour votre matériel :)\nIE 5+ / NN6 +\n')
 	}
 	
 function accessAdd(access_mode)
 	{
 	if(access_mode==1)
 		{
 		access_url = document.location.href;
 		//Pour éviter de rajouter le titre du site dans le favori
		title = document.title.replace('Kangourous Basket - ', '') ;

		access_titre = title;
 		document.getElementById("access_box").innerHTML = access_list_haut+"<B>Vous désirez ajouter la page :</B><BR>"+access_url.substring(0,40)+"...<BR>dans vos accès rapides.<BR><BR><FORM NAME=access_form>Entrez le nom que vous désirez donner à cette page :<BR><INPUT TYPE=text NAME=access_name VALUE=\""+access_titre+"\" STYLE=width:200><INPUT TYPE=button VALUE=OK onClick='accessAdd(2)'></FORM>"+access_list_bas;
 		} 
 	if(access_mode==2)
 		{
 		if(document.access_form.access_name.value=="")
 			access_titre = document.title;
 		else
 			access_titre = document.access_form.access_name.value;
 		accessCookie('access_book',access_book+document.location.href+"%"+access_titre+"|");
 		document.getElementById("access_box").innerHTML = access_list_haut+accessRead()+access_list_bas;
 		} 
 	}
 	
 function accessCookie(access_nom,access_valeur)
 	{
 	access_dateExp = new Date(2020,01,01);
 	access_dateExp = access_dateExp.toGMTString();
 	document.cookie = access_nom + '=' + escape(access_valeur) + '; expires=' + access_dateExp + ';path=/';
 	}
 	
 function accessDel(access_to_del)
 	{
 	access_new_cookie = "";
 	access_cook = document.cookie;
 	access_variable = "access_book=";
 	access_place = access_cook.indexOf(access_variable,0);
 	if (access_place >= 0)
 		{
 		access_end = access_cook.indexOf(";",access_place)
 		if (access_end <= -1)
 			access_book = unescape(access_cook.substring(access_place+access_variable.length,access_cook.length));
 		else
 			access_book = unescape(access_cook.substring(access_place+access_variable.length,access_end));
 		if(access_book.indexOf("|",0)>=0)
 			{
 			access_list_1 = access_book.split("|");
 			for(a=0;a<access_list_1.length;a++)
 				{
 				if(access_list_1[a].indexOf("%",0)>=0)
 					{
 					access_list_2 = access_list_1[a].split("%");
 					if(access_list_2[0]!=access_to_del)
 						{
 						access_new_cookie += access_list_1[a]+"|";
 						}
 					}
 				}
 			accessCookie("access_book",access_new_cookie);
 			document.getElementById("access_box").innerHTML = access_list_haut+accessRead()+access_list_bas;
 			}
 		}
 	}
 
 if(document.getElementById)
 	document.write('<DIV ID=access_box STYLE="top:0;left:0;position:absolute;z-index:9;visibility:hidden"></DIV>')


///Pour ne pas montrer l'erreur d'un rollover sur le menu pendant le chargement >> bug créé par l'ajoût de ChangeText()
function NoError()
	{
	return true;
	}
window.onerror=NoError;

