/////////////////////////////////////////////////////////////////// // BB: AJC Multimedia // // 17-08-2007 InfoPopFNC // /////////////////////////////////////////////////////////////////// InfoPopFNC=function(){ var innerPop; var max_lng;//largeur max var max_hts;//hauteur max var vts; var divid; var divEle; var deffil; var timetoshow; var curX; var inc; } InfoPopFNC.prototype={ createPop:function(innerPop,max_largeur,max_hauteur){ if(typeof(max_largeur)=="undefined")max_largeur=220; if(typeof(max_hauteur)=="undefined")max_hauteur=120; this.inc=2; this.innerPop=innerPop;this.vts=10; this.max_lng=max_largeur;this.max_hts=max_hauteur; // Depart: haut gauche this.curX=0; this.timetoshow=5; this.deffil=1; //Direction: deffil=1, replit=-1 this.divid="newInfosPop_"+Math.random(); var divEle="
"+this.innerPop+"
"; document.write(divEle); this.divEle=document.getElementById(divEle) this.__showandhide(); }, __showandhide:function(){ var isIE=false; isIE=(navigator.userAgent.toLowerCase().indexOf('msie')>=0)?true:false; var thisdiv=document.getElementById(this.divid); var largeur =isIE ? document.body.offsetWidth-25 : window.innerWidth; var hauteur =isIE ? document.body.offsetHeight-5 : window.innerHeight; var bas =isIE ? thisdiv.offsetHeight : thisdiv.clientHeight; thisdiv.style.left=largeur-this.max_lng; thisdiv.style.top=hauteur-this.curX; thisdiv.style.height=this.curX; this.curX+=this.inc*this.deffil; var self=this; if(this.curX>=this.max_hts && this.deffil>0){this.deffil=-1;setTimeout(function(){self.__showandhide()},this.timetoshow*1000); }else{ if(this.curX<=0 && this.deffil<0){ thisdiv.style.visibility="hidden";thisdiv.style.display="none"; }else{ setTimeout(function(){self.__showandhide()},this.vts); } } } } var infopop=new InfoPopFNC(); infopop.createPop('Gagne du CASH et du HIGH TECH');