var msg_haut="";var msg_bas="";var msg_nb = 0;var msg_suiv = 0;var mode =1;var msg_actuel = 0;var msg_top =0;var cpt=0;function msg_start(){msg_nb=tab_message.length-1;if(msg_actuel==msg_nb)msg_suiv=0;else msg_suiv = msg_actuel+1;if(cpt==0){div_top='msg_1';div_bottom='msg_2';}else{div_top='msg_2';div_bottom='msg_1';}if(document.getElementById){document.getElementById(div_bottom).innerHTML=tab_message[msg_suiv];}msg_top=0;if(document.getElementById)setTimeout("msg_change()",sec_pause*1000)}function msg_change(){msg_top-=4;document.getElementById('msg_1').style.top=msg_top+'%';document.getElementById('msg_2').style.top=msg_top+'%';if((msg_top+102)>0)setTimeout("msg_change()",150);else msg_stop()}function msg_stop(){if(cpt==0){div_top='msg_1';div_bottom='msg_2';}else{div_top='msg_2';div_bottom='msg_1';}cpt=1-cpt;document.getElementById('cadre').removeChild(document.getElementById(div_top));document.getElementById(div_bottom).style.top = '0%';var elmt=document.createElement('div');elmt.id=div_top;elmt.style.position='relative';elmt.style.height=document.getElementById(div_bottom).style.height;document.getElementById('cadre').appendChild(elmt);msg_actuel=msg_suiv;msg_start()}