adPave_id_banniere = 29721; adPopup_id_banniere = 28590; adSky_id_banniere = 29723; adTop_id_banniere = 29722; client_height = ""; MyTop=""; madiv=""; function kill_adPopup(){ try {clearTimeout(chronopub);} catch (ex){}; try {clearTimeout(timerMoveAd);} catch (ex){}; try {document.getElementById('pub_adPopup').style.visibility='hidden';} catch (ex){}; try {document.getElementById('adPopup').style.visibility='hidden';} catch (ex){}; try {document.getElementById('fondadPopup').style.visibility='hidden';} catch (ex){}; try {document.getElementById('adPopup').style.top='-1000px';} catch (ex){}; } var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1; function ad_DoFSCommand(command, args) { var adObj = InternetExplorer ? ad : document.ad; if (command == 'kill_adPopup') kill_adPopup(); } if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) { document.write(' \n'); document.write('on error resume next \n'); document.write('Sub ad_FSCommand(ByVal command, ByVal args)\n'); document.write(' call ad_DoFSCommand(command, args)\n'); document.write('end sub\n'); document.write(' \n') } var titreadPopup = document.createElement('div'); titreadPopup.setAttribute('name', 'titreadPopup'); titreadPopup.setAttribute('id', 'titreadPopup'); if (document.all) { titreadPopup.style.setAttribute("cssText", 'background-color: black; position: relative; float: left; height:14px; width:2000px;'); } else { titreadPopup.setAttribute('style', 'background-color: black; position: relative; float: left; height:14px; width:2000px;'); } var lienadPopup = document.createElement('div'); lienadPopup.setAttribute('name', 'lienadPopup'); lienadPopup.setAttribute('id', 'lienadPopup'); lienadPopup.onClick="kill_adPopup()"; lienadPopup.onMouseOver="style.cursor='hand';"; lienadPopup.onMouseOut="style.cursor='default';"; if (document.all) { lienadPopup.style.setAttribute("cssText", 'background-color: black; position: relative; float: right; height:14px; width:60px; font-family: Verdana; color: Black; font-weight: bold; text-decoration: underline;'); lienadPopup.setAttribute('innerHTML', '\"fermer\"'); } else { lienadPopup.setAttribute("style", 'background-color: black; position: relative; float: right; height:14px; width:60px; font-family: Verdana; color: Black; font-weight: bold; text-decoration: underline;'); lienadPopup.innerHTML='\"fermer\"'; } titreadPopup.appendChild(lienadPopup); function ShowAdPopup(){ try { var PosTopDivAdPopup = document.documentElement.clientHeight - (2000 + 150) ; $("#adPopup").css("position","absolute"); $("#adPopup").css("top",PosTopDivAdPopup); $("#adPopup").css("left",-2000); $("#adPopup").css("z-index","501"); if (navigator.userAgent.indexOf("MSIE") > 0) { $("#adPopup").css("width","2012px"); } else { $("#adPopup").css("width","2012px"); } $("#adPopup").css("height","2002px"); } catch (ex){}; } function ShowAd(){ alert("ShowAd()"); try { madiv=document.getElementById('adPopup'); if (client_height == "") { //client_height = document.body.clientHeight; client_height = document.documentElement.clientHeight; } } catch (ex){}; //alert("position_top : "+position_top+"\n"+"position_left : "+position_left); if (document.all) { try { document.getElementById('adPopup').style.setAttribute("cssText", 'position:absolute; top:'+position_top+'px; left:'+position_left+'px; z-index:501; width:2000px; height:2000px;');//border : thin solid Black; } catch (ex){}; } else { try { document.getElementById('adPopup').setAttribute('style', 'position:absolute; top:'+position_top+'px; left:'+position_left+'px; z-index:501; width:2000px; height:2000px;');//border : thin solid Black; } catch (ex){}; } } function MoveAd() { madiv=document.getElementById('adPopup'); if (MyTop == "") { MyTop=madiv.style.top.substring(0,madiv.style.top.length-2); } if (client_height == "") { //client_height = document.body.clientHeight; client_height = document.documentElement.clientHeight; } MyTop = MyTop - 5; madiv.style.top=Number(MyTop)+'px'; timerMoveAd=setTimeout('MoveAd()',10); if (MyTop <= (client_height - 2000 - 14 - 10)) { clearTimeout(timerMoveAd); } } function adserver(slot){ switch (slot) { case 'adPave' : var ladiv = document.getElementById('adPave'); if (ladiv != null) { try { position_top = 0; } catch (aaae){ position_top = 0; } try { position_left = 0; } catch (bbbe){ position_left = 100; } document.write(''); ladiv.style.visibility='visible'; var ladivdefond = document.getElementById('fondadPave'); if (ladivdefond != null) { ladivdefond.style.visibility='visible'; } } break; case 'adPopup' : var ladiv = document.getElementById('adPopup'); if (ladiv != null) { try { position_top = 0; } catch (aaae){ position_top = 0; } try { position_left = 0; } catch (bbbe){ position_left = 100; } //alert("position left : "+position_left+"\n"+"position top : "+position_top); ShowAdPopup(); //chronopub = setTimeout("kill_adPopup()", 20000); document.write(''); ladiv.style.visibility='visible'; var ladivdefond = document.getElementById('fondadPopup'); if (ladivdefond != null) { ladivdefond.style.visibility='visible'; } } break; case 'adSky' : var ladiv = document.getElementById('adSky'); if (ladiv != null) { try { position_top = 0; } catch (aaae){ position_top = 0; } try { position_left = 0; } catch (bbbe){ position_left = 100; } document.write(''); ladiv.style.visibility='visible'; var ladivdefond = document.getElementById('fondadSky'); if (ladivdefond != null) { ladivdefond.style.visibility='visible'; } } break; case 'adTop' : var ladiv = document.getElementById('adTop'); if (ladiv != null) { try { position_top = 0; } catch (aaae){ position_top = 0; } try { position_left = 0; } catch (bbbe){ position_left = 100; } document.write(''); ladiv.style.visibility='visible'; var ladivdefond = document.getElementById('fondadTop'); if (ladivdefond != null) { ladivdefond.style.visibility='visible'; } } break; default : document.write(''); break; } } function sendlog(divname,pageurl){ var ifrm_debug = document.getElementById('debugframe'); if (ifrm_debug == null) { ifrm_debug = document.createElement('iframe'); } ifrm_debug = document.createElement('iframe'); ifrm_debug.setAttribute('src', 'http://ww2.affilcenter.com/bandeaux/logerreur.cfm?divname='+divname+'&pageurl='+pageurl+'&rand=5375028'); ifrm_debug.setAttribute('name', 'debugframe'); ifrm_debug.setAttribute('id', 'debugframe'); ifrm_debug.setAttribute('width', '1px'); ifrm_debug.setAttribute('height', '1px'); ifrm_debug.setAttribute('frameBorder', '0'); ifrm_debug.setAttribute('scrolling', 'No'); ifrm_debug.setAttribute('allowTransparency', 'true'); ifrm_debug.setAttribute('visible', 'false'); document.body.appendChild(ifrm_debug); } function checkdivsexists(){ var ladiv = document.getElementById('adPave'); if (ladiv == null) { sendlog('adPave',''); } var ladiv = document.getElementById('adPopup'); if (ladiv == null) { sendlog('adPopup',''); } var ladiv = document.getElementById('adSky'); if (ladiv == null) { sendlog('adSky',''); } var ladiv = document.getElementById('adTop'); if (ladiv == null) { sendlog('adTop',''); } } function Add_Event( obj_, event_, func_, mode_){ if( obj_.addEventListener) obj_.addEventListener( event_, func_, mode_? mode_:false); else obj_.attachEvent( 'on'+event_, func_); } Add_Event(window,'load',checkdivsexists);