
imgcnt=0;
playcnt=0;
playpass=0;
playcolour='#ff0000';
first=1;


//JRT real code
// Start off timer etc.
//
function bCamInit() 
{
//	bCamUpdate();
   if(first)
   {
	webCamInterval = setInterval("bCamUpdate();", 250);
        imgcnt=0;
	first=0;
   }
}

function bCamUpdate()
{
   if (document["img" + imgcnt])
   {
      document["moveimg"].src=document["img" + imgcnt].src;
      imgcnt++;
      document.all['play'+playcnt].style.background=playcolour;
      
      if (imgcnt & 1) playcnt++;
      
   //if (imgcnt>=300) imgcnt=0;
   }
   else
   {
      imgcnt=0;
      playcnt=0;
      if (playpass)
      {
	playpass=0;
	playcolour='#FF0000';
      }
      else
      {
          playpass=1;
	  playcolour='#0000ff';
      }
   }
   //webCamInterval = setInterval("bCamUpdate();", 1500);
   window.status="Picture " + imgcnt;
}




