﻿// Copyright Malek Chtioui 2008 (Sté MONOProg)
// Site     : www.monoprog.com
// Phone    : +216-98292345
// Fax      : +216-73276669
// Mail     : admin@monoprog.com

var BWidth=-1;var NWidth;var SldSpeed=1;var C_Sld1,C_Sld2,C_Sld3;function VerifWdx(){NWidth=parseInt(C_Sld1.offsetWidth);if(BWidth!=NWidth){BWidth=NWidth;var curleft=parseInt(C_Sld1.style.left);C_Sld1.style.left=curleft+"px";C_Sld2.style.left=curleft+BWidth+"px";C_Sld3.style.left=curleft+(BWidth*2)+"px";};};function Setup_Slide(){var Cnt=$(modd1_id);var SldW=Cnt.offsetWidth+"px";var SldH=Cnt.offsetHeight+"px";var IHTML='<div align="left" style="position:relative;width:'+SldW+';height:'+SldH+';overflow:hidden">';IHTML+='<div style="position:absolute;z-index:1;width:'+SldW+';height:'+SldH+'" onMouseover="SldSpeed=0" onMouseout="SldSpeed=1">';IHTML+='<div id="XCy1" style="position:absolute;z-index:2;left:0px;top:0px"></div>';IHTML+='<div id="XCy2" style="position:absolute;z-index:3;left:-9000px;top:0px"></div>';IHTML+='<div id="XCy3" style="position:absolute;z-index:4;left:-9000px;top:0px"></div></div></div>';Cnt.innerHTML=IHTML;C_Sld1=$("XCy1");C_Sld2=$("XCy2");C_Sld3=$("XCy3");lrs=C_Sld2.innerHTML=C_Sld3.innerHTML='<nobr>'+lrs.replace(/abcggg/g,SldH)+'</nobr>';C_Sld1.innerHTML=lrs.replace(/<img/g,'<img onload="VerifWdx();" ');VerifWdx();if(modd1_dir=='l'){lefttime=setInterval("slideleft()",modd1_speed);}else{lefttime=setInterval("slideright()",modd1_speed);};};addLL(Setup_Slide);function slideleft(){if(parseInt(C_Sld1.style.left)>(BWidth*(-1)))C_Sld1.style.left=parseInt(C_Sld1.style.left)-SldSpeed+"px";else C_Sld1.style.left=(BWidth*2)+"px";if(parseInt(C_Sld2.style.left)>(BWidth*(-1)))C_Sld2.style.left=parseInt(C_Sld2.style.left)-SldSpeed+"px";else C_Sld2.style.left=(BWidth*2)+"px";if(parseInt(C_Sld3.style.left)>(BWidth*(-1)))C_Sld3.style.left=parseInt(C_Sld3.style.left)-SldSpeed+"px";else C_Sld3.style.left=(BWidth*2)+"px";};function slideright(){if(parseInt(C_Sld1.style.left)<(BWidth*2))C_Sld1.style.left=parseInt(C_Sld1.style.left)+SldSpeed+"px";else C_Sld1.style.left=(BWidth*(-1))+"px";if(parseInt(C_Sld2.style.left)<(BWidth*2))C_Sld2.style.left=parseInt(C_Sld2.style.left)+SldSpeed+"px";else C_Sld2.style.left=(BWidth*(-1))+"px";if(parseInt(C_Sld3.style.left)<(BWidth*2))C_Sld3.style.left=parseInt(C_Sld3.style.left)+SldSpeed+"px";else C_Sld3.style.left=(BWidth*(-1))+"px";};