var hasViewpoint = false;
var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
pluginInfo = '';
if (navigator.plugins && navigator.plugins.length)
{
   for(z=0;z<navigator.plugins.length;z++)
   {
      pluginInfo += navigator.plugins[z].name.toLowerCase() + "<br />";
   }
   if(pluginInfo.indexOf('metastream') == '-1')
   {
       hasViewpoint = false;
   }
   else
   {
       hasViewpoint = true;
   }
}
if (browserName == 'msie') 
{
	MSDetect = "true";
	vbScriptText = '<SCR' + 'IPT LANGUAGE="VBScript">\n ';
	vbScriptText += 'on error resume next \n ';
	vbScriptText += 'If MSDetect = "true" Then \n ';
	vbScriptText += '	For i = 0 to 6 \n ';
	vbScriptText += '		If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then \n ';
	vbScriptText += '		Else \n ';
	vbScriptText += '			flashinstalled = 2 \n ';
	vbScriptText += '			flashversion = i \n ';
	//vbScriptText +='                        msgbox "flash " & i \n ';
	vbScriptText += '		End If \n ';
	vbScriptText += '                If Not(IsObject(CreateObject("AxMetaStream.MetaStreamCtl."&i))) Then \n ';
	vbScriptText += '		Else \n ';
	vbScriptText += '			metaStreamInstalled = 2 \n ';
	vbScriptText += '			flashversion = i \n ';
	//vbScriptText +='                        msgbox "mtx " & i\n ';
	vbScriptText += '		End If \n';
	vbScriptText += '                If Not(IsObject(CreateObject("AxMetaStream.MetaStreamCtlSecondary." & i))) Then \n';
	vbScriptText += '		Else\n ';
	vbScriptText += '			metaStreamInstalled = 2 \n ';
	vbScriptText += '			flashversion = i \n ';
	//vbScriptText +='                        msgbox "mtx secondary " & i \n ';
	vbScriptText += '		End If \n ';
	vbScriptText += '	Next \n ';
	vbScriptText += 'End If \n ';
	vbScriptText += 'If metaStreamInstalled = 2 Then \n ';
	vbScriptText += '	hasViewpoint = true \n ';
	vbScriptText += 'End If \n ';
	vbScriptText += '</SCR' + 'IPT>\n ';
	document.write(vbScriptText);
}
if(hasViewpoint)
{
   //alert('has viewpoint');
}
else
{
  //alert('no viewpoint');
}
