var NrxTagBegin;
var NrxTagEnd;
var NrxParam;

function NrxDetectJS(name,desc)
{
  if(navigator.mimeTypes[name] && navigator.mimeTypes[name].enabledPlugin)
  {
    loop=navigator.plugins.length;
    while(loop--)
      if(navigator.plugins[loop].name.indexOf(desc)!=-1 || navigator.plugins[loop].description.indexOf(desc)!=-1)
        return(1);
  }
  return(0);
}

NrxParam=65606;

if(navigator.userAgent.indexOf('MSIE')!=-1 && navigator.userAgent.indexOf('Win')!=-1)
{
  document.write(
  '<'+'script language="VBScript">\n'+

  'function NrxDetectVB(name)\n'+
    'on error resume next\n'+
    'NrxDetectVB=IsObject(CreateObject(name))\n'+
  'end function\n'+

  'on error resume next\n'+
  'if ScriptEngineMajorVersion>1 then\n'+

    'if NrxDetectVB("ShockwaveFlash.ShockwaveFlash.5") then\n'+
      'NrxParam=NrxParam or 152\n'+
    'elseif NrxDetectVB("ShockwaveFlash.ShockwaveFlash.4") then\n'+
      'NrxParam=NrxParam or 24\n'+
    'elseif NrxDetectVB("ShockwaveFlash.ShockwaveFlash") then\n'+
      'NrxParam=NrxParam or 8\n'+
    'end if\n'+

    'if NrxDetectVB("rmocx.RealPlayer G2 Control") then\n'+
      'NrxParam=NrxParam or 768\n'+
    'elseif NrxDetectVB("RealVideo.RealVideo(tm) ActiveX Control (32-bit)") then\n'+
      'NrxParam=NrxParam or 256\n'+
    'end if\n'+

    'if NrxDetectVB("MediaPlayer.MediaPlayer.1") then\n'+
      'NrxParam=NrxParam or 1024\n'+
    'end if\n'+

    'set NrxObject=CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")\n'+
    'if IsObject(NrxObject) then\n'+
      'if NrxObject.IsQuickTimeAvailable(0) then\n'+
        'if Left(Cstr(Hex(NrxObject.QuickTimeVersion)),1)="5" then\n'+
          'NrxParam=NrxParam or 12288\n'+
        'else\n'+
          'NrxParam=NrxParam or 4096\n'+
        'end if\n'+
      'end if\n'+
    'end if\n'+

  'end if\n'+
  '<'+'/script>'
  );
}
else if(navigator.plugins && navigator.mimeTypes)
{
  if(NrxDetectJS('application/x-shockwave-flash','Flash 5'))
    NrxParam|=152;
  else if(NrxDetectJS('application/x-shockwave-flash','Flash 4'))
    NrxParam|=24;
  else if(NrxDetectJS('application/x-shockwave-flash','Flash'))
    NrxParam|=8;

  if(NrxDetectJS('audio/x-pn-realaudio-plugin','RealPlayer(tm) G2'))
    NrxParam|=768;
  else if(NrxDetectJS('audio/x-pn-realaudio-plugin','RealVideo'))
    NrxParam|=256;

  if(NrxDetectJS('application/x-mplayer2','Media Player'))
    NrxParam|=3072;
  else if(NrxDetectJS('video/x-ms-wmv','Media Player'))
    NrxParam|=1024;

  if(NrxDetectJS('video/quicktime','QuickTime Plug-in 5.0'))
    NrxParam|=12288;
  else if(NrxDetectJS('video/quicktime','QuickTime'))
    NrxParam|=4096;
}

if(navigator.javaEnabled())
  NrxParam|=16384;

NrxTagBegin='<'+'script language="JavaScript" src="http://reply.dciserver.com/replies/server_scripts/display.php?param='+NrxParam+'&referrer='+escape(document.referrer)+'&time=';
NrxTagEnd='><'+'/script>';

function NrxTag(parameters)
{
  document.write(NrxTagBegin+(new Date()).getTime()+parameters+NrxTagEnd);
}
