		/*$(document).ready(function() {
			recupchat();
		});

		function recupchat() {
			$.ajax({
				type: "GET",
				url: "http://www.regimedukan.com/typo3conf/ext/oxcs_chatviewer/class.user_tx_oxcschatviewer.php",
				dataType: 'xml',
				async: 1,
				error:function(msg){
					alert( "Error !: " + msg );
				},
				success:function(xml){
					var chaine = "";
					ladate = $('transcript transcriptInfo datetime',xml).text();
					jour = ladate.substr(8,2);
					mois = ladate.substr(5,2);
					annee = ladate.substr(0,4);
					ladate = jour+'/'+mois+'/'+annee;
					$("span[id=date_chat]").html(ladate);
					i=1;
					$('transcript item',xml).each(function(){
						auteur = $("author",this).text();
						if (auteur.toLowerCase() == 'pierredukan')

							auteur = '<img src = "http://www.regimedukan.com/img/pierre-chat-home.gif" alt="P. Dukan" title="P. Dukan" width="25px" height="33px" />';
						else if (auteur.toLowerCase() == 'vahinee')
							auteur = '<img src = "http://www.regimedukan.com/img/vahinee_PF_260408.jpg" alt="Vahinee" title="Vahinee" width="25px" height="33px" />';
						else if (auteur.toLowerCase() == 'carole'  )

							auteur = '<img src = "http://www.regimedukan.com/img/carole_PF_260408.jpg" alt="Carole" title="Carole" width="25px" height="33px" />';
						else if (auteur.toLowerCase() == 'moderateur' || auteur.toLowerCase() == 'moderateur_2')
							auteur = '<img src = "http://www.regimedukan.com/img/default.png" alt="'+auteur+'" title="'+auteur+'" width="25px" height="33px" />';
						else
							//auteur = '<img src = "http://www.regimedukan.com/img/default.png" alt="'+auteur+'" title="'+auteur+'" width="21px" height="28px" />';
							auteur = '<img src = "http://www.regimedukan.com/img/default.png" alt="" title="" width="25px" height="33px" />';
						
						chaine+="<div class='"+$("type_author",this).text()+"'>"+auteur+" : "+$("text",this).text()+"</div>";
						if (i == 1) i=2;
						else i=1;
					} // fin each
					);
					$("div[id=chatdujour]").html(chaine);
					
			}});
		} // fin recupchat
		*/
      function initScroll(EltId, increment, timer, direction, ismouseover) {
         direction = direction.toLowerCase();
         var BlockScroll = document.getElementById(EltId); //On recupere l'element
         //On rajoute les attributs dans l'�l�ment, �a �vite de se les trimballer � chaque fois
         BlockScroll.increment = increment;
         BlockScroll.timer = timer;
         BlockScroll.direction = direction;
         if (direction=="bt" || direction=="tb") { //direction verticale
            var FirstDiv = BlockScroll.insertBefore(document.createElement("div"), BlockScroll.firstChild); //On cree un DIV au debut du bloc
            var LastDiv = BlockScroll.appendChild(document.createElement("div")); //on cree un div � la fin du bloc
           // FirstDiv.style.height = BlockScroll.clientHeight+"px"; //On dimensionne le premier div de la hauteur du bloc
           // LastDiv.style.height = BlockScroll.clientHeight+"px"; //idem pour le dernier div
         }
         if (direction=="lr" || direction=="rl") { //direction horizontale
            BlockScroll.style.paddingLeft=BlockScroll.clientWidth;
            BlockScroll.style.paddingRight=BlockScroll.clientWidth;
            BlockScroll.style.whiteSpace="nowrap"; //On vire le retour charriot afin de pr�senter le texte sur une seule ligne
          }
       //Rajout des �v�nement sur le block
       if (ismouseover) {
          BlockScroll.onmouseover = function() { //Arr�te le d�filement lors du passage de la souris
             this.backupincrement = this.increment;
             this.increment=0;
          }
          BlockScroll.onmouseout = function() {
             this.increment=this.backupincrement;
          }
       }
       eval('var '+EltId+'Timer = setInterval("scrollElement(\'"+ EltId + "\')",timer);'); //On lance la fonction qui va initialiser le scroll
       
       
       
       }
       function scrollElement(eltId) {
       
          var BlockScroll = document.getElementById(eltId);
          with (BlockScroll) {

             switch(direction) {
                 case "bt":
                    scrollTop += increment;
                    if (scrollTop+clientHeight>=scrollHeight) { scrollTop=0};
                    break;
                 case "tb":
                    scrollTop -= increment;
                    if (scrollTop<=increment) { scrollTop=scrollHeight};
                    break;
                 case "rl": 
                    scrollLeft += increment;
                    if (scrollLeft+clientWidth>=scrollWidth) scrollLeft=0;
                    break;
                 case "lr": 
                    scrollLeft -= increment;
                    if (scrollLeft<increment) scrollLeft=scrollWidth;
                    break;
             }
          }
       }
    
       window.onload=function() {
         initScroll("chatdujour", 1, 50, "bt", true);
       }
