var AD_timerCloseAll=0,AD_timerCloseAd=0,AD_timerRido=0,AD_timerFade=0,AD_opacity=0,AD_closedAd=0; var AD_windowWidth=0,AD_windowHeight=0; var AD_swapDiv='ADIMG'; var AD_layers=new Array('ADHEAD','ADIMG'); /***************** redirect *****************/ myreg=new RegExp("lycos\.fr","i"); if ( !myreg.test("'"+top.location+"'") ) { nwreg=new RegExp ("http://([^/]+)?(/([a-z0-9A-Z\-\_]+)?[^']+)","i"); rn=nwreg.exec("'"+self.location+"'"); if (parent.frames.length==2) { top.location="http://" + rn[1] + rn[2]; } else { top.location="http://" + rn[1] + "/" + rn[3]; } } /***************** frameset *****************/ function AD_clientWindowSize() { var sfMax=0; var sf,frameMax; var ad=1; if (self.innerWidth) { AD_windowWidth=self.innerWidth; AD_windowHeight=self.innerHeight; } else if (document.documentElement && document.documentElement.clientWidth) { AD_windowWidth=document.documentElement.clientWidth; AD_windowHeight=document.documentElement.clientHeight; } else if (document.body) { AD_windowWidth=document.body.clientWidth; AD_windowHeight=document.body.clientHeight; } if (document.layers||navigator.userAgent.toLowerCase().indexOf("gecko")>=0) AD_windowWidth-=16; if ( top !=self || top.frames.length !=0 ) { ad=0; if (document.all) { sf=(top.document.body.clientWidth * top.document.body.clientHeight) / (self.document.body.clientWidth * self.document.body.clientHeight); if (sf<3) { ad=1; } } else { function getSurface(w) { if (!w.sf) w.sf=w.innerWidth * w.innerHeight; if (w.sf >=sfMax) { sfMax=w.sf; frameMax=w; } } function findFrameMax(w) { var i; if (w.frames.length==0) getSurface(w); else for (i=0; i < w.frames.length; i++) { if (w.frames[i].frames.length > 0) { findFrameMax(w.frames[i]); } else { getSurface(w.frames[i]); } } } if ((top !=self) || (top.frames.length==0)) { findFrameMax(top); if (frameMax==self) ad=1; } } } if (AD_windowWidth<480) ad=0; if (AD_windowHeight<80) ad=0; return ad; } /***************** layers functions *****************/ function AD_findObj(n, d) { var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i0) { AD_timerFade=setTimeout('AD_fade('+fadeStep+')',100); } } } function AD_setPos(layer,left,top) { var obj=AD_findObj(layer); if (obj.style) { if (document.all) { if (left!='') obj.style.pixelLeft=left; if (top!='') obj.style.pixelTop=top; } else { if (left!='') obj.style.left=left; if (top!='') obj.style.top=top; } } else { if (left!='') obj.left=left; if (top!='') obj.top=top; } } function AD_rido(i,bound,way) { if (AD_timerRido) clearTimeout(AD_timerRido); else AD_showHideLayers('ADCLOSE','hide','ADHEAD','show',AD_swapDiv,'show'); if (i>bound) i=bound; switch (way) { case 1: AD_setPos(AD_swapDiv,AD_windowWidth-i,''); break; case 2: AD_setPos(AD_swapDiv,'',i); break; case 3: AD_setPos(AD_swapDiv,i,''); break; case 4: AD_setPos(AD_swapDiv,'',AD_windowHeight-i); break; } if (i!=bound) AD_timerRido=setTimeout("AD_rido("+(i+15)+","+bound+","+way+")",10); } /***************** events *****************/ function AD_closeAll() { if (AD_timerCloseAll) clearTimeout(AD_timerCloseAll); if (AD_timerCloseAd) clearTimeout(AD_timerCloseAd); AD_showHideLayers(AD_swapDiv,'hide','ADHEAD','hide','ADCLOSE','hide'); AD_closedAd=2; } function AD_close() { if (AD_timerFade) clearTimeout(AD_timerFade); if (AD_timerRido) clearTimeout(AD_timerRido); if (AD_timerCloseAll) clearTimeout(AD_timerCloseAll); if (AD_timerCloseAd) clearTimeout(AD_timerCloseAd); AD_showHideLayers(AD_swapDiv,'hide','ADHEAD','hide','ADCLOSE','show'); AD_timerCloseAll=setTimeout("AD_closeAll()",10000); AD_closedAd=1; } function AD_closeWarning() { if (AD_swapDiv!='ADIMG') { AD_showHideLayers(AD_swapDiv,'hide'); if (AD_closedAd==0) AD_showHideLayers('ADIMG','show'); AD_swapDiv='ADIMG'; } } function AD_start() { AD_closedAd=0; if (AD_timerStart) clearTimeout(AD_timerStart); AD_showHideLayers('ADCLOSE','hide','ADHEAD','show',AD_swapDiv,'show'); if (AD_timerFade) clearTimeout(AD_timerFade); if (AD_timerCloseAll) clearTimeout(AD_timerCloseAll); if (AD_timerCloseAd) clearTimeout(AD_timerCloseAd); AD_timerCloseAd=setTimeout("AD_close()",10000); } function AD_reloadPage(init) { //reloads the window if NS4 resized if (init==true) with (navigator) { if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.pgW=innerWidth; document.pgH=innerHeight; onresize=AD_reloadPage; } } else if (innerWidth!=document.pgW || innerHeight!=document.pgH) { if (AD_closedAd==0) location.reload(); } if (AD_clientWindowSize) { AD_setPos('ADCLOSE',AD_windowWidth-300,''); AD_setPos('ADIMG',AD_windowWidth-491,''); } } /***************** init layers *****************/ function AD_drawLayers() { document.writeln('\n'); document.writeln(''); document.writeln(''); // skin 0 document.writeln(''); AD_reloadPage(true); AD_timerStart=setTimeout("AD_start()",500); } if (AD_clientWindowSize()) AD_drawLayers();