var browser=0; var tetraConfs=new Array; if (window.XMLHttpRequest) browser=1; else if (window.ActiveXObject) { browser=2; try { req=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { browser=-1; } if (!req) browser=-1; req=0; } else browser=-1; function TetraMakeConf(name, url, allowUrlChange, origItemCount, boxSize, itemSize, gap, direction, itemDelay, stepDelay, stepSize, refreshDelay ) { if (!browser) return; var sign=0; if ((direction=='L2R')||(direction=='T2B')) sign=1; else if ((direction=='R2L')||(direction=='B2T')) sign=-1; if (sign) { if (browser==-1) url=''; var icount=0; var moving=0; var ishoriz=(direction.indexOf('T')>-1)?0:1; var fullSize=itemSize+gap; var iatonce=Math.ceil(boxSize/fullSize)+1; var posinc=stepSize*sign; var firstpos=fullSize*(0-sign)*((sign==-1)?(iatonce-1):1); var lastposinc=(fullSize%stepSize)*sign; var lastpos=firstpos+(sign*fullSize*(iatonce-1))-lastposinc; var visstopped=0; if (origItemCount) { icount=origItemCount; visstopped=(icounts[26])?s[26]:(s[10]-1); for (var i=olditemcount;i0)?1:-1; var thispos; var thisname; s[16]=new Array; var o=''; var fullSize=s[3]+s[4]; var finalpos=s[13]+s[14]; for (var i=0;i'; } document.getElementById(s[0]+'case').innerHTML=o; if (s[24]) { var newURL=s[17].responseXML.getElementsByTagName('url'); if (newURL.length) { newURL=newURL[0].firstChild.nodeValue; s[1]=(newURL==':')?'':newURL; } } if (s[1].length) setTimeout('TetraRequestXML("'+s[0]+'");',s[20]*1000); s[17]=s[23]=0; if (waitAfter) TetraWaitToScroll(s[0],0); else TetraResume(s[0],2); } function TetraPause(confName) { if (!browser) return; var s=eval(confName); if (!s) return; s[9]|=1; } function TetraResume(confName,why) { if (!browser) return; var s=eval(confName); if (!s) return; if (why) s[9]&=(127-why); if (TetraCanScroll(confName)&&!s[15]) { if (!s[9]) s[15]=setTimeout('TetraStep("'+confName+'");',s[7]); else if ((why==1)&&(s[9]&2)) s[15]=setTimeout('TetraStartScroll("'+confName+'");',s[7]); } } function TetraStep(confName) { var s=eval(confName); s[15]=0; if (s[9]) return; if (s[16][1][1]==s[13]) { for (var i=0;i=s[10])||(s[19]>=(s[10]+s[16][0][2]+s[27])); } function TetraStartScroll(confName) { if (!browser) return; var s=eval(confName); s[15]=0; if (s[9]&1) return; s[9]&=(127-2); if (s[23]) TetraWaitToProcessXML(confName); else { if (s[27]&&TetraCanScroll(confName)) { var nextNum=s[16][s[10]-1][2]+1; if (nextNum==s[19]) nextNum=s[11]; for (var i=1;i