/* AUTHOR: INFO SERVICE */ /* CREATION DATE: 29/08/2005 */ var launch; var wd; var nwd; var nnwd; var stop=0; var i=0; var reset = 0; var yini=0; var dif = 0; var defil=0; var nxf = { 'clock' : null, 'count' : 1 } var lxf = { 'clock' : null, 'count' : 1 } nxf.getRealPosition = function() { this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop; this.tmp = arguments[0].offsetParent; while(this.tmp != null) { this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop; this.tmp = this.tmp.offsetParent; } return this.pos; }; lxf.getRealPosition = function() { this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop; this.tmp = arguments[0].offsetParent; while(this.tmp != null) { this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop; this.tmp = this.tmp.offsetParent; } return this.pos; }; function initnews2() { //wd = document.getElementById("imgedit").width; nwd = 745-wd-80; nnwd = 730-wd; nxf.obj = document.getElementById("debut"); lxf.obj = document.getElementById("fin"); ie=document.all?1:0 n7=document.getElementById?1:0 document.getElementById("news").style.clip = "rect(0px 170px 245px 0px)"; document.getElementById("news").style.visibility="visible"; //document.getElementById("trait").style.width=nwd+'px'; //document.getElementById("edito").style.width=nnwd+'px'; i=2; t=245; yini = (nxf.getRealPosition(nxf.obj, 'y')); yfin = (lxf.getRealPosition(lxf.obj, 'y')); dif = yfin-yini; reset=yini; document.getElementById("news").style.top=yini-106+"px"; if(dif >245) { defil = 1; //launch=setTimeout('scrollnews(0)',2000); } } function rinitnews2() { nxf.obj = document.getElementById("debut"); lxf.obj = document.getElementById("fin"); ie=document.all?1:0 n7=document.getElementById?1:0 document.getElementById("news").style.clip = "rect(0px 170px 245px 0px)"; document.getElementById("news").style.visibility="visible"; i=2; t=245; yini = (nxf.getRealPosition(nxf.obj, 'y')); yfin = (lxf.getRealPosition(lxf.obj, 'y')); dif = yfin-yini; document.getElementById("news").style.top=reset-106+"px"; if(dif >245) { defil = 1; launch=setTimeout('scrollnews2(0)',3000); } } function scrollnews2() { if (i < dif) {document.getElementById("news").style.visibility="visible";} document.getElementById("news").style.clip = "rect("+i+"px 170px "+t+"px 0px)"; var temp = parseInt(document.getElementById("news").style.top); temp-=1; temp+= "px"; document.getElementById("news").style.top = temp; i++; t++; stop=dif-245; if(i <= stop) { launch=setTimeout('scrollnews2()',25); } else { nyini = i; launch=setTimeout('rinitnews2()',3000);} }