
function remplaceStr(chaine1,chaine2,chaine3)
{
  if ((chaine1 == "") || (chaine2 == "")) return false;
  valeur = chaine1.indexOf(chaine2);
  if (valeur == -1) return chaine1;
  strFinale = "";
  strTmp = chaine1;
  while (valeur != -1)
  {
    strFinale = strFinale.concat(strTmp.substring(0,valeur)).concat(chaine3);
    strTmp = strTmp.substr(valeur+chaine2.length);
    valeur = strTmp.indexOf(chaine2);
  }
  strFinale = strFinale.concat(strTmp);
  return strFinale;
}

function ecritCalque(idCalque,texte)
{
  if (document.all) document.all[idCalque].innerHTML = texte;
  if (document.layers) 
  {
    document.layers[idCalque].document.open();
    document.layers[idCalque].document.write(texte);
    document.layers[idCalque].document.close();
  }
  if (document.getElementById) 
  document.getElementById(idCalque).innerHTML = texte;
}
function styleCalque(idCalque)
{
  if (document.all) calqueStyle = document.all[idCalque].style;
  if (document.layers) calqueStyle = document.layers[idCalque];
  if (document.getElementById) calqueStyle = 
  document.getElementById(idCalque).style;
  return calqueStyle;
}
indScrollH = 0;
function scrollH(idCalque,taille,classe)
{
  strTmp = "";
  while (strTmp.length < taille)
  {
    strTmp = strTmp + " ";
  }
  strFin = strTmp + messageScrollH;
  strAff = strFin.substr(indScrollH,taille);
  if (strAff.length < taille) strAff = strAff + 
  strTmp.substr(0,taille-strAff.length);
  strAff = remplaceStr(strAff," ","&nbsp;");
  strAff = "<SPAN CLASS='" + classe + "'>" + strAff + "</SPAN>";
  ecritCalque(idCalque,strAff);
  if (indScrollH < strFin.length-1) indScrollH++;
  else indScrollH = 0;
  setTimeout("scrollH('"+idCalque+"',"+taille+",'"+classe+"')",120);
}
messageScrollH = " dates des soldes Hiver 2007/2008 à Paris du 9 janvier au 16 février 2008";
