function MyImg()
{
  this.AddImg = AddImg;
  this.GetImg = GetImg;
  this.GetNme = GetNme;
  this.timerlst = 0;

  nImg = 0; 
  maxImg = 0;
  name = "";
  imgs = new Array();

  function AddImg(path,img)
  {
    if (name == "" )	{name = img;}
    imgs[maxImg] = new Image();
    imgs[maxImg].src = path+img;
    maxImg++;
  }

  function GetImg()
  {
    if (maxImg>1) {
      nImg = (nImg +1) % maxImg;
    }
    return( imgs[nImg].src );
  }

  function GetNme()
  {
    return( name );
  }
}

nImg = -1;
imglst = new Array();
timerlst = new Array();


function initIMG( path, img ) {
  nImg++;
  imglst[nImg] = new MyImg();
  imglst[nImg].AddImg( path,img );
  doIMG( nImg );
  }

function addIMG( path, img1 ) {
  imglst[nImg].AddImg( path,img1 );
  }

function doIMG( nImg ) {
  nm = imglst[nImg].GetNme();
  document[nm].src = imglst[nImg].GetImg();
  imgs[nImg].timerlst = window.setTimeout( "doIMG( '"+nImg+"' );", 1500 );
  }

function stopIMG( nImg ) {
  window.clearTimeout( imgs[nImg].timerlst );
  }
