var nIndex = 0;var d=document;var nMaxIndex;var nStart=0;var bRotate;var nTimerID = null;var fTimeOut = 2000 / 8.0;var picArray = new Array();function preloadRotation(szPath, nMax, szExt) {  if(d.images) {     nMaxIndex = nMax + 1;    var i;    for(i=0; i<nMaxIndex; i++) {       picArray [i]=new Image;      if (i<10) {        szName = szPath + '0';      } else {        szName = szPath;      }      picArray[i].src=szName + i + '.' + szExt;      }  bRotate = 1;  nTimerID = setTimeout('rotate()',fTimeOut)  }}function rotate() {    if (bRotate==1)  {   clearTimeout(nTimerID);  nIndex = (nIndex + 1) % nMaxIndex;  if (document.layers) window.document.layers.divrotate.document.images.Car3D.src = picArray[nIndex].src;  if (!document.layers) window.document.all.Car3D.src = picArray[nIndex].src;  if (nIndex==0) {bRotate=0;}  nTimerID = setTimeout('rotate()',fTimeOut);  }}function stopRotateManual() {  if (bRotate != 1) clearTimeout(nTimerID);}function startRotate() {  if (bRotate != 1) {    bRotate = 1;     clearTimeout(nTimerID);    nTimerID = setTimeout('rotate()',fTimeOut);  }}function rotateManual(nDir){  clearTimeout(nTimerID);  nIndex = (nIndex + nMaxIndex + nDir) % nMaxIndex;  if (document.layers) window.document.layers.divrotate.document.images.Car3D.src = picArray[nIndex].src;  if (!document.layers) window.document.images.Car3D.src = picArray[nIndex].src;  bRotate = 0;  szAction = 'rotateManual(' + nDir + ')';  nTimerID = setTimeout(szAction,fTimeOut);}
