/*
Nudging text by Matthias (info@freejavascripts.f2s.com)
Modified by Dynamic Drive to function in NS6
For this script and more, visit http://www.dynamicdrive.com
*/
//alert('stop');
//configure message
var vstr="Nouvel arrivage tous les 1er du mois"; //MZZ: Nouvel arrivage tous les 1er du mois
//animate text in NS6? (0 will turn it off)
var ns6switch=1;
var ns6=window.document.getElementById&&!window.document.all;
var mes=new Array();
mes[0]=-1;
mes[1]=-4;
mes[2]=-7;
mes[3]=-10;
mes[4]=-7;
mes[5]=-4;
mes[6]=-1;
var num=0;
var num2=0;
var nfinal=null;
function jump_0(){
  var txt='';
  var jump=null;
  if (ns6&&!ns6switch){
    jump.innerHTML=vstr;
    return;
  }
  if(vstr.length>6){
    for(var i=0; i!=vstr.length;i++){
      txt+='<span style="position:relative;" id="n'+i+'">'+vstr.charAt(i)+'</span>';
    }
    jump=(window.document.getElementById)?window.document.getElementById('jumpx'):window.document.all.jumpx;
    jump.innerHTML=txt;
    txt='';
    jump_1a();
  }else{
    alert('Your message is too short');
  }
}
function jump_1a(){
  var jump=null;
  nfinal=(window.document.getElementById)?window.document.getElementById('n0'):window.document.all.n0;
  //nfinal.style.left=-num2; //2009
  if(num2!=9){
    num2+=3;
    setTimeout('jump_1a()',1); //2009: 50
  }else{
    jump_1b();
  }
}
function jump_1b(){
  //nfinal.style.left=-num2; //2009
  if(num2!=0){
    num2-=3;
    setTimeout('jump_1b()',1); //2009: 50
  }else{
    jump_2();
  }
}
function jump_2(){
  var txt='';
  var jump=null;
  txt='';
  for(var i=0;i!=vstr.length;i++){
    if(i+num > -1 && i+num < 7){
      txt+='<span style="position:relative; top:'+mes[i+num]+'">'+vstr.charAt(i)+'</span>';
    }else{
      txt+='<span>'+vstr.charAt(i)+'</span>';
    }
  }
  jump=(window.document.getElementById)?window.document.getElementById('jumpx'):window.document.all.jumpx;
  jump.innerHTML=txt; //txt,'hello' innerHTML,innerText
  txt='';
  if(num!=(-vstr.length)){
    num--;
    setTimeout('jump_2()',50);
  }else{
    num=0;
    setTimeout('jump_0()',6000); //2009: 50
  }
}
