
var IMG_SERVER = 'http://s.tf1.fr';var formatPref;function gId(id){return document.getElementById(id);}
function addEvtListener(obj, evtName, f){if(obj.attachEvent){obj.attachEvent('on' + evtName, f);} else{obj.addEventListener(evtName, f, false);}}
function PopUpSize(pu,sn,iw,ih){var a1;a1="width="+iw+",height="+ih;a1+=",left=100,top=100,directories=0,hotkeys=1,location=0,menubar=0";a1+=",resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0";window.open(pu,sn,a1);return;}
function PopUpScrollBarSize(pu,sn,iw,ih){var a1;a1="width="+iw+",height="+ih;a1+=",left=100,top=100,directories=0,hotkeys=1,location=0,menubar=0";a1+=",resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0";window.open(pu, sn, a1);return;}
function getCookieVal(offset){var es=document.cookie.indexOf(";",offset);if(es==-1){es=document.cookie.length;}
return unescape(document.cookie.substring(offset,es));}
function openPopup(pu,sn,iw,ih,il,it,im,i2,ito,ist,ir,ilo){var a1;a1="width="+iw+",height="+ih;a1+=",left="+ il +",top="+ it +",directories=0,hotkeys=1";a1+=",menubar="+im +",scrollbars="+i2+",toolbar="+ito+",status="+ist;a1+=",resizable="+ir+",location="+ilo;window.open(pu,sn,a1);return;}
function deleteCookie(name){var path = getCookie("path");if(getCookie(name)){document.cookie = name + "=" + ((path) ? "; path=" + path : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";}}
function getCookie(name){switch(name){case '_MSOPSEUDO_':
case '_MSOMAIL_':
case '_MSOTICKET_':
unvIdLogin = getCookie('_MSOUNIVERS_');if(unvIdLogin != "Undefined" && unvIdLogin != 1){return "Undefined";}
break;}
var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while (i < clen){var j=i+alen;if(document.cookie.substring(i, j)==arg){return getCookieVal(j);}
i=document.cookie.indexOf(" ", i)+1;if(i==0){break;}}
return "Undefined";}
function setCookie(name,value){var exv=getCookie("expires");var pathval=getCookie("path");var pval=getCookie("player");var qval=getCookie("quality");if(exv){var date=new Date();var oyfn=date.getTime()+(365*24*60*60*1000);date.setTime(oyfn);}
if(pathval){ pathval="/"; }
if(pval){ pval=202; }
if(qval){ qval=202; }
var ck=name+"="+escape(value);ck+="; path="+pathval;ck+="; domain=.tf1.fr";document.cookie=ck;}
function VerifCookie(tco,ch,lg,ht,scr){var pval=getCookie("player");var qval=getCookie("quality");var snif=0;if(pval=="Undefined"||pval==""||qval=="Undefined"||qval==""){snif=1;}
ch = unescape(ch);ipgId=getIpgId(ch);;isOid=ipgId.indexOf("-", 0);result="";if(isOid > 0){result="0,,-"+ipgId.substring(isOid+1, 1000)+",00.html";ipgId=ipgId.substring(0, isOid);}
if(lg==""||ht==""||lg==0||ht==0){if(tco==4){lg=470;ht=525;} else{lg=480;ht=565;}}
if(snif==1 && (tco==0||tco==4||tco==49||tco==147||tco==500)){aTAG=new Array(8);aOID=new Array(8);aTAG[0]="/video";aOID[0]="2-e1VOVl9JRCBFVEFQRX0gezEgMX0=";aTAG[1]="/recherche";aOID[1]="141-e1VOVl9JRCBFVEFQRX0gezEgMX0=";aTAG[2]="/premium/lcilive2/flux/dernierjt";aOID[2]="201-e1VOVl9JRCBFVEFQRX0gezEgMX0=";aTAG[3]="/premium/lcilive2/demo";aOID[3]="161-e1VOVl9JRCBFVEFQRX0gezEgMX0=";aTAG[4]="/lachaine/pass";aOID[4]="222-e1VOVl9JRCBFVEFQRX0gezEgMX0=";aTAG[5]="/hautdebit";aOID[5]="1-e1VOVl9JRCBFVEFQRX0gezEgMX0=";aTAG[6]="/fermecelebrites";aOID[6]="244-e1VOVl9JRCBFVEFQRX0gezEgMX0=";aTAG[7]="/";aOID[7]="21-e1VOVl9JRCBFVEFQRX0gezEgMX0=";var i=0;var oid="";while(i<8 && oid==""){chTag = ch.replace(/^http:\/\/[a-z0-9\.\-]+\//i, '/');if(chTag.indexOf(aTAG[i]) == 0){oid=aOID[i];}
i++;}
if(oid > ""){var newUrl="http://www.tf1.fr/video/videoSniffer/0,,"+oid+",00.html?ch="+escape(ch)+"&tco="+tco+"&lg="+lg+"&ht="+ht+"&pval="+pval+"&qval="+qval+"&scr="+scr;if(tco==0){window.resizeTo(540,350);window.location=newUrl;} else{void PopUpScrollBarSize(newUrl,'Sniffer',540,330);}}} else{if(ipgId != ""){var longueur = ch.length;var indexDebut = ch.indexOf(",,");var indexFin = ch.indexOf(",", indexDebut+2);ipg = ch.substring(indexDebut + 2, indexFin) + '-';ipg = ipg.substring(0, ipg.indexOf("-", 0));if(pval == 201 && qval == 201){oid = "e3BsYXllciBxdWFsaXR5IFVOVl9JRH0gezIwMSAyMDEgMX0=";} else if(pval == 201 && qval == 202){oid = "e3BsYXllciBxdWFsaXR5IFVOVl9JRH0gezIwMSAyMDIgMX0=";} else if(pval == 202 && qval == 201){oid = "e3BsYXllciBxdWFsaXR5IFVOVl9JRH0gezIwMiAyMDEgMX0=";} else{oid = "e3BsYXllciBxdWFsaXR5IFVOVl9JRH0gezIwMiAyMDIgMX0=";}
newUrl = ch.substring(0, indexDebut+2) + ipg + "-" + oid + ch.substring(indexFin, longueur);} else{newUrl = ch;}
if(tco==500){window.location = newUrl;}
if(tco==0){tabUrl = ch.split('-');if(tabUrl[3] == 'Undefined'){tabUrl[3] = pval;}
if(tabUrl[4] == 'Undefined'){tabUrl[4] = qval;}
window.resizeTo(lg,ht);window.location = tabUrl.join('-');} else{if(scr == 1){PopUpScrollBarSize(newUrl, "Video", lg, ht);} else{PopUpSize(newUrl, "Video", lg, ht);}}}}
var bWin32IE;if((navigator.userAgent.indexOf("IE") > -1) && (navigator.platform=="Win32")){bWin32IE=true;} else{bWin32IE=false;}
var id_realplayer="";function depart_video(){if(document.readyState=="complete"){id_realplayer=VIDEO;}}
function checkOS(){if(navigator.userAgent.indexOf("Mac") !=-1){var OpSys="Macintosh";} else{var OpSys="other";}
return OpSys;}
function rp_play(){id_realplayer.DoPlay();}
function rp_stop(){id_realplayer.DoStop();id_realplayer.SetPosition(0);}
function rp_pause(){id_realplayer.DoPause();}
function rp_volume_100(){id_realplayer.SetVolume(100)
}
function rp_volume_80(){id_realplayer.SetVolume(80)
}
function rp_volume_60(){id_realplayer.SetVolume(60)
}
function rp_volume_40(){id_realplayer.SetVolume(40)
}
function rp_volume_20(){id_realplayer.SetVolume(20)
}
function rp_volume_0(){id_realplayer.SetVolume(0)
}
function rp_fullscreen(){id_realplayer.SetFullScreen();}
function rp_mute(){rp_volume_0();}
function rp_volume_plus(){currentVolume = id_realplayer.GetVolume();newVolume = (currentVolume + 20);if(id_realplayer.GetVolume() == 100){alert("Le volume est au maximum.");}
if(newVolume <= 80){id_realplayer.setvolume(newVolume);} else if((newVolume <= 100) && (newVolume > 80)){id_realplayer.setvolume(100);}}
function rp_volume_moins(){currentVolume = id_realplayer.GetVolume();newVolume = (currentVolume - 20);if(id_realplayer.GetVolume() == 0){alert("Le volume est au minimum.");}
if(newVolume >= 20){id_realplayer.setvolume(newVolume);} else if((newVolume >= 0) && (newVolume < 20)){id_realplayer.setvolume(0);}}
function mp_play(){if(bWin32IE==true){setTimeout("document.MediaPlayer.play()",100);} else{document.MediaPlayer.Play();}}
function mp_stop(){if(bWin32IE==true){document.MediaPlayer.Stop();document.MediaPlayer.CurrentPosition=0;} else{document.MediaPlayer.Stop();document.MediaPlayer.SetCurrentPosition(0);}}
function mp_pause(){if(bWin32IE==true){document.MediaPlayer.Pause();} else{document.MediaPlayer.Pause();}}
function mp_volume_0(){document.MediaPlayer.Mute=true;}
function mp_volume_20(){document.MediaPlayer.Mute=false;document.MediaPlayer.Volume=-2000;}
function mp_volume_40(){document.MediaPlayer.Mute=false;document.MediaPlayer.Volume=-1000;}
function mp_volume_60(){document.MediaPlayer.Mute=false;document.MediaPlayer.Volume=-500;}
function mp_volume_80(){document.MediaPlayer.Mute=false;document.MediaPlayer.Volume=-100;}
function mp_volume_100(){document.MediaPlayer.Mute=false;document.MediaPlayer.Volume=0;}
function mp_fullscreen(){document.MediaPlayer.DisplaySize=3;}
function mp_mute(){mp_volume_0();}
function mp_volume_plus(){document.MediaPlayer.Mute=false;currentVolume = document.MediaPlayer.Volume;newVolume = (currentVolume + 2000);if(document.MediaPlayer.Volume == 0){alert("Le volume est au maximum.");}
if(newVolume <= -2000){document.MediaPlayer.Volume = newVolume;} else{if((newVolume <= 0) && (newVolume > -2000)){document.MediaPlayer.Volume = 0;}}}
function mp_volume_moins(){currentVolume = document.MediaPlayer.Volume;newVolume = (currentVolume - 2000);if(document.MediaPlayer.Volume == -10000){alert("Le volume est au minimum.");}
if(newVolume >= -8000){document.MediaPlayer.Volume = newVolume;} else{if((newVolume >= -10000) && (newVolume < -8000)){document.MediaPlayer.Volume = -10000;}}}
function random(limits){today=new Date();num=today.getTime();num=Math.round(Math.abs(Math.sin (num)*1000000 * Math.random())) % limits;return num;}
function isSelectedShop(idShop){var trouve=0;for (d=0;d<lstShop.length;d++){if(lstShop[d][0]==idShop){trouve=1;}}
return trouve;}
function isSelectedUser(idUser){var trouve=0;for (c=0;c<lstUser.length;c++){if(lstUser[c][0]==idUser){trouve=1;}}
return trouve;}
function getRandomShopList(nbTeaser){initShopList(nbTeaser);initUserList(nbTeaser);if(lstBoutique.length>nbTeaser && user.length>nbTeaser){for (i=0;i<nbTeaser;i++){nextShop=0;while (nextShop==0){ j=random(ponderationTotale);var tmpShop=getShop(j);if(tmpShop!=-1 && tmpShop<lstBoutique.length){if(!isSelectedUser(lstBoutique[tmpShop][3]) && !isSelectedShop(lstBoutique[tmpShop][0])){nextShop++;lstShop[i][0]=lstBoutique[tmpShop][0];lstShop[i][1]=tmpShop;lstUser[i][0]=lstBoutique[tmpShop][3];lstUser[i][1]=tmpShop;}}}}} else if(lstBoutique.length>nbTeaser){for (i=0;i<nbTeaser;i++){nextShop=0;while (!nextShop){j=random(ponderationTotale);var tmpShop=getShop(j);if(!isSelectedShop(lstBoutique[tmpShop][0])){nextShop++;lstShop[i][0]=lstBoutique[tmpShop][0];lstShop[i][1]=tmpShop;}}}} else{for (i=0;i<lstBoutique.length;i++){lstShop[i][0]=lstBoutique[i][0];lstShop[i][1]=i;}}}
function getShop(ponderation){var tp=0 ;var a=0;while (tp<ponderation){tp=tp+lstBoutique[a][2];a++;}
a--;return a;}
function getNbUser(nbTeaser){var i=1;if(lstUser[0][0]){var tmpUser=lstUser[0][0];}
for (v=1;v<nbTeaser;v++){if(lstUser[1][0]!=tmpUser){i++;}}
return i;}
function initShopList(nbTeaser){for (i=0;i<nbTeaser;i++){lstShop[i][0]="";lstShop[i][1]="";}}
function initUserList(nbTeaser){for (i=0;i<nbTeaser;i++){lstUser[i][0]="";lstUser[i][1]="";}}
function getQueryValue(vn){var qs=""+self.location.search;var sP=qs.indexOf(vn+"=");var tV="";if(sP!=-1){sP=sP + vn.length +1;Part2=qs.substring(sP,qs.length);var eV=Part2.indexOf("&");if(eV!=-1){tV=Part2.substring(0,eV);} else{tV=Part2;}}
return tV;}
function getIpgId(url){var id=url.indexOf(",,");var idf=url.indexOf(",", id+2);if(idf == -1){idf=url.length;}
return url.substring(id+2, idf);}
var base64s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function encode64(str){var bits,dual,i=0,encOut='';while(str.length>=i+3){bits =
(str.charCodeAt(i++) & 0xff) <<16 |
(str.charCodeAt(i++) & 0xff) <<8  |
str.charCodeAt(i++) & 0xff;encOut +=
base64s.charAt((bits & 0x00fc0000) >>18) +
base64s.charAt((bits & 0x0003f000) >>12) +
base64s.charAt((bits & 0x00000fc0) >> 6) +
base64s.charAt((bits & 0x0000003f));}
if(str.length -i>0 && str.length-i<3){dual = Boolean(str.length-i-1);bits =
((str.charCodeAt(i++) & 0xff) <<16) |
(dual ? (str.charCodeAt(i) & 0xff) <<8 : 0);encOut +=
base64s.charAt((bits & 0x00fc0000) >>18) +
base64s.charAt((bits & 0x0003f000) >>12) +
(dual ? base64s.charAt((bits & 0x00000fc0) >>6) : '=') +
'=';}
return encOut
}
function getUniversPath(url,fileName){if(url!='#'){if(unv_id==1){strToEncode='URL '+fileName;} else{strToEncode='{URL UNV_ID}{'+fileName+' '+unv_id+'}';}
window.location=url+'0,,-'+encode64(strToEncode)+',00.html';}}
var lstShop;var lstBoutiquePremium;var shopPremium;function refreshShoppingPremium(nbTeaser, rubId, styleTitre, noBR, styleTexte, periode){getRandomShopListPremium(nbTeaser);if(shopPremium[0]!=','){var tdp0=gId('tdp00');var tdp1=gId('tdp10');var tdp2=gId('tdp20');var tdp3=gId('tdp30');if(tdp0){tdp0.innerHTML='<a href=\"http://www.tf1.fr/src/transactions/genereClickURL.php?pURL='+lstBoutiquePremium[shopPremium[1]][5]+'&tag='+lstBoutiquePremium[shopPremium[1]][6]+'\" target=\"_blank\" class=\"'+styleTitre+'\"><img src=\"http://s.tf1.fr'+lstBoutiquePremium[shopPremium[1]][7] +'\" width=\"68\" height=\"51\" border=\"0\" HSPACE=\"2\" VSPACE=\"2\"></a>';}
if(tdp1){tdp1.innerHTML='<img src=\"http://log.tf1.fr/img/log/shoppingBox.gif?CON_ID='+lstBoutiquePremium[shopPremium[1]][0]+'&RUB_ID='+ rubId+'&UNV_ID='+unv_id+'&PARAM=\" align=\"top\">';}
if(tdp2){tdp2.innerHTML='<a href=\"http://www.tf1.fr/src/transactions/genereClickURL.php?pURL='+lstBoutiquePremium[shopPremium[1]][5]+'&tag='+lstBoutiquePremium[shopPremium[1]][6]+'\" target=\"_blank\" class=\"'+styleTitre+'\">'+lstBoutiquePremium[shopPremium[1]][1]+'</a>';}
if(tdp3){tdp3.innerHTML='<a href=\"http://www.tf1.fr/src/transactions/genereClickURL.php?pURL='+lstBoutiquePremium[shopPremium[1]][5]+'&tag='+lstBoutiquePremium[shopPremium[1]][6]+'\" target=\"_blank\" class=\"'+styleTexte+'\">'+lstBoutiquePremium[shopPremium[1]][4]+'</a>';}}
for (var refreshShopping_i=0; refreshShopping_i<lstShop.length; refreshShopping_i++){var td1=gId('td1'+refreshShopping_i);var td2=gId('td2'+refreshShopping_i);if(lstShop[refreshShopping_i][1]!=''){if(td1){td1.innerHTML='<img src=\"http://log.tf1.fr/img/log/shoppingBox.gif?CON_ID='+lstBoutique[lstShop[refreshShopping_i][1]][0]+'&RUB_ID='+rubId+'&UNV_ID='+unv_id+'&PARAM=\" align=\"top\" width=\"14\" height=\"15\">';}
if(td2){td2.innerHTML='<a href=\"http://www.tf1.fr/src/transactions/genereClickURL.php?pURL='+lstBoutique[lstShop[refreshShopping_i][1]][5]+'&tag='+lstBoutique[lstShop[refreshShopping_i][1]][6]+'\" target=\"_blank\" class=\"'+styleTitre+'\">'+lstBoutique[lstShop[refreshShopping_i][1]][1]+'</a>';if(noBR != "on"){td2.innerHTML+='<br>';} else{td2.innerHTML+='&nbsp;:&nbsp';}
td2.innerHTML+='<a href=\"http://www.tf1.fr/src/transactions/genereClickURL.php?pURL='+lstBoutique[lstShop[refreshShopping_i][1]][5]+'&tag='+lstBoutique[lstShop[refreshShopping_i][1]][6]+'\" target=\"_blank\" class=\"'+styleTexte+'\">'+lstBoutique[lstShop[refreshShopping_i][1]][4]+'</a>';}}}
window.setTimeout('refreshShoppingPremium('+nbTeaser+', '+rubId+', \"'+styleTitre+'\", \"'+noBR+'\", \"'+styleTexte+'\", '+periode+')', periode*1000);}
function getRandomShopListPremium(nbTeaser){initShopList(nbTeaser);initUserList(nbTeaser);var shopPremiumAnnonceur=0;if(lstBoutiquePremium.length>1){nextShop=0;while (!nextShop){j=1+random(ponderationTotalePremium-1);var tmpShop=getShopPremium(j);if(!isSelectedShop(lstBoutiquePremium[tmpShop][0])){nextShop=1;shopPremium[0]=lstBoutiquePremium[tmpShop][0];shopPremium[1]=tmpShop;shopPremiumAnnonceur=lstBoutiquePremium[tmpShop][3];}}} else if(lstBoutiquePremium.length==1){shopPremium[0]=lstBoutiquePremium[0][0];shopPremium[1]=0;shopPremiumAnnonceur=lstBoutiquePremium[0][3];}
if(lstBoutique.length>nbTeaser && user.length>nbTeaser){for (i=0;i<nbTeaser;i++){nextShop=0;while (nextShop<100){nextShop++;j=1+random(ponderationTotale-1);var tmpShop=getShop(j);if(tmpShop!=-1 && tmpShop<lstBoutique.length && shopPremiumAnnonceur!=lstBoutique[tmpShop][3]){if(!isSelectedUser(lstBoutique[tmpShop][3]) && !isSelectedShop(lstBoutique[tmpShop][0])){lstShop[i][0]=lstBoutique[tmpShop][0];lstShop[i][1]=tmpShop;lstUser[i][0]=lstBoutique[tmpShop][3];lstUser[i][1]=tmpShop;break;}}}}} else if(lstBoutique.length>nbTeaser){for (i=0;i<nbTeaser;i++){nextShop=0;while (nextShop<100){nextShop++;j=random(ponderationTotale);var tmpShop=getShop(j);if(!isSelectedShop(lstBoutique[tmpShop][0]) && shopPremiumAnnonceur!=lstBoutique[tmpShop][3]){lstShop[i][0]=lstBoutique[tmpShop][0];lstShop[i][1]=tmpShop;break;}}}} else{for (i=0;i<lstBoutique.length;i++){lstShop[i][0]=lstBoutique[i][0];lstShop[i][1]=i;}}}
function getShopPremium(ponderation){var tmpPond=0 ;var a=0;while (tmpPond < ponderation){tmpPond=tmpPond+lstBoutiquePremium[a][2];a++;}
a--;return a;}
function getRandomShopListPremiumMultiple(nbTeaser){initShopList(nbTeaser);initUserList(nbTeaser);if(lstBoutiquePremium.length>nbTeaser && user.length>nbTeaser){for (i=0;i<nbTeaser;i++){nextShop=0;while (nextShop<100){nextShop++;j=1+random(ponderationTotalePremium-1);var tmpShop=getShopPremium(j);if(tmpShop!=-1 && tmpShop<lstBoutiquePremium.length){if(!isSelectedUser(lstBoutiquePremium[tmpShop][3]) && !isSelectedShop(lstBoutiquePremium[tmpShop][0])){lstShop[i][0]=lstBoutiquePremium[tmpShop][0];lstShop[i][1]=tmpShop;lstUser[i][0]=lstBoutiquePremium[tmpShop][3];lstUser[i][1]=tmpShop;nextShop=100;}}}}} else if(lstBoutiquePremium.length>nbTeaser){for (i=0;i<nbTeaser;i++){nextShop=0;while (nextShop<100){nextShop++;j=1+random(ponderationTotalePremium-1);var tmpShop=getShop(j);if(!isSelectedShop(lstBoutiquePremium[tmpShop][0])){lstShop[i][0]=lstBoutiquePremium[tmpShop][0];lstShop[i][1]=tmpShop;break;}}}} else{for (i=0;i<lstBoutiquePremium.length;i++){lstShop[i][0]=lstBoutiquePremium[i][0];lstShop[i][1]=i;}}}
function refreshShoppingPremiumMultiple(nbTeaser, rubId, styleTitre, noBR, styleTexte, periode){getRandomShopListPremiumMultiple(nbTeaser);for (var refreshShopping_i=0; refreshShopping_i<lstShop.length; refreshShopping_i++){if(lstShop[refreshShopping_i]!=''){var tdp0=gId('tdp0'+refreshShopping_i);var tdp1=gId('tdp1'+refreshShopping_i);var tdp2=gId('tdp2'+refreshShopping_i);var tdp3=gId('tdp3'+refreshShopping_i);if(tdp0){tdp0.innerHTML='<a href=\"http://www.tf1.fr/src/transactions/genereClickURL.php?pURL='+lstBoutiquePremium[lstShop[refreshShopping_i][1]][5]+'&tag='+lstBoutiquePremium[lstShop[refreshShopping_i][1]][6]+'\" target=\"_blank\" class=\"'+styleTitre+'\"><img src=\"http://s.tf1.fr'+lstBoutiquePremium[lstShop[refreshShopping_i][1]][7] +'\" width=\"68\" height=\"51\" border=\"0\" HSPACE=\"2\" VSPACE=\"2\"></a>';}
if(tdp1){tdp1.innerHTML='<img src=\"http://log.tf1.fr/img/log/shoppingBox.gif?CON_ID='+lstBoutiquePremium[lstShop[refreshShopping_i][1]][0]+'&RUB_ID='+ rubId+'&UNV_ID='+unv_id+'&PARAM=\" align=\"top\">';}
if(tdp2){tdp2.innerHTML='<a href=\"http://www.tf1.fr/src/transactions/genereClickURL.php?pURL='+lstBoutiquePremium[lstShop[refreshShopping_i][1]][5]+'&tag='+lstBoutiquePremium[lstShop[refreshShopping_i][1]][6]+'\" target=\"_blank\" class=\"'+styleTitre+'\">'+lstBoutiquePremium[lstShop[refreshShopping_i][1]][1]+'</a>';}
if(tdp3){tdp3.innerHTML='<a href=\"http://www.tf1.fr/src/transactions/genereClickURL.php?pURL='+lstBoutiquePremium[lstShop[refreshShopping_i][1]][5]+'&tag='+lstBoutiquePremium[lstShop[refreshShopping_i][1]][6]+'\" target=\"_blank\" class=\"'+styleTexte+'\">'+lstBoutiquePremium[lstShop[refreshShopping_i][1]][4]+'</a>';}}}
window.setTimeout('refreshShoppingPremiumMultiple('+nbTeaser+', '+rubId+', \"'+styleTitre+'\", \"'+noBR+'\", \"'+styleTexte+'\", '+periode+')', periode*1000);}
function M_getRef(id){return gId(id);}
function M_getOffset(obj, dir){var px = 0;while (obj.tagName!='BODY'){if(dir && dir=='top') px += obj.offsetTop; else px += obj.offsetLeft;obj = obj.offsetParent;}
return px;}
function hm(){for (var i = 1; i<=nbMaxMenu; i++){var oDiv = gId('divSubmenu'+i);if(oDiv) oDiv.style.visibility = 'hidden';var lnk = gId('lnk'+i)
if(lnk){if(puceOff) lnk.style.backgroundImage = 'url('+puceOff+')';if(styleOff) lnk.className = styleOff;}}
var oCont = gId('divConteneur');if(oCont){oCont.style.display = "none";}}
function sm(num, show){var lnk = gId('lnk' + num);if(!lnk) return false;if(puceOn) lnk.style.backgroundImage = 'url('+ puceOn + ')';if(styleOn) lnk.className = styleOn;var objLeft = lnk.parentNode;var objTop = gId('divLevelTop'+iblId);var ssmenu = gId('divSubmenu' + num);if(ssmenu){if(show){var initialTop = objTop.offsetHeight;if(flagTop) initialTop = -ssmenu.offsetHeight;ssmenu.style.left = M_getOffset(objLeft) + 'px';ssmenu.style.top  = (initialTop + M_getOffset(objTop, 'top')) + 'px';}
ssmenu.style.visibility = show ? 'visible':'hidden';var oCont = gId('divConteneur');if(oCont){var decalLeft = 2;oCont.style.left = (parseInt(ssmenu.style.left) + decalLeft) + 'px';var decalTop  = flagTop ? -2:2;oCont.style.top  = (parseInt(ssmenu.style.top) + decalTop) + 'px';oCont.style.height = ssmenu.offsetHeight + 'px';oCont.style.width  = ssmenu.offsetWidth + 'px';oCont.style.display = "block";}}}
function pmeOperation(opeId, dest){document.cookie="_MSOTICKET_=0;path=/;domain=.tf1.fr";document.cookie="_PMEOPE_="+opeId+";path=/;domain=.tf1.fr";document.location.href=dest;}
function createPopup(target, urlImg, params, enabled){var DEFAULT_STYLE_CONTAINER = "margin:0; padding:15px; background-color:#cf817f; border:1px solid #000;";var DEFAULT_STYLE_FOOTER    = "text-align:left; margin:5px 0 0 0; font:bold 12px arial; color:#fff; word-break: normal;";var DEFAULT_STYLE_COPYRIGHT = "font:10px arial; color:#000;";if(typeof enabled == 'undefined'){enabled = true;}
if(!enabled){return false;}
if(typeof params == 'undefined'){params ={};}
target.style.cursor = 'pointer';target.title = 'Cliquez ici pour agrandir cette image';this.styleCopyright	= DEFAULT_STYLE_COPYRIGHT;this.styleFooter	= DEFAULT_STYLE_FOOTER;this.styleBody		= DEFAULT_STYLE_CONTAINER;this.legende		= (params['legende'])?params['legende']:'';this.copyright		= (params['copyright'])?params['copyright']:'';this.couleurBackgroundPopup		= (params['couleurBackgroundPopup'])?params['couleurBackgroundPopup']:'';this.texteFermerPopup		= (params['texteFermerPopup'])?params['texteFermerPopup']:'';if(this.couleurBackgroundPopup != '') this.styleBody = "margin:0; padding:15px; background-color:" + this.couleurBackgroundPopup + "; border:1px solid #000;";var popupId 	=	target.id + "popup";var popupImgId 	= 	target.id + "popupImg";var txtTopId 	= 	target.id + "txtTop";var txtFooterId = 	target.id + "txtFooter";if(gId(popupId)){this.oDivContainer = gId(popupId);this.oDivContainer.style.visibility = "hidden";} else{this.oDivContainer = document.createElement("div");if(this.styleBody != ''){this.oDivContainer.style.cssText = this.styleBody;}
this.oDivContainer.id = popupId;this.oDivContainer.style.zIndex = 1000;this.oDivContainer.style.visibility = "hidden";try{document.body.insertBefore(this.oDivContainer, document.body.firstChild);} catch(e){target.parentNode.insertBefore(this.oDivContainer, target); //pose des pb de position du copyright
}}
this.oDiv = document.createElement("div");this.oImg 						= new Image();this.oImg.id					= popupImgId;this.oImg.style.verticalAlign	= "top";listeImagesPopup[popupId] 		= urlImg;var elZoom = document.createElement("div");elZoom.style.textAlign	= "center";elZoom.appendChild(this.oImg);this.oDiv.appendChild(elZoom);elZoom.style.padding = 0;copyrightPopup[popupId] = [];copyrightPopup[popupId]['text'] =this.copyright;copyrightPopup[popupId]['style'] =this.styleCopyright;this.txtFooter 					= document.createElement("div");this.txtFooter.id				= txtFooterId;this.txtFooter.style.oveflow 	= 'hidden';if(this.legende != ""){this.txtFooter.innerHTML = this.legende;if(this.styleFooter != ''){this.txtFooter.style.cssText = this.styleFooter;}}
if(this.texteFermerPopup != ''){this.containerTexteClose = document.createElement("p");this.containerTexteClose.style.cssText = 'display:block; margin:5px 0 0 0; text-align:right;';this.texteClose = document.createElement("a");this.texteClose.id = target.id + "imageClose";this.texte = document.createTextNode(this.texteFermerPopup);texteClose.appendChild(texte);this.texteClose.href	= "javascript:zm_hidePopup('" + popupId + "')";this.texteClose.alt			=  "Fermer cette fenetre...";this.texteClose.style.cssText			=  'color:#FFFFFF; font-weight:bold;';this.containerTexteClose.appendChild(this.texteClose);this.txtFooter.appendChild(this.containerTexteClose);} else{var DEFAULT_BOUTON_FERMER   = "http://s.tf1.fr/mmdia/i/33/0/2156330.gif";this.containerImageClose = document.createElement("p");this.containerImageClose.style.cssText = 'display:block; margin:5px 0 0 0; text-align:right;';this.imageClose = document.createElement("img");this.imageClose.id = target.id + "imageClose";this.imageClose.src = DEFAULT_BOUTON_FERMER;this.imageClose.onclick	= function(){zm_hidePopup(popupId)};this.imageClose.title			=  "Fermer cette fenetre...";this.imageClose.style.cursor = "pointer";this.containerImageClose.appendChild(this.imageClose);this.txtFooter.appendChild(this.containerImageClose);}
this.oDiv.appendChild(this.txtFooter);this.oDivContainer.appendChild(this.oDiv);this.oDivContainer.style.position = "absolute";}
function zm_hidePopup(zoomerId){gId(zoomerId).style.visibility = "hidden";}
function zm_showPopup(zoomerId){gId(zoomerId).style.visibility = "visible";}
function showPopup(e){if(popupIdLastOpen != ''){zm_hidePopup(popupIdLastOpen);}
var target;if(e.target){target = e.target;} else if(e.srcElement){target = e.srcElement;}
var popupId 	= target.id + "popup";var imgId 		= target.id + "popupImg";	//img du popup
var txtTopId 	= target.id + "txtTop";var txtFooterId =	target.id + "txtFooter";var popup 	= gId(popupId);var img 	= gId(imgId);var txtTop 	= gId(txtTopId);var txtFooter = gId(txtFooterId);if(listeImagesPopup[popupId] != ""){img.src = listeImagesPopup[popupId];footerContent[popupId] = txtFooter.innerHTML ;txtFooter.innerHTML = "<br />Chargement en cours <br />.";zm_movePopup(popupId);zm_showPopup(popupId);setWidthAndShow(0, target.id);} else{zm_movePopup(popupId);zm_showPopup(popupId);}
popupIdLastOpen = popupId;}
function getXMLHttpRequest(){var XMLHttp = false;try{XMLHttp = new ActiveXObject("Msxml2.XMLHTTP");} catch (e){try{XMLHttp = new ActiveXObject("Microsoft.XMLHTTP");} catch (E){XMLHttp = false;}}
if(!XMLHttp && typeof XMLHttpRequest!='undefined'){XMLHttp = new XMLHttpRequest();}
return XMLHttp;}
popupIdLastOpen = '';var listeImagesPopup=[];var copyrightPopup=[];var footerContent=[];function setWidthAndShow(i, id){var popupId = id + "popup";var img = gId(id + "popupImg");var txtFooter = gId(id + "txtFooter");if(i<80 && !img.complete){if(i%2 == 0){txtFooter.innerHTML +=".";}
setTimeout("setWidthAndShow("+(i++)+", '"+ id +"' );", 100);} else if(img.complete){txtFooter.style.width = img.width + "px";listeImagesPopup[popupId] = "";if(copyrightPopup[popupId]['text'] != ""){ajoutCopyright(img, copyrightPopup[popupId]['text'], '', copyrightPopup[popupId]['style']);}
txtFooter.innerHTML = footerContent[popupId];gId(id + "imageClose").onclick	= function(){zm_hidePopup(popupId)};return true;} else{txtFooter.style.width = "250px";txtFooter.innerHTML = footerContent[popupId];gId(id + "imageClose").onclick	= function(){zm_hidePopup(popupId)};return false;}}
function zm_movePopup(zoomerId){if(document.getElementById){var setX = 120; // position x par défaut
var setY = 60; // position y par défaut
var div = gId(zoomerId);var divWidth = div.offsetWidth ? div.offsetWidth : div.style.width ? parseInt( div.style.width ) : 0;var divHeight = div.offsetHeight ? div.offsetHeight :  div.style.height ? parseInt( div.style.height ) : 0;setX = setX + getViewportScrollX();setY = setY + getViewportScrollY();div.style.left = setX + "px";div.style.top = setY + "px";}}
function getViewportWidth(){var width = 0;if( document.documentElement && document.documentElement.clientWidth ){width = document.documentElement.clientWidth;}
else if( document.body && document.body.clientWidth ){width = document.body.clientWidth;}
else if( window.innerWidth ){width = window.innerWidth - 18;}
return width;}
function getViewportHeight(){var height = 0;if( document.documentElement && document.documentElement.clientHeight ){height = document.documentElement.clientHeight;}
else if( document.body && document.body.clientHeight ){height = document.body.clientHeight;}
else if( window.innerHeight ){height = window.innerHeight - 18;}
return height;}
function getViewportScrollX(){var scrollX = 0;if( document.documentElement && document.documentElement.scrollLeft ){scrollX = document.documentElement.scrollLeft;}
else if( document.body && document.body.scrollLeft ){scrollX = document.body.scrollLeft;}
else if( window.pageXOffset ){scrollX = window.pageXOffset;}
else if( window.scrollX ){scrollX = window.scrollX;}
return scrollX;}
function getViewportScrollY(){var scrollY = 0;if( document.documentElement && document.documentElement.scrollTop ){scrollY = document.documentElement.scrollTop;}
else if( document.body && document.body.scrollTop ){scrollY = document.body.scrollTop;}
else if( window.pageYOffset ){scrollY = window.pageYOffset;}
else if( window.scrollY ){scrollY = window.scrollY;}
return scrollY;}
function ajoutCopyrightSousImage(img, texte, classe, styles){if(texte == ""){return;}
if(texte.charCodeAt(0) == 169){texte = texte.substr(2);}
texte = texte.replace(/^\s*|\s*$/g, '');if(texte.length > 1){ //pour éviter un pb lié aux espaces dans les regex avec utf8
texte = '&copy;&nbsp;' + texte;} else{texte = '&nbsp;';}
var divCopyright = document.createElement("span");divCopyright.innerHTML = texte;divCopyright.className = classe;var ancetre = img.parentNode;var nsb = img.nextSibling;while(ancetre.tagName!="TD" && ancetre.tagName!="SPAN" && ancetre.tagName!="DIV" && ancetre.tagName!="BODY"){nsb = ancetre.nextSibling;ancetre = ancetre.parentNode;}
divCopyright.style.padding =  "2px 0";divCopyright.style.margin  =  "0 0 4px 0";divCopyright.style.display = "block";divCopyright.style.textAlign = "center";divCopyright.style.width = "100%";divCopyright.style.textDecoration = "none";divCopyright.style.cssText = styles;ancetre.insertBefore(divCopyright, nsb);return(divCopyright);}
function ajoutCopyright(img, texte, classe, styles){if(texte == ""){return;}
if(texte.charCodeAt(0) == 169){texte = texte.substr(2);}
texte = texte.replace(/^\s*|\s*$/g, '');if(texte.length > 1){ //pour éviter un pb lié aux espaces dans les regex avec utf8
texte = '&copy;&nbsp;' + texte;} else{texte = '&nbsp;';}
var divCopyright = document.createElement("span");divCopyright.innerHTML = texte;divCopyright.className = classe;divCopyright.style.cssText = styles;var ancetre = img.parentNode;var nsb = img.nextSibling;while(ancetre.tagName!="TD" && ancetre.tagName!="SPAN" && ancetre.tagName!="DIV" && ancetre.tagName!="BODY"){nsb = ancetre.nextSibling;ancetre = ancetre.parentNode;}
if(navigator.userAgent.search(/Gecko/i) > -1){divCopyright.style.padding =  "2px 0";divCopyright.style.margin  =  "0 0 4px 0";divCopyright.style.display = "block";divCopyright.style.textAlign = "center";divCopyright.style.width = img.width+"px";ancetre.insertBefore(divCopyright, nsb);} else{divCopyright.style.writingMode = "tb-rl";divCopyright.style.whiteSpace =  "nowrap";divCopyright.style.textAlign = 'left';divCopyright.style.padding = img.vspace + "px 0px "+img.vspace+"px 0px";img.valign = 'text-top';img.align = 'left';ancetre.insertBefore(divCopyright, nsb);divCopyright.style.position="absolute";if(divCopyright.offsetWidth > 0){largeur = divCopyright.offsetWidth;} else{largeur = 10;}
divCopyright.style.position="";if(parseInt(ancetre.style.paddingRight)){ancetre.style.paddingRight = (largeur+parseInt(img.parentNode.style.paddingRight))+"px";} else{ancetre.style.paddingRight = largeur+"px";}}
return(divCopyright);}
var TAB_COPYRIGHT=[];function genCopyrights(eleme){var div=gId('divAllCopyrights');if(div){if((eleme == undefined) || (eleme == "") || (eleme == null)){var nodes = document.getElementsByTagName('img');} else{var elem=gId(eleme);var nodes = elem.getElementsByTagName('img');}
var str = '';var nodeNb = nodes.length;var node = null;var cp = '';var L = TAB_COPYRIGHT.length;for (var i = 0; i < nodeNb; i++){node = nodes[i];cp = node.getAttribute('cp');if((cp != null) && (cp != '')){doublon=0;for (var cp_past in TAB_COPYRIGHT)
for (var j = 0; j < L; j++){if(TAB_COPYRIGHT[j]==cp){doublon=1;}}
if(doublon==0){TAB_COPYRIGHT[L]=cp;L++;}}}
str=TAB_COPYRIGHT[0];for (var i = 1; i < L; i++){str+= ' - ' + TAB_COPYRIGHT[i];}
div.innerHTML = str;}}
function isValidEmail(email){reMailForm = new RegExp('^([0-9a-zA-Z]+[-._+&]+)*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$');return reMailForm.test(email);}
function AC_Generateobj(objAttrs, params, embedAttrs){var str = '<object ';for (var i in objAttrs)
str += i + '="' + objAttrs[i] + '" ';str += '>';for (var i in params)
str += '<param name="' + i + '" value="' + params[i] + '" /> ';str += '<embed ';for (var i in embedAttrs)
str += i + '="' + embedAttrs[i] + '" ';str += ' ></embed></object>';document.write(str);}
function elementWrite(id, htmlCode){var el = gId(id);if(el!=undefined)
el.innerHTML = htmlCode;}
function AC_FL_RunContent(){var ret = AC_GetArgs(arguments, '.swf', 'movie', 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000', 'application/x-shockwave-flash');AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);}
function AC_SW_RunContent(){var ret = AC_GetArgs(arguments, '.dcr', 'src', 'clsid:166B1BCA-3F9C-11CF-8075-444553540000', null);AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){var ret = new Object();ret.embedAttrs = new Object();ret.params = new Object();ret.objAttrs = new Object();for (var i=0; i < args.length; i=i+2){var currArg = args[i].toLowerCase();switch (currArg){case 'classid':
break;case 'pluginspage':
ret.embedAttrs[args[i]] = args[i+1];break;case 'src':
case 'movie':
ret.embedAttrs['src'] = args[i+1];ret.params[srcParamName] = args[i+1];break;case 'onafterupdate':
case 'onbeforeupdate':
case 'onblur':
case 'oncellchange':
case 'onclick':
case 'ondblClick':
case 'ondrag':
case 'ondragend':
case 'ondragenter':
case 'ondragleave':
case 'ondragover':
case 'ondrop':
case 'onfinish':
case 'onfocus':
case 'onhelp':
case 'onmousedown':
case 'onmouseup':
case 'onmouseover':
case 'onmousemove':
case 'onmouseout':
case 'onkeypress':
case 'onkeydown':
case 'onkeyup':
case 'onload':
case 'onlosecapture':
case 'onpropertychange':
case 'onreadystatechange':
case 'onrowsdelete':
case 'onrowenter':
case 'onrowexit':
case 'onrowsinserted':
case 'onstart':
case 'onscroll':
case 'onbeforeeditfocus':
case 'onactivate':
case 'onbeforedeactivate':
case 'ondeactivate':
case 'type':
case 'codebase':
ret.objAttrs[args[i]] = args[i+1];break;case 'width':
case 'height':
case 'align':
case 'vspace':
case 'hspace':
case 'class':
case 'title':
case 'accesskey':
case 'name':
case 'id':
case 'tabindex':
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];break;default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];}}
ret.objAttrs['classid'] = classid;if(mimeType) ret.embedAttrs['type'] = mimeType;return ret;}
function AC_AX_RunContent(){var ret = AC_AX_GetArgs(arguments);AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);}
function AC_AX_GetArgs(args){var ret = new Object();ret.embedAttrs = new Object();ret.params = new Object();ret.objAttrs = new Object();for (var i=0; i < args.length; i=i+2){var currArg = args[i].toLowerCase();switch (currArg){case "pluginspage":
case "type":
case "src":
ret.embedAttrs[args[i]] = args[i+1];break;case "data":
case "codebase":
case "classid":
case "id":
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
ret.objAttrs[args[i]] = args[i+1];break;case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];break;default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];}}
return ret;}