/** Paramétrage **/
var SCROLL_PERMANANT_START = 1; // lancer le scroll au démarage ?
var SCROLL_PERMANANT_D = -1; // nombre de pixels entre chaque pas pour le scroll permanent
var SCROLL_PERMANANT_T = 40; // nombre de millisecondes entre chaque pas pour le scroll permanent
var SCROLL_POS = 0; // position initiale du div
var SCROLL_POS_MIN = 0;
var SCROLL_POS_MAX = -4641; // position à droite à partir de laquelle on réinitialise : nbre_photos * 63,5 (pour miniature en )
var SCROLL_D = 2;
var SCROLL_T = 5;
/** Fin paramétrage **/
var SCROLL_PERMANANT = SCROLL_PERMANANT_START;
var SCROLL_PERMANANT_TIMEOUT;
var SCROLL_LEFT_TIMEOUT;
var SCROLL_RIGHT_TIMEOUT;
function scrollBoucle() {
if ( SCROLL_POS < SCROLL_POS_MAX )
    SCROLL_POS = 0;
else if ( SCROLL_POS > SCROLL_POS_MIN )
    SCROLL_POS = SCROLL_POS_MAX;
}
function scrollMove() {
var div = document.getElementById("scroll-conteneur");
if ( div )     div.style.left = SCROLL_POS + "px";
}
function scrollPermanant() {
SCROLL_POS += SCROLL_PERMANANT_D;
scrollBoucle();
scrollMove();
SCROLL_PERMANANT_TIMEOUT = setTimeout("scrollPermanant()",SCROLL_PERMANANT_T);
}
function scrollL()
{
if ( SCROLL_PERMANANT == 1 ) {
    clearTimeout(SCROLL_PERMANANT_TIMEOUT);
    SCROLL_PERMANANT = 0;
}
SCROLL_POS -= SCROLL_D;
scrollBoucle();
scrollMove();
SCROLL_LEFT_TIMEOUT = setTimeout("scrollL()",SCROLL_T);
}
function scrollR()
{
if ( SCROLL_PERMANANT == 1 ) {
    clearTimeout(SCROLL_PERMANANT_TIMEOUT);
    SCROLL_PERMANANT = 0;
}
SCROLL_POS += SCROLL_D;
scrollBoucle();
scrollMove();
SCROLL_RIGHT_TIMEOUT = setTimeout("scrollR()",SCROLL_T);
}
function stopScroll()
{
clearTimeout(SCROLL_LEFT_TIMEOUT);
clearTimeout(SCROLL_RIGHT_TIMEOUT);
if ( SCROLL_PERMANANT_START == 1 && SCROLL_PERMANANT == 0) {
    scrollPermanant();
    SCROLL_PERMANANT = 1;
}
}
if ( SCROLL_PERMANANT_START == 1 ) {
window.onload = scrollPermanant;
}

function open_chat_tous(){
 var dial_width = window.screen.availWidth; 
 if(dial_width>1024){dial_width=1024;}
 var dial_height = window.screen.availHeight-40; 
 if(dial_height>728){dial_height=728;}
 var dial_left = (screen.width-dial_width)/2; 
 var dial_top = (screen.height-dial_height)/2;
 var dial_params = 'top='+dial_top+',left='+dial_left+',width='+dial_width+',height='+dial_height+',resizable=1';
 window.open('http://www.mes-dialogues.net/chat/index.php?dial=soft&player=1&auto=1&ids=10000','_blank', dial_params);
}


function makevisibleongletsmcg(cur,which){
                if (which==0) cur.filters.alpha.opacity=100
                else cur.filters.alpha.opacity=60 }

function apparition(idname)
        {
           if(document.getElementById)  document.getElementById(idname).style.display = 'block';
        }  
        
