function VmpVmcInstall()
{
  var _this = this;
  var installTicks = 0;

  this.start = function()
  {
    VmpVmcInstall.startTicks = getTicks();
    if (VmpVmcInstall.doInstall)
    {
      enableHourGlass();
      if (false) // !Project.isInstalled())
      {
	setStatusClockEnabled(false);
	windowStatus('[' + installTicks + ']loading mediaEngine...');
	installTicks++;
	Project.Install();
	setTimeout(_this.start._bind(_this),1000);
      }
      else
      {
	windowStatus('');
	installTicks = 0;
	preChatInit();
	this.start2();
      }
    }
    else
    {
      enableChatInstall = false;
      jChatInstallationComplete = true;
      preChatInit();
      this.start2(); // setTimeout(_this.start2._bind(_this),5000);
    }
  }

  this.start2 = function()
  {
    if (!jChatInstallationComplete)
    {
      setStatusClockEnabled(false);
      windowStatus('[' + installTicks + ']loading chat...');
      installTicks++;
      setTimeout(_this.start2._bind(_this),1000);
    }
    else
    {
//      startCaptureApplet();
//      setTimeout(_this.start2b._bind(_this),1000);
      FileUtil.theInstance();
      if (VmpVmcInstall.captureAppletEnabled)
      {
	if (Cvm.isFvMode())
        {
	  var appspec = AVDevice.setDefaultAppspec();
	  appspec.setParameter("width",FvDefaults.recordWidth);
	  appspec.setParameter("height",FvDefaults.recordHeight);
	}

	AVDevice.Install(VmpVmcInstall.Callback);
      }
      else
      {	
	VmpVmcInstall.captureAppletStarted = true;
      }
      this.start3();
    }
  }

  this.start3 = function()
  {
    if (!VmpVmcInstall.captureAppletStarted)
    {
      setStatusClockEnabled(false);
      windowStatus('[' + installTicks + ']loading capture applet...');
      installTicks++;
      setTimeout(_this.start3._bind(_this),1000);
    }
    else
    {
	windowStatus('');
	startActors();
	if (typeof vmpInit != 'undefined') vmpInit();
    }
  }

}

VmpVmcInstall.captureAppletStarted = false;
VmpVmcInstall.Callback = function(applet)
{
  VmpVmcInstall.captureAppletStarted = true;
  cameraCaptureDocument = applet; //TODO EAO live or die? - leave it to keep Actor happy for now
}

VmpVmcInstall.doInstall = true;
VmpVmcInstall.captureAppletEnabled = true;

