function rotation_bannieres_flash()
{
code_html = '<a href="'+liens_flash[chiffre_flash]+'"><img border="0" src="'+pictures_flash[chiffre_flash]+'"></a>';
document.getElementById("zone_bannieres_flash").innerHTML = code_html;
	if(chiffre_flash == longueur_flash)
        { chiffre_flash = 0; }
        else
        { chiffre_flash++; }
	changement = 1;
//durée d'affichage d'une bannière en secondes
	window.setTimeout("rotation_bannieres_flash()", (changement*4500));

}

function validation_formulaire(chaine)
{

	tab=chaine.split('+');

	ajax_traitement(tab[0],'ajax_inscription.php','&bool_new_site=1&nom_article='+tab[1]+'&inscription=1','zone_active','','');
}

function rotation_bannieres(chiffre_passe)
{
	if (chiffre_passe != -1)
		chiffre=(chiffre_passe%4)+1;

code_html = '<a href="'+liens[chiffre]+'"><img border="0" src="'+pictures[chiffre]+'"></a>';
document.getElementById("zone_bannieres").innerHTML = code_html;
	if(chiffre == longueur)
        { chiffre = 0; }
        else
        { chiffre++; }
	changement = 1;
//durée d'affichage d'une bannière en secondes
if ( chiffre == 2)
	window.setTimeout("rotation_bannieres(-1)", (changement*6000));
else
	window.setTimeout("rotation_bannieres(-1)", (changement*4500));

}

function rotation_bannieres_thematiques()
{
code_html = '<img border="0" src="'+pictures_thematiques[chiffre]+'">';
document.getElementById("zone_bannieres_thematiques").innerHTML = code_html;
	if(chiffre == longueur_thematiques)
        { chiffre = 0; }
        else
        { chiffre++; }
	changement = 1;
//durée d'affichage d'une bannière en secondes
window.setTimeout("rotation_bannieres_thematiques()", (changement*3500));
}


/*
http://www.espacejavascript.com
*/
pictures_flash = new Array()
pictures_flash[0] = 'images/INFRA_PROD_03-1010.gif';
pictures_flash[1] = 'images/ITIFORUMS_VIRT_SERV.gif';
longueur_flash = pictures_flash.length-1;

pictures = new Array()
pictures[2] = 'images/image_accueil_1.png';
pictures[3] = 'images/image_accueil_6.png';
pictures[0] = 'images/Bannieres_thematique_3_convention-2.jpeg';
pictures[1] = 'images/Bannieres_thematique_01_10_b-4.png';
longueur = pictures.length-1;

pictures_thematiques = new Array()
pictures_thematiques[0] = 'images/Bannieres_thematique_B1.jpg';
pictures_thematiques[1] = 'images/Bannieres_thematique_B2.jpg';
pictures_thematiques[2] = 'images/Bannieres_thematique_B3.jpg';
longueur_thematiques = pictures_thematiques.length-1;

liens = new Array()
liens[0] = 'http://www.itiforums.com/accueil.php?choix=CONFERENCES&nom_article=CONFERENCE_17062010&acces_programme_17062010=1';
liens[1] = 'http://www.itiforums.com/accueil.php?choix=CONFERENCES&nom_article=PRESENTATION_DES_CRIP_THEMATIQUES';
liens[2] = 'http://www.itiforums.com/accueil.php';
liens[3] = 'http://www.itiforums.com/accueil.php?choix=RECHERCHE';
chiffre = 0;

liens_flash = new Array()
liens_flash[0] = 'http://www.itiforums.com/accueil.php?choix=CONFERENCES&nom_article=CONFERENCE_17062010';
liens_flash[1] = 'http://www.itiforums.com/accueil.php?choix=CONFERENCES&nom_article=CONFERENCE_19052010';
chiffre_flash = 0;

function afficher_flottant(element)
{
document.getElementById(element).style.display = 'block';
}
function cacher_flottant(element)
{
document.getElementById(element).style.display = 'none';
}
function choix_actif(element)
{
document.getElementById(element).className = 'menu_navigation_actif';
}
function choix_actif_important(element)
{
document.getElementById(element).className = 'menu_navigation_actif_important';
}
function choix_inactif(element)
{
document.getElementById(element).className = 'menu_navigation_inactif';
}
function choix_inactif_case(element)
{
document.getElementById(element).className = 'menu_navigation_inactif_case';
}
function choix_inactif_case_important(element)
{
document.getElementById(element).className = 'menu_navigation_inactif_case_important';
}

function DF_ObjetDefilant(id,larg_d,mode,sens,vit,pos,b_esp,pause)
{
        
        this.DF_ObjetParam = typeof this.DF_ObjetParam == 'undefined' ? new Array() : this.DF_ObjetParam;       
        this.DF_ObjetParam[id] = typeof this.DF_ObjetParam[id] == 'undefined' ? new Array() : this.DF_ObjetParam[id];   
        
        if(typeof this.DF_ObjetParam[id]['id_defile'] == 'undefined') Set_param (id,larg_d,mode,sens,vit,pos,b_esp,pause);
        
        if (this.DF_ObjetParam[id]['largeur_def'] > 0 && this.DF_ObjetParam[id]['largeur_cadre'] > 0)
        {
                if (this.DF_ObjetParam[id]['mode'] == 'r') Boucle_ar(id); else Boucle_cont(id);
         
                this.DF_ObjetParam[id]['Timer'] = setTimeout(function(){DF_ObjetDefilant(id)},this.DF_ObjetParam[id]['delaicrnt']);     
        }
        
        


        function Set_param (id,larg_d,mode,sens,vit,pos,b_esp,pause) 
        {
        
        var id_d = null;
        var id_c = null;
        
        if(!(id_d = document.getElementById(id)))  id_d = null; else if(!(id_c = document.getElementById(id_d.parentNode.id))) id_c = null;
        
        
        if(id_c != null && id_d != null && id_d.hasChildNodes())
        
                {
                        id_c.style.position = "relative";
                        
                        id_c.style.overflow = "hidden";
                                        
        
                        id_d.style.position = "absolute";
                        
                        id_d.width = "auto";
                        
                                
                        this.DF_ObjetParam[id]['largeur_def'] = id_d.offsetWidth;
                                
                        var div_defile = id_d.cloneNode(true);  
                        
                        var nb_noeud = id_c.childNodes.length;
                                                        
                        for (var i = 0; i < nb_noeud ; i++) id_c.removeChild(id_c.firstChild);
                        
                        
                        var largeur_cadre = document.createElement("div");
                        
                        id_c.appendChild(largeur_cadre);        
                        
                        this.DF_ObjetParam[id]['largeur_cadre'] = largeur_cadre.offsetWidth;
                        
                        id_c.removeChild(id_c.firstChild);
                        
                
                        id_c.appendChild(div_defile);
        
        
                        this.DF_ObjetParam[id]['id_defile'] =   document.getElementById(id);
                        
                
                        this.DF_ObjetParam[id]['largeur_def'] = larg_d == 'auto' ? this.DF_ObjetParam[id]['largeur_def'] : parseInt(larg_d);
                        
                        this.DF_ObjetParam[id]['id_defile'].style.width = this.DF_ObjetParam[id]['largeur_def']+'px';                   
                        
                        this.DF_ObjetParam[id]['mode'] = typeof mode != 'undefined' && (mode == 'r' || mode == 'b') ? mode : 'b';
                        
                        this.DF_ObjetParam[id]['sens_ini'] = typeof sens != 'undefined' && (sens == 'g' || sens == 'd') ? sens : 'g';
                        
                        this.DF_ObjetParam[id]['vitesse'] = typeof vit != 'undefined' && parseInt(vit) > 0 ? parseInt(vit) : 20;
                
                        this.DF_ObjetParam[id]['psinit'] = typeof pos != 'undefined' && parseFloat(pos) > 0 ? parseFloat(pos) : 0;
                        
                        this.DF_ObjetParam[id]['b_esp'] = typeof b_esp != 'undefined' && parseFloat(b_esp) > 0 ? parseFloat(b_esp) : 0;         
                        
                        this.DF_ObjetParam[id]['pause'] = typeof pause != 'undefined' && parseInt(pause) > 0 ? parseInt(pause) : 0;
                        
                        
                
                        this.DF_ObjetParam[id]['b_esp'] = this.DF_ObjetParam[id]['b_esp'] < 0  || this.DF_ObjetParam[id]['b_esp'] > 100 ? 0 : Math.ceil(this.DF_ObjetParam[id]['b_esp'] * this.DF_ObjetParam[id]['largeur_cadre']/100);
                        
                
                        this.DF_ObjetParam[id]['psinit'] = this.DF_ObjetParam[id]['psinit'] == 100 || this.DF_ObjetParam[id]['psinit'] < 0 || this.DF_ObjetParam[id]['psinit'] > 100 ? this.DF_ObjetParam[id]['largeur_cadre'] : Math.ceil(this.DF_ObjetParam[id]['psinit']*this.DF_ObjetParam[id]['largeur_cadre']/100);               
                        
                        this.DF_ObjetParam[id]['psinit'] = (this.DF_ObjetParam[id]['largeur_cadre'] > this.DF_ObjetParam[id]['largeur_def'] &&  this.DF_ObjetParam[id]['psinit'] == 0 ) ? this.DF_ObjetParam[id]['largeur_cadre'] - this.DF_ObjetParam[id]['largeur_def'] : this.DF_ObjetParam[id]['psinit'];
                        
                        
                        this.DF_ObjetParam[id]['pscrnt'] = this.DF_ObjetParam[id]['psinit'];
                        
                        this.DF_ObjetParam[id]['sens'] = 1;
                
                
                        this.DF_ObjetParam[id]['p_retour'] = this.DF_ObjetParam[id]['largeur_def'] >= this.DF_ObjetParam[id]['largeur_cadre'] ? this.DF_ObjetParam[id]['largeur_def'] - this.DF_ObjetParam[id]['largeur_cadre'] : 0;
                        
                        
                        this.DF_ObjetParam[id]['largeur_def'] += this.DF_ObjetParam[id]['b_esp'];                                               
                                                                        
                
                        this.DF_ObjetParam[id]['p_retour'] = this.DF_ObjetParam[id]['mode'] == 'b' ? this.DF_ObjetParam[id]['largeur_def'] : this.DF_ObjetParam[id]['p_retour'];
                        
                
                        if (this.DF_ObjetParam[id]['mode'] == 'r' && this.DF_ObjetParam[id]['largeur_def'] == this.DF_ObjetParam[id]['largeur_cadre'] && this.DF_ObjetParam[id]['psinit'] == 0) this.DF_ObjetParam[id]['largeur_def'] = 0;
                
                                
                        if (this.DF_ObjetParam[id]['largeur_def'] > 0 && this.DF_ObjetParam[id]['mode'] == 'b') Ajout_clone(id);
                        
                        id_c.style.visibility = "visible";
                        
                }
        }




        function Ajout_clone(id) 
        {               
        
                           var div_contenu = document.createElement("div");
                
                           var nb_noeud = this.DF_ObjetParam[id]['id_defile'].childNodes.length;
                 
                           for (var i = 0; i < nb_noeud ; i++) 
                           
                                   {                               
                                        div_contenu.appendChild(this.DF_ObjetParam[id]['id_defile'].firstChild.cloneNode(true));
                                        this.DF_ObjetParam[id]['id_defile'].removeChild(this.DF_ObjetParam[id]['id_defile'].firstChild);
                                   }
                           
                           
                           if (this.DF_ObjetParam[id]['b_esp'] > 0)
                           
                                   {       
                                        this.DF_ObjetParam[id]['sens_ini'] == 'g' ? div_contenu.style.marginRight = this.DF_ObjetParam[id]['b_esp']+'px' : div_contenu.style.marginLeft = this.DF_ObjetParam[id]['b_esp']+'px';   
                                   }
                                                
                           div_contenu.style.display = "inline";
                                   
                           this.DF_ObjetParam[id]['id_defile'].appendChild(div_contenu.cloneNode(true));
                                                        
                           var nb_clone = Math.ceil(this.DF_ObjetParam[id]['largeur_cadre']/(this.DF_ObjetParam[id]['largeur_def']));   
                                   
                           this.DF_ObjetParam[id]['id_defile'].style.width = ((nb_clone+1) * this.DF_ObjetParam[id]['largeur_def'])+'px';
                           
                           for (var j = 0; j < nb_clone ; j++)
                           
                                   {     
                                        this.DF_ObjetParam[id]['id_defile'].appendChild(this.DF_ObjetParam[id]['id_defile'].firstChild.cloneNode(true));    
                                   }
        }




        function Boucle_cont(id)
        {
                this.DF_ObjetParam[id]['delaicrnt'] = this.DF_ObjetParam[id]['vitesse'];
                this.DF_ObjetParam[id]['inverse'] = 1;
        
        
                if(this.DF_ObjetParam[id]['pscrnt'] == - this.DF_ObjetParam[id]['p_retour'])
                                
                                {                                       
                                this.DF_ObjetParam[id]['id_defile'].appendChild(this.DF_ObjetParam[id]['id_defile'].firstChild.cloneNode(true));  
                                this.DF_ObjetParam[id]['id_defile'].removeChild(this.DF_ObjetParam[id]['id_defile'].firstChild); 
                                 
                                this.DF_ObjetParam[id]['inverse'] = -1;
                                        
                                this.DF_ObjetParam[id]['pscrnt'] = 0;
                                
                                this.DF_ObjetParam[id]['sens'] = -1;            
                                }
                                
                                else
                                
                                {
                                if(this.DF_ObjetParam[id]['pscrnt'] == this.DF_ObjetParam[id]['psinit'])
                
                                        {
                                        this.DF_ObjetParam[id]['sens'] *= -1;
                                        this.DF_ObjetParam[id]['delaicrnt'] = this.DF_ObjetParam[id]['pause']; 
                                        }
                                }
                                
                
                         this.DF_ObjetParam[id]['sens_ini'] == 'g' ? this.DF_ObjetParam[id]['id_defile'].style.left = this.DF_ObjetParam[id]['pscrnt']+"px" : this.DF_ObjetParam[id]['id_defile'].style.right = this.DF_ObjetParam[id]['pscrnt']+"px" ;
                         
                        this.DF_ObjetParam[id]['pscrnt'] += this.DF_ObjetParam[id]['sens']; 
        
        }
        
        
        
        
function Boucle_ar (id) 
        {
                this.DF_ObjetParam[id]['delaicrnt'] = this.DF_ObjetParam[id]['vitesse'];
                this.DF_ObjetParam[id]['inverse'] = 1;
                
                if(this.DF_ObjetParam[id]['pscrnt']  == - this.DF_ObjetParam[id]['p_retour'] || this.DF_ObjetParam[id]['pscrnt'] == this.DF_ObjetParam[id]['psinit'])
                        {
                        this.DF_ObjetParam[id]['inverse'] = -1;
                        this.DF_ObjetParam[id]['delaicrnt'] = this.DF_ObjetParam[id]['pause']; 
                        this.DF_ObjetParam[id]['sens'] *= -1;
                        } 
                        
                this.DF_ObjetParam[id]['sens_ini'] == 'g' ? this.DF_ObjetParam[id]['id_defile'].style.left = this.DF_ObjetParam[id]['pscrnt']+"px" : this.DF_ObjetParam[id]['id_defile'].style.right = this.DF_ObjetParam[id]['pscrnt']+"px" ;
                
                this.DF_ObjetParam[id]['pscrnt'] += this.DF_ObjetParam[id]['sens']; 
        }

}




function DF_ObjetNavigMous(id,etat) 
{
        if(typeof this.DF_ObjetParam != 'undefined' && typeof this.DF_ObjetParam[id] != 'undefined' && this.DF_ObjetParam[id]['id_defile'] != null && typeof this.DF_ObjetParam[id]['Timer'] == 'number') 
                {
                clearTimeout(this.DF_ObjetParam[id]['Timer']);
               this.DF_ObjetParam[id]['Timer'] = 0;
                if (etat == 'out') DF_ObjetDefilant(id);
                }
}




function DF_ObjetSensInverse(id) 
{
if(typeof this.DF_ObjetParam != 'undefined' && typeof this.DF_ObjetParam[id] != 'undefined' && this.DF_ObjetParam[id]['id_defile'] != null && typeof this.DF_ObjetParam[id]['Timer'] == 'number' && this.DF_ObjetParam[id]['inverse'] == 1 && !(this.DF_ObjetParam[id]['pscrnt']  == - this.DF_ObjetParam[id]['p_retour'] || this.DF_ObjetParam[id]['pscrnt'] == this.DF_ObjetParam[id]['psinit'])) this.DF_ObjetParam[id]['sens'] *= -1;       
}




function addLoad_DF_ObjetDefilant(func) {

                if (window.addEventListener)
                {
                        window.addEventListener("load", func, false);
                }
       else if (document.addEventListener)
                {
                        document.addEventListener("load", func, false);
                }
       else if (window.attachEvent)
                {
                        window.attachEvent("onload", func);
                }
}

addLoad_DF_ObjetDefilant(function(){DF_ObjetDefilant('texte_defilant','240','b','g','30','100','0','0')});

