var timeout = null;



//Specify the marquee's width (in pixels)
var marqueewidth=750
//Specify the marquee's height (in pixels, pertains only to NS)
var marqueeheight=15
//Specify the marquee's scroll speed (larger is faster)
var thespeed=2
//Specify the marquee contents
//var marqueecontents="<a href='/formule1/' class='tickerlnk' target='_top'>Course au sommet et nouveau podium pour Montoya</a>"
//var marqueecontents="<a href=\"javascript:var s318td=window.open('http://www.bmw.fr/evenements/offres318tdpack/popup.html','s318td','width=446,height=590,top=50,left=50');s318td.focus();\" class='tickerlnk'>BMW 318td 115ch pour 350€ par mois sans apport</a>"
var marqueecontents="&Eacute;conomisez d&egrave;s maintenant pour 2006!... "
//marqueecontents+="<img src='/img/p.gif' width='8' height='1' border='0'>-<img src='/img/p.gif' width='8' height='1' border='0'>"
// marqueecontents +="<a href=\"javascript:var s320d=window.open('http://www.bmw.fr/services/evenements/popup_320d/main.html','s320d','width=465,height=288,top=100,left=100');s320d.focus();\" class='tickerlnk' target='_top'>Votre BMW 320d Pack Confort à 450EUR/mois</a>"
/*
if (document.all)
document.write('<marquee onmouseover=\"this.stop()\" onmouseout=\"this.start()\" scrollAmount='+thespeed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')

if (document.layers)
document.write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="tkp"><layer name="tkc" onmouseover=\"_nnmove(0)\" onmouseout=\"_nnmove(1)\"><font face="arial" size=1 color=#FF9900>&nbsp;</font></layer></ilayer>')

if (!document.all && document.getElementById)
document.write('<div onmouseover=\"_n6move(0)\" onmouseout=\"_n6move(1)\" style="position:relative;overflow:hidden;width:'+marqueewidth+'px;height:'+marqueeheight+'px" id="tkp"><div id="tkc" style="position:absolute;width:0;left:0"><font face="arial" size=1 color=#FF9900>&nbsp;</font></div></div>')
*/
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
nn_intializemarquee()
}
else if (!document.all && document.getElementById){
setTimeout("window.onresize=regenerate",450)
n6_intializemarquee()
}
}

function nn_intializemarquee(){
document.tkp.document.tkc.document.write('<nobr>'+marqueecontents+'</nobr>')
document.tkp.document.tkc.document.close()
thelength=document.tkp.document.tkc.document.width
nn_scrollit()
}

function n6_intializemarquee(){
document.getElementById('tkc').innerHTML = '<nobr>'+marqueecontents+'</nobr>'
thelength=document.getElementById('tkc').offsetWidth
n6_scrollit()
}

function nn_scrollit(){
if (document.tkp.document.tkc.left>=thelength*(-1)){
document.tkp.document.tkc.left-=thespeed
timeout = setTimeout("nn_scrollit()",100)
}
else{
document.tkp.document.tkc.left=marqueewidth
nn_scrollit()
}
}

function n6_scrollit(){
pl = parseInt(document.getElementById('tkc').style.left);
if (pl>=thelength*(-1)){
document.getElementById('tkc').style.left = (pl-thespeed) + "px";
timeout = setTimeout("n6_scrollit()",100)
}
else{
document.getElementById('tkc').style.left=marqueewidth + "px";
n6_scrollit()
}
}

function _nnmove(tip){
 if(tip==0)
  clearTimeout(timeout);
 else
  nn_scrollit();
}

function _n6move(tip){
 if(tip==0)
  clearTimeout(timeout);
 else
  n6_scrollit();
}


