//// Affichette dynamique et notes avec option de persistance...// Ca en jette comme titre, hein?//// Copyright Gilles Karmasyn 2000-2009//// En cas de "recuperation", merci de laisser le copyright dans le code...// Parce que je me suis vraiment presse le cervelat pour tout cela...// Et puis pour que cela marche de NS4 a Safari 3 en passant par IE6 et Firefox, bonjour...//// Attention, code crachpouille pas optimise. Un gros travail reste a faire...charge    = false;refnum    = false;oldNote   = false;attente   = 0;      // temps de fermeture apres onMouseOut de la referencesurLaNote = false;tempoIE   = 0;      // tempo de fermeture pour IE, necessaire pour Mac                     // car la detection de la sortie de la note se fait par                     // rapport au bas du curseur et non au haut du curseur...                    // cette tempo donne le temps de cliquer sur un lien                    // eventuel...IsIEMac       = false;                    IsOldNetscape = false;IsMozilla     = false;IsIE          = false;IsSaf         = false; // necessaire poure gerer une difference sur style.topIsOldIE		  = false;IsNew		  = false;ecartBordIE   = 0;eloignementVert = 0; // pour les legendes (plus eloignees que les notes)bDebug=0;bSetParameters=false;bIsThereParameters=false;bSetNavigateur=false;// bIsThereNavigateur=false;// a effacer...//-----------------------------------------------------------------//// Pour avoir la methode indexOf sur les Array dans IE  de merde//// https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference:Objects:Array:indexOfif (!Array.prototype.indexOf){  Array.prototype.indexOf = function(elt /*, from*/)  {    var len = this.length;    var from = Number(arguments[1]) || 0;    from = (from < 0)         ? Math.ceil(from)         : Math.floor(from);    if (from < 0)      from += len;    for (; from < len; from++)    {      if (from in this &&          this[from] === elt)        return from;    }    return -1;  };}// --------------------------------------------------if ((document.layers) || (!document.getElementById)) //navigator.appName == "Netscape")){	adresseCourante = top.location.pathname;	alert("Vous utilisez un navigateur version 4 ou anterieure. Les pages de PHDN sont mieux visualisees avec des navigateurs plus recents. En attendant, vous etes transporte vers une version du site lisible par votre navigateur actuel (mais incomplete...).");	top.location = "http://gilkarm.free.fr/phdn"+adresseCourante;}if (!document.layers) // || (PAS navigator.appName == "Netscape")){    // On passe ici avec Firefox    document.write("<style type='text/css'>");    document.write("A.appel-note {margin-left: 1px;}");    document.write("</style>");}    /* Copyright (c) 2007 Marlin Forbes (http://www.datashaman.com)      * Dual licensed under the MIT      * (http://www.opensource.org/licenses/mit-license.php)      * and GPL      * (http://www.opensource.org/licenses/gpl-license.php) licenses.      */      /* function setupParameters      * Creates an object property window.location.parameters which      * is an associative array of the URL querystring parameters used      * when requesting the current document.      * If the parameter is present but has no value, such as the parameter      * flag in http://example.com/index.php?flag&id=blah, null is stored.      */function setupParameters() {    bSetParameters = true;    if (window.location.search.length > 0)    {        bIsThereParameters = true;    }    else return(0);            var parameters = new Object();    var paramArray = window.location.search.substr(1).split('&');    var length = paramArray.length;                    for (var index = 0;index <length; index++ )     {        var param = paramArray[index].split('=');        var name  = param[0];        if (typeof param[1] == "string")        {            parameters[name]=decodeURIComponent(param[1].replace(/\+/g, ' '));        }        else        {            parameters[name]=null;         }    }                    window.location.parameters = parameters;                }function getParameter(name) {    if(bSetParameters==false)    {        setupParameters();    }    if (bIsThereParameters)     {        return window.location.parameters[name];    }    else return(null);}      function setupNavigateur() {    bSetNavigateur = true;        var isDebug=getParameter("debug");    if (isDebug)    {        if (isDebug==1) bDebug=1;    }    var nOccurence = 0;    var navigateur = new Object();	var nomApplication      = navigator.appVersion;	var typeMachine         = navigator.platform;    var nomcourtApplication = navigator.appName;    var toutesInfos         = navigator.userAgent.toLowerCase();    var langueNav           = navigator.language;	if (bDebug) // defini dans notes-script.js	{		alert("platform: "+typeMachine+"  --  appname: "+nomcourtApplication+"  --  appVersion :"+nomApplication);		alert("userAgent: "+toutesInfos);	}        navigateur["nomcourt"] = nomcourtApplication;    navigateur["machine"]  = "inconnu";    navigateur["nav"]      = "inconnu";    navigateur["saf"]      = "inconnu";    navigateur["version"]  = "inconnu";    navigateur["msie"]     = "non";        var nOccurrence = nomApplication.indexOf("Win");    if ( (typeMachine == "Win32") || (nOccurrence != -1) )    {        navigateur["machine"]="pc";    }    else    {        nOccurrence = typeMachine.indexOf("Mac", 0);        if (nOccurrence == 0)        {            navigateur["machine"]="mac";        }
        else
        {
            nOccurrence = typeMachine.indexOf("iPhone", 0);
            if (nOccurrence == 0)
            {
                navigateur["machine"]="mobile";
            }

        }    }    nOccurrence = nomApplication.indexOf("MSIE", 0);    if (nOccurrence > -1)    {        navigateur["msie"]="oui";    }    nOccurrence = nomApplication.indexOf("MSIE 5", 0);    if (nOccurrence > -1)    {        navigateur["nav"]="oldIE";    }    else     {        nOccurrence = nomApplication.indexOf("MSIE 6", 0);        if (nOccurrence > -1)        {            navigateur["nav"]="oldIE";        }        else        {        	nOccurrence = nomApplication.indexOf("MSIE", 0);        	navigateur["nav"]="newIE";        }    }    nOccurrence = nomcourtApplication.indexOf("Netscape");    if (nOccurrence > -1)    {        navigateur["nav"]="mozilla";                        nOccurrence = toutesInfos.indexOf("firefox/3");        if (nOccurrence > -1)        {            navigateur["version"]="3";        }        nOccurrence = toutesInfos.indexOf("firefox/2");        if (nOccurrence > -1)        {            navigateur["version"]="2";        }    }    nOccurrence = nomApplication.indexOf("Safari", 0);	if (nOccurrence > 0)    {        navigateur["saf"] = "oui";        var nOccurrence3=nomApplication.indexOf("Version/3", 0)        var nOccurrence4=nomApplication.indexOf("Version/4", 0)        var nOccurrence5=nomApplication.indexOf("Version/5", 0)
        if ( (nOccurrence3 > 0) ||  (nOccurrence4 > 0) || (nOccurrence5 > 0))        {            navigateur["nav"]="mozilla";        }        else navigateur["nav"]="oldSaf";    }    else navigateur["saf"] = "non";    nOccurrence = nomApplication.indexOf("Chrome", 0);	if (nOccurrence > 0)    {        navigateur["nav"]="mozilla";    }       window.location.navigateur = navigateur;}function getNavigateur(propriete) {    if(bSetNavigateur==false)    {        setupNavigateur();    }        return window.location.navigateur[propriete];}          function testnavigateur(){	if (bDebug) // defini dans notes-script.js	{		document.write("<B>"+navigator.platform+"</B><BR />");		document.write("<B>"+navigator.appName+"</B><BR />");		document.write("<B>"+navigator.appVersion+"</B><BR />");	}}// 2007: http://www.howtocreate.co.uk/tutorials/javascript/browserwindowfunction getTailleFenetre() {  largeur=0; // portee sur tout le script!  hauteur=0; // portee sur tout le script!    if( typeof( window.innerWidth ) == 'number' )   {    //Non-IE    largeur = window.innerWidth;    hauteur = window.innerHeight;  }   else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )   {    //IE 6+ in 'standards compliant mode'    largeur = document.documentElement.clientWidth;    hauteur = document.documentElement.clientHeight;  }  else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )   {    //IE 4 compatible    largeur = document.body.clientWidth;    hauteur = document.body.clientHeight;  }}// 2007: http://www.howtocreate.co.uk/tutorials/javascript/browserwindow// on calcule le decalage horizontal mais on ne le renvoie pas (2007: pas besoin)function getDistanceParcourueY() {  var scrOfX = 0, scrOfY = 0;    if( typeof( window.pageYOffset ) == 'number' )   {    //Netscape compliant    scrOfY = window.pageYOffset;    scrOfX = window.pageXOffset;  }   else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) )   {    //DOM compliant    scrOfY = document.body.scrollTop;    scrOfX = document.body.scrollLeft;  }   else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) )   {    //IE6 standards compliant mode    scrOfY = document.documentElement.scrollTop;    scrOfX = document.documentElement.scrollLeft;  }    return(scrOfY);}// 2007: http://www.howtocreate.co.uk/tutorials/javascript/eventinfofunction getCoordonneesEvent(e) {  if( !e )   {    if( window.event )     {      //Internet Explorer      e = window.event;    } else {      //total failure, we have no way of referencing the event      return;    }  }    if( typeof( e.pageX ) == 'number' )   {    //most browsers    var xcoord = e.pageX;    var ycoord = e.pageY;  }   else if( typeof( e.clientX ) == 'number' )   {    //Internet Explorer and older browsers    //other browsers provide this, but follow the pageX/Y branch    var xcoord = e.clientX;    var ycoord = e.clientY;        var badOldBrowser = ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) ||     ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) ||     ( navigator.vendor == 'KDE' );         if( !badOldBrowser )     {      if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) )       {        //IE 4, 5 & 6 (in non-standards compliant mode)        xcoord += document.body.scrollLeft;        ycoord += document.body.scrollTop;      }       else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) )       {        //IE 6 (in standards compliant mode)        xcoord += document.documentElement.scrollLeft;        ycoord += document.documentElement.scrollTop;      }    }  }  else   {    //total failure, we have no way of obtaining the mouse coordinates    return;  }    return [xcoord, ycoord];}isFisrtAjuste = true;function ajusteCartouche(){	var typeNavigateur=getNavigateur("nav");		if (document.getElementById) 		{		// var leCartouche = document.getElementById("bloccart");		// var leCartouche = document.getElementById("cartouche1");				var leCartouche        = document.getElementById("cart-cont");		var leBlocPrinc        = document.getElementById("blocprinc");		var leBandeau          = document.getElementById("bandcentre1");		var leCartouchePHDN    = document.getElementById("cartouche1");		var leCartoucheRech    = document.getElementById("cartouche2");		var leCartoucheLiens   = document.getElementById("cartouche3");		var leCartoucheAussi   = document.getElementById("cartouche4");		var leCartoucheRechLoc = document.getElementById("cartouche5");//		var leLogo             = document.getElementById("lelogo");		var leLogo             = document.getElementById("cartouche-gauche");       if (bDebug) // defini dans notes-script.js	   {		  alert("courtouche4: "+leCartoucheLiens.style.width);	   }					// pour gerer vieux IE & FF2		if (isFisrtAjuste)		{			if (typeNavigateur != "oldIE") 			{				leCartouche.style.position = "fixed";				leLogo.style.position = "fixed";								var bChangeLargeur = false;				var laVersion      = getNavigateur("version");				var laMachine      = getNavigateur("machine");								if (  typeNavigateur == "newIE") bChangeLargeur=true;                if ( (typeNavigateur == "mozilla") && (laVersion=="2") )  bChangeLargeur=true;                if ( (typeNavigateur == "mozilla") && (laMachine=="pc") ) bChangeLargeur=true;				if (bChangeLargeur)				{					leCartouchePHDN.style.width   = "35ex";					leCartoucheRech.style.width   = "35ex";					leCartoucheLiens.style.width  = "35ex";                	                	if ( leCartoucheAussi != undefined )                	{    					leCartoucheAussi.style.width  = "35ex";                	}                	if ( leCartoucheRechLoc != undefined )                	{    					leCartoucheRechLoc.style.width  = "35ex";                	}				}				if (typeNavigateur == "newIE") 				{				    leBlocPrinc.style.width       = "70ex";					leBlocPrinc.style.paddingTop  = "6ex";                }								var isSafariNavigateur=getNavigateur("saf");				if (isSafariNavigateur == "oui")				{					leBlocPrinc.style.width      = "65ex";				}							}			else // que IE6			{				leBlocPrinc.style.width       = "70ex";				leBlocPrinc.style.paddingTop  = "6ex";				leCartouchePHDN.style.width   = "32ex";				leCartoucheRech.style.width   = "32ex";				leCartoucheLiens.style.width  = "32ex";               	if ( leCartoucheAussi != undefined )               	{   					leCartoucheAussi.style.width  = "32ex";               	}               	if ( leCartoucheRechLoc != undefined )               	{   					leCartoucheRechLoc.style.width  = "32ex";               	}			}				isFisrtAjuste = false;		}			    		var largBloc = leBlocPrinc.offsetWidth;		var largCart = leCartouchePHDN.offsetWidth;		var largLog  = leLogo.offsetWidth;		getTailleFenetre();				largMarg = (largeur-largBloc)/2;				// ------------------------------------------------------		// Gestion pb Atomz sous IE - GK 2009/*	    var pAtomz       = getParameter("sp_q");		if (pAtomz)		{			var dAtomz = getParameter("datomz");			if (dAtomz) alert ("ATOMZ!!!");			if ( ((typeNavigateur == "oldIE") || typeNavigateur == "newIE") )			{				if (dAtomz) 				{ 					alert ("LARGEUR");					alert (leBlocPrinc.style.pixelLeft);				}				leBlocPrinc.style.pixelLeft = largMarg;			} 		}*/		// fin gestion pb atomz sous IE		// ------------------------------------------------------						/* largMarg=Math.floor(largMarg); */			var agaucheCart = largMarg + largBloc;		var agaucheBand = largMarg;				var agaucheLogo = largMarg - largLog - 20;       if (bDebug) // defini dans notes-script.js	   {		  alert("agaucheLogo: "+agaucheLogo);	   }				leCartouche.style.left = agaucheCart+5+"px";		leBandeau.style.width  = largBloc-3+"px";    /* ajustement */		leBandeau.style.left   = agaucheBand+1+"px"; /* decalage   */		leLogo.style.left      = agaucheLogo+"px";				// alert (largeur-agaucheCart);				if ( (largeur-agaucheCart) < (largCart+30) )		{				// alert("cache");			leCartouchePHDN.style.visibility  = "hidden";			leCartoucheRech.style.visibility  = "hidden";			leCartoucheLiens.style.visibility = "hidden";           	if ( leCartoucheAussi != undefined )           	{				leCartoucheAussi.style.visibility  = "hidden";           	}           	if ( leCartoucheRechLoc != undefined )           	{				leCartoucheRechLoc.style.visibility  = "hidden";           	}		}		else		{			leCartouchePHDN.style.visibility  = "visible";			leCartoucheRech.style.visibility  = "visible";			leCartoucheLiens.style.visibility = "visible";           	           	if ( leCartoucheAussi != undefined )           	{				leCartoucheAussi.style.visibility  = "visible";           	}           	if ( leCartoucheRechLoc != undefined )           	{				leCartoucheRechLoc.style.visibility  = "visible";           	}		}        	/*	var target = "";			if (leBlocPrinc.currentStyle)		{			target = leBlocPrinc.currentStyle["marginLeft"];		}		else if (window.getComputedStyle)		{			var compStyle = window.getComputedStyle(leBlocPrinc, "");			target        = compStyle.getPropertyValue("margin-left");			// target = document.defaultView.getComputedStyle(leBlocPrinc,null).getPropertyValue("margin-left");				} 		else 		{			target = "";		}		// document.getElementById(target_id).innerHTML = target;			*/			} // if (document.getElementById)}function re_init(){    getTailleFenetre();	ajusteCartouche(); /*	  if (document.getElementById)	  {	  					divBandeauNord=document.getElementById("cartouche1");		if (largeur<875)		{			divBandeauNord.style.visibility="hidden";		}		else		{			divBandeauNord.style.visibility="visible";		}	}	*/}function stopVraiPropagation(e){
    if (getNavigateur("nav") == "mozilla")    {        e.stopPropagation();        // e.preventDefault();    }    if (getNavigateur("msie") == "oui")    {        window.event.cancelBubble=true;    }}// initialisation et capture de la taille de l'ecran, tout ca...function init(){    var isDebug=getParameter("debug");    if (isDebug)    {        if (isDebug==1) bDebug=1;    }       if (document.layers) // || (navigator.appName == "Netscape"))    {            if (bDebug)  alert ("debug 1");        largeur = window.innerWidth;        hauteur = window.innerHeight;         charge  = true;        // IsOldNetscape = true;    }    if (document.all) // IE    {        if (bDebug) alert ("document.all");        largeur = document.body.offsetWidth;        hauteur = document.body.offsetHeight;        charge  = true;        IsIE    = true;        tempoIE = 500;        if (navigator.appVersion.indexOf("Win") != -1)        {            ecartBordIE = 15; // le bord droit est hors du cadre        }                     // sur NS Windows !        else ecartBordIE = 0;        	    // desactivation des notes pour IE4 non Windows	    // Mais si IE5, on active...	    // le calcul de la hauteur de fenetre change aussi... :-(	    nomApplication = navigator.appVersion;	    nOccurrence = nomApplication.indexOf("MSIE 5", 0);	    if (navigator.platform != "Win32")	    {	        if (nOccurrence > 0) // IE5	        {	            charge  = true;	            hauteur = document.body.clientHeight; 	            IsIEMac = true;	        }	        else charge=false;	    }	    		if (nOccurrence > 0) IsOldIE=true;	    nOccurrence = nomApplication.indexOf("MSIE 6", 0);		if (nOccurrence > 0) IsOldIE=true;           }        // -------------------    // NS6 deb => Firefox    if (document.getElementById && !IsIE)    {        if (bDebug) alert ("isMozilla");        if (bDebug) alert ("document.body.clientHeight="+document.body.clientHeight);                IsMozilla   = true;        largeur = window.innerWidth;        hauteur = window.innerHeight;         charge  = true;                        // on identifie Safari 2 et on ne distingue pas Safari 3 et 4 et 5        var isSafariNavigateur = getNavigateur("saf");        if (isSafariNavigateur == "oui")        {              if (bDebug) alert ("safari");                        IsSaf = true;                    var isNewSafari = getNavigateur("nav");                        if (isNewSafari == "mozilla")            // if (navigator.appVersion.indexOf("Version/3", 0) > 0)            {                IsSaf = false;            }        }    }       // NS6 fin    // -------------------                if (navigator.appName == "Opera")    {        IsMozilla  = true;        IsIE   = false;    }    // Mise a plat de hauteur et largeur en 2007    getTailleFenetre();/*    if(document.getElementById)	{		divBandeauNord=document.getElementById("cartouche1"); // ATTENTION ICI CODE A METTRE A JOUR AOUT 2008		if (largeur<875)		{			divBandeauNord.style.visibility="hidden";		}		else		{			divBandeauNord.style.visibility="visible";		}	}*/	    if (bDebug) alert("largeur = " +largeur + " et hauteur = "+ hauteur);    // setInterval("re_init()", 4000);	var isNavigateurSafari=getNavigateur("saf");	if (isNavigateurSafari=="oui")	{		setInterval("ajusteCartouche()", 4000);	}    highlightPHDN();    // --------------------------------------    // le double click en dehors du body doit revenir en haut de la page, mais    // pas si on doubleclique sur le body    if (document.getElementById)    {
	        document.body.ondblclick = new Function ("document.location='#debutPage';");        // document.getElementById("blocprinc").ondblclick = new Function ("e", "e.stopPropagation();");        document.getElementById("blocprinc").ondblclick = new Function ("e", "stopVraiPropagation(e);");    }    //    // --------------------------------------}// ---------------------------------------// reload()// Teste si la page est dans le bon frame// top si boolself est true...  // pagecourante contient la reference// a la page qui *doit* etre dans top// ---------------------------------------function reload(pagecourante, boolSelf) {    // routeSiWorldnet();           	if (getParameter("debug") == "rien") return;       if (boolSelf)    {        if (top.location != self.location) top.location=pagecourante;    }    else    {        if (top.location == self.location) top.location=pagecourante;        }         init();    }// -----------------------------------------------------// Initialisation des reflexes onMouseOver et onMouseOut // de la Layer/note courante// Appele uniquement s'il y a un lien dans la note...//// nb layers: Netscape: document.layers.length//            IE:       document.all.tags('SPAN').length//// On aura note que le fonctionnement pour IE et NC n'est// pas tout a fait le meme...// Comme dirait un gourou unix de ma connaissance: // bestial... :-)// // -----------------------------------------------------function initReflexesNote(){    if (IsOldNetscape)    {        if (bDebug) alert("debug: initReflexesNote netscape");                document[refnum].onmouseover = new Function ("SignalerOnMouseOver();");        document[refnum].onmouseout  = new Function ("fermerNoteBrute();");    }        if (document.all)    {        if (bDebug) alert("debug: initReflexesNote IE");              document.all[refnum].onmouseover = new Function ("SignalerOnMouseOver();");        document.all[refnum].onmouseout  = new Function ("SignalerOnMouseOut();");    }    if (IsMozilla)    {          if (bDebug) alert("debug: initReflexesNote NS6");          document.getElementById(refnum).onmouseover = new Function ("SignalerOnMouseOver();");          document.getElementById(refnum).onmouseout  = new Function ("SignalerOnMouseOut();");     //     document.getElementById(refnum).onmouseout  = new Function ("fermerNoteBrute();");    }}function riendutout(){    // rien du tout!    // puissant, hein?}// ----------------------// La grosse fonction qui tue de positionnement// de la note dynamique// -----------------function ouvrirFenDyn(event, note, largeurFen){    if (charge)    {        ouvert = true;        refnum = note;                my_pageYOffset   = getDistanceParcourueY();        var tCoordonnees = getCoordonneesEvent(event);                abscisse = tCoordonnees[0];        ordonnee = tCoordonnees[1];         if (bDebug) alert ("abscisseGEN="+abscisse+" et ordonneeGEN="+ordonnee);                if (IsNew) // A FINIR!!!       	{            layerNote = document.getElementById(note);            // ---------------------------------            // gestion des grosses notes            myClass = layerNote.className;                        if (myClass == "notesmax-dyn")            {                if (abscisse>(largeur/2))                {                    layerNote.style.width = abscisse - 50 + "px";                } else                 {                    layerNote.style.width  = largeur - abscisse - 50 + "px";                }            }            // fin gestion des grosses notes            // ---------------------------------                        lHauteurNote=layerNote.offsetHeight;                       if (ordonnee>(hauteur/2)) // appel dans la partie inferieure de la fenetre            {                h = lHauteurNote+5 + eloignementVert; // note au dessus                diffH = ordonnee - h; 				  // pour gestion depassement vertical            }             else             {                h = -5 - eloignementVert;   // note en dessous                diffH = hauteur - ordonnee + 5 - lHauteurNote;            }                          // A FINIR => ORDONNEE POSE PB                     return;     	}                   // -------------------        // NS6 deb        if (IsMozilla)        {                    abscisse=event.clientX;             ordonnee=event.clientY; // ordonnee par rapport au haut *visible* de la fenetre                                    // pour le positionnement on rajoutera le pageYOffset                                    // qui mesure la distance de decalage due au deplacement                                    // par l'ascenceur            layerNote = document.getElementById(note);            if (bDebug) alert ("abscisse="+abscisse+" et ordonnee="+ordonnee);            // ---------------------------------            // gestion des grosses notes            myClass = layerNote.className;                        if (myClass == "notesmax-dyn")            {                if (abscisse>(largeur/2))                {                    layerNote.style.width = abscisse - 50 + "px";                } else                 {                    layerNote.style.width  = largeur - abscisse - 50 + "px";                }            }            // fin gestion des grosses notes            // ---------------------------------                        lHauteurNote=layerNote.offsetHeight;            if (bDebug) alert ("lHauteurNote="+lHauteurNote+" et pageYOffset="+my_pageYOffset);                        if (ordonnee>(hauteur/2)) // appel dans la partie infŽrieure de la fentre            {                // h = (document.getElementById(note).style.clip.height+5); // note au dessus                                h = (layerNote.offsetHeight+5) + eloignementVert; // note au dessus                diffH = ordonnee - h; // pour gestion dŽpassement vertical            }             else             {                h = -5 - eloignementVert;   // note en dessous                diffH = hauteur - ordonnee + 5 - layerNote.offsetHeight;            }                        // ----------------------------------------------            // gestion de Safari 2. Difference dans la definition de style.top (ou event.clientY ???)            if (IsSaf && my_pageYOffset>0)            {                if ( (ordonnee-my_pageYOffset)<(hauteur/2) ) // note en dessous                {                    h = -5 - eloignementVert;   // note en dessous                    diffH = hauteur - (ordonnee - my_pageYOffset) + 5 - layerNote.offsetHeight;                }                else                 {                    h = (layerNote.offsetHeight+5) + eloignementVert; // note au dessus                    diffH = ordonnee - my_pageYOffset - h; // pour gestion depassement vertical                                    }            }            // fin gestion de Safari 2            // -------------------------------------------                        var sommet = my_pageYOffset + ordonnee - h;                        // pageYOffset = decalage de la partie sup. gauche de la partie            //               visible de la page ˆ l'intŽrieur de la fenetre            largeurFen = layerNote.offsetWidth;            if (bDebug) alert ("lHauteurNote="+lHauteurNote+" et largeurFen="+largeurFen);                          if (abscisse>(largeur/2))            {                l = largeurFen + 10 ;            } else             {                l = -5;            }                             var cote_gauche = abscisse - l;                        // --------------------------------------            // Gestion du dŽpassement horizontal (cas Netscape 7)            // dŽpassement ˆ  gauche ou ˆ droite => on dŽcale            //            if (cote_gauche < 0) cote_gauche = 5;             if ( (cote_gauche+largeurFen) >  (largeur-15)) cote_gauche = largeur - largeurFen - 15;            //            // fin gestion dŽpassement horizontal            // -----------------------------------------            // --------------------------------------            // Gestion du depassement vertical            if (diffH-15 < 0) // note trop grande verticalement pour tre vue en entier            {                            if (bDebug) alert ("dŽpassement");                                cote_gauche = 0 + 5;                layerNote.style.width = largeur - 50+"px";                                // l'elargissement entraine un changement de hauteur a gerer si                // la note est au dessus....                                // On gere le cas Safari 2... pour lequel la condition de depassement est diffŽrente                // car la definition de ordonnee = event.clientY semble differente de Gecko                // Dans les deux cas de depassement le code conditionne est le meme car dans                // dans le cas de Safari, il y a un rattrapage plus bas                                if (!IsSaf && (ordonnee>(hauteur/2)) )                {                    h = (layerNote.offsetHeight+5) + eloignementVert;                    sommet = my_pageYOffset + ordonnee - h;                }                                if (IsSaf && ((ordonnee-my_pageYOffset)>(hauteur/2)) )                {                    h = (layerNote.offsetHeight+5) + eloignementVert;                    sommet = my_pageYOffset + ordonnee - h;                }            }            // fin gestion depassement vertical            // -----------------------------------------            // Pb avec Safari 2: style.top prend le dŽbut rŽel de la page et non le dŽbut affichŽ =>            // Il ne faut pas prendre pageYOffset, le dŽfilement, en compte            if (IsSaf) sommet = sommet - my_pageYOffset;            // fin Safari            if (bDebug) alert("sommet="+sommet+" et cote-gauche="+cote_gauche);                        layerNote.style.left       = cote_gauche +"px";            layerNote.style.top        = sommet +"px";            layerNote.style.visibility = "visible";        }        // NS6 fin        // -------------------            if (IsOldNetscape) // Netscape        {            if (bDebug) alert ("debug: ouvrirFenDyn IsOldNetscape");                    abscisse=event.pageX; //  abscisse=event.screenX;            ordonnee=event.pageY; //  ordonnee=event.screenY;                        layerNote = document[note];                        // ---------------------------------            // gestion des grosses notes            // PAS DE GESTION POSSIBLE POUR NETSCAPE 4!!!            // CAR LES LAYER NE SE RESIZENT PAS...            // => GERER PAR POSITIONNEMENT + INTELLIGENT                      // fin gestion des grosses notes            // ---------------------------------                        largeurFen = layerNote.clip.width;                        if (abscisse>(largeur/2))            {                l = largeurFen+5 ;                                // gestion grosse note => positionnement intelligent                // trop fort le mec!                if ( largeurFen > abscisse ) l = abscisse - 5;            }             else             {                l = -5;                                // gestion grosse note => positionnement intelligent                // trop fort le mec!                if ( (largeur-abscisse) < largeurFen) l = abscisse - largeur + largeurFen + 5;                          }                    // pageYOffset = decalage de la partie sup. gauche de la partie            //               visible de la page ˆ l'intŽrieur de la fenetre                                            if (ordonnee>my_pageYOffset + (hauteur/2))            {                h = (layerNote.clip.height+5) + eloignementVert; // note au dessus            } else             {                h = -5 - eloignementVert;   // note en dessous            }                       var cote_gauche = abscisse - l;            var sommet      = ordonnee - h;                   layerNote.left       = cote_gauche;            layerNote.top        = sommet;            layerNote.visibility = "show";        }                if (document.all) //IE        {            abscisse=event.clientX;            ordonnee=event.clientY;            if (bDebug) alert ("abscisse="+abscisse+" et ordonnee="+ordonnee);                     layerNote = document.all[note];                if (layerNote.offsetWidth> (largeur/2))            {                layerNote.style.width = ((largeur/2)-15);            }                    // ---------------------------------            // gestion des grosses notes            myClass = document.getElementById(note).className;            if (myClass == "notesmax-dyn")            {                if (abscisse>(largeur/2))                {                    layerNote.style.width = abscisse - 15;                } else                 {                    layerNote.style.width  = largeur - abscisse - 30 - ecartBordIE;                }            }            // fin gestion des grosses notes            // ---------------------------------            if (ordonnee>(hauteur/2))            {                h = (layerNote.offsetHeight+5) + eloignementVert;                diffH = ordonnee - h; // pour gestion dŽpassement vertical            } else             {                h = -5 - eloignementVert;                diffH = hauteur - ordonnee + 5 - layerNote.offsetHeight;            }           // var sommet = document.body.scrollTop  + ordonnee - h;            var sommet = my_pageYOffset + ordonnee - h;            if (abscisse>(largeur/2))            {                l = layerNote.offsetWidth+5 ;            } else             {                l = -10;            }                     var cote_gauche = document.body.scrollLeft + abscisse - l;             // --------------------------------------            // Gestion du dŽpassement vertical            if (diffH-15 < 0) // note trop grande verticalement pour tre vue ne entier            {                cote_gauche = 0 + 5;                layerNote.style.width = largeur - 15 - ecartBordIE +"px";                                // l'Žlargissement entra”ne un changement de hauteur ˆ gŽrer si                // la note est au dessus....                if (ordonnee>(hauteur/2))                {                    h = (layerNote.offsetHeight+5) + eloignementVert;                    // sommet = document.body.scrollTop  + ordonnee - h;                    sommet = my_pageYOffset + ordonnee - h;                }            }            // fin gestion dŽpassement vertical            // -----------------------------------------            layerNote.style.pixelTop   = sommet;            layerNote.style.pixelLeft  = cote_gauche;            layerNote.style.visibility = "visible";        }    }    else // affichettes non fonctionnelles    {        // rien du tout    }}function fermerNoteBrute(){    if (refnum && ouvert)    {        if (IsOldNetscape)        {            document[refnum].visibility = "hide";        }        if (document.all)        {            document.all[refnum].style.visibility = "hidden";        }                if (IsMozilla)        {            document.getElementById(refnum).style.visibility = "hidden";        }        ouvert    = false;        surLaNote = false;    }}// ---------------------------------------// fermeture de la note seulement si on // n'est pas sur la Layer note// ---------------------------------------function fermerNoteIntelligent(){    if (!surLaNote) // le test sur refnum et ouvert    {               // est dans fermerNoteBrute        fermerNoteBrute();    }}// ---------------------------------------// Appele par onMouseOver de la Layer note// ---------------------------------------function SignalerOnMouseOver(){    surLaNote = true; }// ---------------------------------------// Appele par onMouseOut de la Layer note// ---------------------------------------function SignalerOnMouseOut(){    surLaNote = false; }// ---------------------------------------// fermerNote()// Entree principale de fermeture de note// Fermeture selon tempo avec enclenchement// de la mecanique de detection d'entree// sortie de la layer// ---------------------------------------function fermerNote(boolFermerImmediat){    if (refnum && ouvert)    {        if (attente == 0 || boolFermerImmediat)        {               fermerNoteBrute();        }         else // cas d'une note contenant des liens: on doit             // pouvoir se positionner dessus...         {            initReflexesNote();            oldNote = refnum; 	        tempo = setTimeout("enfinFermerNote()", attente);	    }	}} // ---------------------------------------// enfinFermerNote()// Tentative de fermeture initiale si hors// de la layer, puis mecanique de detection// de sortie de la layer  // ---------------------------------------function enfinFermerNote(){    if (refnum == oldNote) // sinon on a ouvert une autre note avant l'Žcoulement de la seconde    {        fermerNoteIntelligent(); // ferme la note si on n'est pas dessus            if (ouvert)              // note non fermee => on est dessus         {            if (IsOldNetscape) document.captureEvents(Event.MOUSEMOVE); // bestial!            document.onmousemove = dedansDehors;        }   }}// ---------------------------------------// dedansDehors()// Ferme la note des que l'on sort de la // Layer note// ---------------------------------------function dedansDehors(e) {    if (IsInside(e) == false)    {        tempo = setTimeout("fermerNoteBrute()", tempoIE);    	if (IsOldNetscape)        {	       document.releaseEvents(Event.MOUSEMOVE);        }    	if (document.all)    	{	       document.onmousemove = null;    	}     	if (IsMozilla)    	{	       document.onmousemove = null;    	}     }} // ---------------------------------------// IsInside()// Informe si on est dans ou hors de la// Layer note  // Surtout utile pour IE5 Mac, mais utilise// pour IE5 systematiquement... En attendant de// tester l'aute mecanisme sur IE5 PC// ---------------------------------------function IsInside(e){    my_pageYOffset=getDistanceParcourueY();	if (IsOldNetscape)	{       wecy      = e.pageY;       wecx      = e.pageX;       layerNote = document[refnum];              som       = layerNote.top;       cote_gau  = layerNote.left;       larg      = layerNote.clip.right;       haut      = layerNote.clip.bottom;    }    	if (document.all)	{       wecy      = window.event.clientY + document.body.scrollTop;       wecx      = window.event.clientX + document.body.scrollLeft;       layerNote = document.all[refnum];              som       = layerNote.offsetTop;            cote_gau  = layerNote.offsetLeft;       larg      = layerNote.offsetWidth;       haut      = layerNote.offsetHeight;	}	if (IsMozilla)	{       wecy      = e.clientY + my_pageYOffset;       wecx      = e.clientX;       layerNote = document.getElementById(refnum);              som       = parseInt(layerNote.style.top);                   cote_gau  = layerNote.offsetLeft;       larg      = layerNote.offsetWidth;       haut      = layerNote.offsetHeight;	} 		// Et maintenant, Zeu formule of calcule top astucieuse    if((wecy>som && wecy<som+haut) && (wecx>cote_gau && wecx<cote_gau+larg)) 	{       surLaNote = true; 	   return true;	}	else 	{       surLaNote = false;	   return false;	}}function ouvrirNote(event, note){    if (refnum && ouvert) fermerNoteBrute();        if (document.getElementById)    {        myClass = document.getElementById(note).className;        if (myClass == "legende1")        {            eloignementVert = 15;        }        else eloignementVert = 0;    }        ouvrirFenDyn(event, note, 300);    attente = 1000;}function ouvrirCommentaire(event, note){    if (refnum && ouvert) fermerNoteBrute();    ouvrirFenDyn(event, note, 120);    attente = 0;}// --------------------------------------------------------------// --------------------------------------------------------------// --------------------------------------------------------------function getRealLeft(el) {    xPos   = el.offsetLeft;    tempEl = el.offsetParent;    while (tempEl != null)    {        xPos += tempEl.offsetLeft;        tempEl = tempEl.offsetParent;    }    return xPos;}xLeftLegende  = 100; // valeur moyenne crŽdible si on a oubliŽ "referenceLegende"wLargeurWidth = 100;bPasPasse     = true;bParLegende2  = false;bPasPasseIE   = true;function ouvrirlegende (note){     if (refnum && ouvert) fermerNoteBrute();    refnum = note;    layerNote = document.getElementById(note);        // 2007: suppression de ce code car obsolete avec nouvelle CSS à 600px/*  if (bPasPasseIE && IsIE && !IsIEMac) // Putain de d?passement ? droite sur IE6 Win!    if (0)    {        xPosition     = layerNote.offsetLeft + layerNote.offsetParent.offsetLeft;        wLargeurWidth = largeur - xPosition - 40 - ecartBordIE;        bPasPasseIE = false;    }    // 2007    // if (IsIE && !IsIEMac) layerNote.style.width = wLargeurWidth;*/ 	layerNote.style.visibility = "visible";}function ouvrirlegende2 (event, note){    layerNote = document.getElementById(note);    my_pageYOffset=getDistanceParcourueY();        if (bPasPasse)    {        layerReference = document.getElementById("referenceLegende");        if (layerReference != null)         {            xLeftLegende   = getRealLeft(layerReference);            bPasPasse      = false;                        if (IsIE && !IsIEMac) // bizarre offsetLeft sur IE5.5 win            {                xLeftLegende = layerReference.offsetLeft;            }        }    }        if (!document.all)     {        sommet = event.pageY - layerNote.offsetHeight - 25;    }    else    {           // sommet = event.clientY + document.body.scrollTop  - layerNote.offsetHeight - 23;        sommet = event.clientY + my_pageYOffset - layerNote.offsetHeight - 23;    }    layerNote.style.top = sommet+"px";    layerNote.style.left = xLeftLegende+"px"; // getRealLeft() d'un blockquote legende normal                                         // => style position asbolute avec left=0 au dŽpart    bParLegende2 = true;    ouvrirlegende(note);    bParLegende2 = false;}function fermerlegende (note){     layerNote = document.getElementById(note);    layerNote.style.visibility = "hidden";    ouvert = false;}function fermerlegende2 (note){     attente = 500;    ouvert = true;    refnum = note;    fermerNote(false);       attente = 0;}/* * This is the function that actually highlights a text string by * adding HTML tags before and after all occurrences of the search * term. You can pass your own tags if you'd like, or if the * highlightStartTag or highlightEndTag parameters are omitted or * are empty strings then the default <font> tags will be used. */  var tSeparateursLicites=[" ", ".", ",", ";", "Ê", "?", ":", "&", "<", ">", "s", unescape('%u2019'), unescape('%0A'), "'"];function doHighlight(bodyText, searchTerm, highlightStartTag, highlightEndTag) {  // the highlightStartTag and highlightEndTag parameters are optional  if ((!highlightStartTag) || (!highlightEndTag))   {    highlightStartTag = "<span class='eclaire'>";    highlightEndTag = "</span>";  }    // find all occurences of the search term in the given text,  // and add some "highlight" tags to them (we're not using a  // regular expression search, because we want to filter out  // matches that occur within HTML tags and script blocks, so  // we have to do a little extra validation)  var newText = "";  var i = -1;  var lcSearchTerm = searchTerm.toLowerCase();  var lcBodyText   = bodyText.toLowerCase();    var sepAvant  = "";  var sepApres  = "";  var longTerme = searchTerm.length;     while (bodyText.length > 0)   {        i = lcBodyText.indexOf(lcSearchTerm, i+1);        if (i < 0)     {        newText += bodyText;        bodyText = "";    }     else     {        // skip anything inside an HTML tag        if (bodyText.lastIndexOf(">", i) >= bodyText.lastIndexOf("<", i))        {                // skip anything inside a <script> block        if (lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("<script", i))         {                    sepAvant = lcBodyText.charAt(i-1);            sepApres = lcBodyText.charAt(i+longTerme);            // Recherche la chaine exacte            if ( (tSeparateursLicites.indexOf(sepAvant)>-1) && (tSeparateursLicites.indexOf(sepApres)>-1) )            {                newText += bodyText.substring(0, i) + highlightStartTag + bodyText.substr(i, searchTerm.length) + highlightEndTag;                          bodyText = bodyText.substr(i + searchTerm.length);                lcBodyText = bodyText.toLowerCase();                i = -1;            }        }      }    }  }    return newText;}// from http://www.nsftools.com/misc/SearchAndHighlight.htmvar tTermesExclus=["le", "la", "les", "du", "de", "des", "au", "aux", "un", "une"];/* * This is sort of a wrapper function to the doHighlight function. * It takes the searchText that you pass, optionally splits it into * separate words, and transforms the text on the current web page. * Only the "searchText" parameter is required; all other parameters * are optional and can be omitted. */function highlightSearchTerms(searchText, treatAsPhrase, warnOnFailure, highlightStartTag, highlightEndTag){  // if the treatAsPhrase parameter is true, then we should search for   // the entire phrase that was entered; otherwise, we will split the  // search string so that each word is searched for and highlighted  // individually  if (treatAsPhrase)   {    searchArray = [searchText];  }   else   {    searchArray = searchText.split(" ");  }    if (!document.body || typeof(document.body.innerHTML) == "undefined")   {    if (warnOnFailure)     {      alert("Sorry, for some reason the text of this page is unavailable. Searching will not work.");    }    return false;  }      var bodyText     = document.body.innerHTML;  var bProceder    = true;  var termeCourant = "";  for (var i = 0; i < searchArray.length; i++)   {    termeCourant=searchArray[i];    // alert("terme1 : "+termeCourant);    if (termeCourant.length == 1) continue;        if (tTermesExclus.indexOf(termeCourant) == -1)    {          bodyText = doHighlight(bodyText, termeCourant, highlightStartTag, highlightEndTag);    }  }    document.body.innerHTML = bodyText;  return true;}/* * This displays a dialog box that allows a user to enter their own * search terms to highlight on the page, and then passes the search * text or phrase to the highlightSearchTerms function. All parameters * are optional. */function searchPrompt(defaultText, treatAsPhrase, textColor, bgColor){  // This function prompts the user for any words that should  // be highlighted on this web page  if (!defaultText) {    defaultText = "";  }    // we can optionally use our own highlight tag values  if ((!textColor) || (!bgColor))   {    highlightStartTag = "";    highlightEndTag = "";  }   else   {    highlightStartTag = "<font style='color:" + textColor + "; background-color:" + bgColor + ";'>";    highlightEndTag = "</font>";  }    if (treatAsPhrase)   {    promptText = "Please enter the phrase you'd like to search for:";  }   else   {    promptText = "Please enter the words you'd like to search for, separated by spaces:";  }    searchText = prompt(promptText, defaultText);  if (!searchText)  {    alert("No search terms were entered. Exiting function.");    return false;  }    return highlightSearchTerms(searchText, treatAsPhrase, true, highlightStartTag, highlightEndTag);}/* * This function takes a referer/referrer string and parses it * to determine if it contains any search terms. If it does, the * search terms are passed to the highlightSearchTerms function * so they can be highlighted on the current page. */function highlightPHDNSearchTerms(referrer){  // This function has only been very lightly tested against  // typical Google search URLs. If you wanted the Google search  // terms to be automatically highlighted on a page, you could  // call the function in the onload event of your <body> tag,   // like this:  //   <body onload='highlightPHDNSearchTerms(document.referrer);'>    // http://search.atomz.com/search/?sp-q=MOT1+SEARCH2&x=0&y=0&sp-a=00051e06-sp00000000&sp-advanced=1&sp-p=all&sp-c=25&sp-m=1&sp-s=1    //var referrer = document.referrer;  if (!referrer)   {    return false;  }  //  var queryPrefix = "q=";  var queryPrefix = "sp-q=";    var startPos = referrer.toLowerCase().indexOf(queryPrefix);    if ((startPos < 0) || (startPos + queryPrefix.length == referrer.length))   {    return false;  }    var endPos = referrer.indexOf("&", startPos);    if (endPos < 0)   {    endPos = referrer.length;  }    var queryString = referrer.substring(startPos + queryPrefix.length, endPos);    // fix the space characters  queryString = queryString.replace(/%20/gi, " "); // espace  queryString = queryString.replace(/\+/gi, " ");  // plus  queryString = queryString.replace(/%27/gi, " "); // apostrophe  queryString = queryString.replace(/%22/gi, "¤"); // code du double quote - astuce...  var bIsPhrase = false;    if ( (queryString.charAt(0) == "\"") &&  (queryString.charAt(queryString.length-1) == "\"") )  {        bIsPhrase = true;  }  if ( (queryString.charAt(0) == "¤") &&  (queryString.charAt(queryString.length-1) == "¤") )  {        bIsPhrase = true;  }   // remove the quotes (if you're really creative, you could search for the  // terms within the quotes as phrases, and everything else as single terms)  queryString = queryString.replace(/%22/gi, "");  queryString = queryString.replace(/\"/gi, "");  queryString = queryString.replace(/¤/gi, "");     queryString=unescape(queryString); // pour tous les caractères %E2 etc. sinon, les accents, ca marche pas    return highlightSearchTerms(queryString, bIsPhrase);}/* * This function is just an easy way to test the highlightPHDNSearchTerms * function. */function testhighlightPHDNSearchTerms(){  var referrerString = "http://search.atomz.com/search/?sp-q=yeux+faurisson&x=0&y=0&sp-a=00051e06-sp00000000&sp-advanced=1&sp-p=all&sp-c=25&sp-m=1&sp-s=1";  referrerString = prompt("Test the following referrer string:", referrerString);  return highlightPHDNSearchTerms(referrerString);}function highlightPHDN(){		var pageHost     = window.location.host;    var pageReferrer = document.referrer;        if ( (pageReferrer.indexOf("search.atomz.com") != -1) && (pageHost.indexOf("phdn.org") != -1) )    {        highlightPHDNSearchTerms(pageReferrer);				var isMSIE = getNavigateur("msie");		if (isMSIE == "non")		{            var leBoutton = document.getElementById("boutton_highlight");            leBoutton.style.visibility  = "visible";        }    }        /*        var isOldIE = getNavigateur("nav");	if (isOldIE == "oldIE")	{		var cargauche =document.getElementById("cartouche-gauche");		var lelogop   =document.getElementById("lelogo");				cargauche.style.border="1px solid red";		lelogop.style.border="1px solid green";	}*/}// ----------------------------------------------------------// ----------------------------------------------------------// ----------------------------------------------------------//Custom JavaScript Functions by Shawn Olson//Copyright 2006-2008//http://www.shawnolson.net//If you copy any functions from this page into your scripts, you must provide credit to Shawn Olson & http://www.shawnolson.net//*******************************************// Code complete et amende par Gilles Karmasyn 2009-2010function stripCharacter(words,character) {	//documentation for this script at http://www.shawnolson.net/a/499/	var spaces = words.length;		for(var x = 1; x<spaces; ++x)    {	   words = words.replace(character, "");	}		return words;}teststyle.bVavient=1;function teststyle(){    if (teststyle.bVavient)    {		changecss("SPAN.testspan", "border", "1px solid red");        changecss("SPAN.testspan", "backgroundColor", "yellow");		/*        changecss("span.eclaire", "backgroundColor", "transparent");        changecss("span.eclaire", "fontWeight", "inherit");        changecss("span.eclaire", "color", "inherit");*/       teststyle.bVavient=0;    }    else    {		changecss("SPAN.testspan", "border", "none");        changecss("SPAN.testspan", "backgroundColor", "transparent");/*        changecss("span.eclaire", "backgroundColor", "yellow");        changecss("span.eclaire", "fontWeight", "bold");        changecss("span.eclaire", "color", "black");*/        toggleHighlight.bEclaire=1;    }}function changecss(theClass, element, value) {	var bDebugIE=false;	if ( getParameter("debug")=="b" ) bDebugIE=true;	if (bDebugIE) alert("Traite "+element);    //Last Updated on May 21, 2008	//documentation for this script at	//http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html		var crossRules; 	if (document.all) 	{        crossRules = 'rules';	}	else if (document.getElementById) 	{        crossRules= 'cssRules';	}	var added = false;		var lStyleSheetsNombre = document.styleSheets.length;	// var lStyleSheetsNombre = 1;	var lStyleSheetsRules  = 0;	var rReglesCourantes;    var laRegleCourante;    		for (var S = 0; S < lStyleSheetsNombre; S++)	{		laRegleEnCours = document.styleSheets[S];		hrefLaRegle    = laRegleEnCours.href;			// GIK 2010		// ATTENTION IMPORTANT POUR EVITER LES CSS EXTERNES QUI GENERENT UNE ERREUR		if (!hrefLaRegle) continue;		if (hrefLaRegle.indexOf("phdn.org") == -1) continue;	    	    	    try 	    {	       rReglesCourantes = document.styleSheets[S][crossRules];	    }	    catch(err)	    {	       break;	    }	    	    lStyleSheetsRules  = rReglesCourantes.length;	    	            for (var R = 0; R < lStyleSheetsRules; R++)         {                   laRegleCourante = rReglesCourantes[R];           	       if (laRegleCourante.selectorText == theClass) 	       {		       if (bDebugIE) alert("Feuille "+S+", Regle "+R+", Classe trouvee: " + theClass);               	           if(laRegleCourante.style[element])	           {	               laRegleCourante.style[element] = value;	               added=true;		       		       	   if (bDebugIE) alert("MODIF REGLE " + element);		           break;	           }	       }	    }        if(!added)	    {			if (bDebugIE) alert("Feuille "+S+", Regle "+R+", Classe trouvee: " + theClass);            var laFeuilledeStyle = document.styleSheets[S];            if(laFeuilledeStyle.insertRule)            {                laFeuilledeStyle.insertRule(theClass+' { '+element+': '+value+'; }', laFeuilledeStyle[crossRules].length);								if (bDebugIE) alert("AJOUT REGLE insert " + element);		    } 		    else if (laFeuilledeStyle.addRule) 		    {				laFeuilledeStyle.addRule(theClass,element+': '+value+';');								if (bDebugIE) alert("AJOUT REGLE add " + element);		    }	    }	}}function swapMS(){    crossRules = (document.styleSheets[0].cssRules)?document.styleSheets[0].cssRules:document.styleSheets[0].rules;    var i = 0;    while(crossRules[i])    {        if (crossRules[i].selectorText=='span.eclaire')        {            if(crossRules[i].style.backgroundColor=='yellow')            {                crossRules[i].style.backgroundColor='transparent';                crossRules[i].style.fontWeight="normal";            }            else            {                crossRules[i].style.backgroundColor='yellow';                crossRules[i].style.fontWeight="bold";            }        }                i++;    }}toggleHighlight.bEclaire=1;function toggleHighlight(){    if (toggleHighlight.bEclaire)    {        changecss("span.eclaire", "backgroundColor", "transparent");        changecss("span.eclaire", "fontWeight", "inherit");        changecss("span.eclaire", "color", "inherit");        try {            document.getElementById("myButtonHL").value="Highlight On";        }        catch(err)	    {	       // break;	    }        toggleHighlight.bEclaire=0;    }    else    {        changecss("span.eclaire", "backgroundColor", "yellow");        changecss("span.eclaire", "fontWeight", "bold");        changecss("span.eclaire", "color", "black");        try {            document.getElementById("myButtonHL").value="Highlight Off";        }        catch(err)	    {	       // break;	    }        toggleHighlight.bEclaire=1;    }}    /*changecss('.eclaire','color','red')*/    function checkUncheckAll(theElement) {    var theForm = theElement.form, z = 0;    for(z=0; z<theForm.length;z++)    {        if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall')        {            theForm[z].checked = theElement.checked;        }    }}function checkUncheckSome(controller, theElements) {	//Programmed by Shawn Olson	//Copyright (c) 2006-2007	//Updated on August 12, 2007	//Permission to use this function provided that it always includes this credit text	//  http://www.shawnolson.net	//Find more JavaScripts at http://www.shawnolson.net/topics/Javascript/	//theElements is an array of objects designated as a comma separated list of their IDs	//If an element in theElements is not a checkbox, then it is assumed	//that the function is recursive for that object and will check/uncheck	//all checkboxes contained in that element    var formElements = theElements.split(',');    var theController = document.getElementById(controller);        for(var z=0; z<formElements.length;z++)    {        theItem = document.getElementById(formElements[z]);        if(theItem.type)        {	       if (theItem.type=='checkbox') 	       {                theItem.checked=theController.checked;           }        }        else        {            theInputs = theItem.getElementsByTagName('input');                        for(var y=0; y<theInputs.length; y++)            {                if(theInputs[y].type == 'checkbox' && theInputs[y].id != theController.id)                {                    theInputs[y].checked = theController.checked;                }            }        }            } // for z}function changeImgSize(objectId, newWidth, newHeight){	  imgString = 'theImg = document.getElementById("'+objectId+'")';	  eval(imgString);	  oldWidth = theImg.width;	  oldHeight = theImg.height;	  if(newWidth>0){	   theImg.width = newWidth;	  }	  if(newHeight>0){	   theImg.height = newHeight;	  }	}	function changeColor(theObj,newColor){	  eval('var theObject = document.getElementById("'+theObj+'")');	  if(theObject.style.backgroundColor==null){theBG='white';}else{theBG=theObject.style.backgroundColor;}	  if(theObject.style.color==null){theColor='black';}else{theColor=theObject.style.color;}	  //alert(theObject.style.color+' '+theObject.style.backgroundColor);      switch(theColor){	    case newColor:		  switch(theBG){			case 'white':		      theObject.style.color = 'black';		    break;			case 'black':			  theObject.style.color = 'white';			  break;			default:			  theObject.style.color = 'black';			  break;		  }		  break;	    default:		  theObject.style.color = newColor;		  break;	  }}// ----------------------------------------------------------// ----------------------------------------------------------// ----------------------------------------------------------
