
  var

    // WizExplorerApp
    objApp = WizExplorerApp,
    objCUI = objApp.CreateWizObject ("WizKMControls.WizCommonUI"),

    // get current Plugin path
    pluginPath = objApp.CurPluginAppPath,

    // check LCID to help us get the correct localization language
    lcid = '_' + objApp.LoadStringFromFile (pluginPath + 'plugin.ini', 'LCID_CHECK');

  if (_get ('openMode') == 0)
    objApp.Window.ShowHtmlDialogEx(true, _p (0, 'Caption'), pluginPath + 'index.html', 440, 500, '', null, null);

  else
    objApp.Window.ViewHtml (pluginPath + 'index.html', true);


  function _get (stringName) {
    return objCUI.GetValueFromIni (pluginPath + 'plugin.ini', 'PluginConfig_0', stringName);
  }

  function _p (index, stringName) {
    return ((txt = objCUI.GetValueFromIni (pluginPath + 'plugin.ini', 'Plugin_' + index, stringName + lcid)) == '') && lcid != '' ? objCUI.GetValueFromIni (pluginPath + 'plugin.ini', 'Plugin_' + index, stringName) : txt;
  };
