
//Install Script
var installed;
var userAgent;
userAgent=window.navigator.userAgent;
if(userAgent.indexOf("Windows") >= 0){
if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length){
installed = IsInstalled();
if (installed == false)
{
try{
 xpi={'Eurora3D Plug-in':'http://www.eurora3d.com/eurora3dinst/Eurora3D.xpi'}; 
 InstallTrigger.install(xpi,xpinstallCallback);
}
catch(e)
{
alert("Users without auto XPI installation support have to download zip file http://www.eurora3d/eurora3dinst/Eurora3DPluginOpera.zip and manually install. You have instructions included.");
window.location.replace("http://www.eurora3d.com/eurora3dinst/Eurora3DPluginOpera.zip");
}
}
}
}

function xpinstallCallback(url, status)
{
if (status == 0)
  {
  setTimeout('ReloadMe()',500);
  }
else
  {
   msg = "Installing Eurora3D Plug-in : FAILED\n";
   dump(msg);
   alert(msg);
  }
}

function IsInstalled()
{
if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length){
navigator.plugins.refresh();
var x = navigator.plugins["Eurora3D Plug-in"];
if(x && x.description)
   return true;
else
   return false;
}
}

function ReloadMe()
{
installed = IsInstalled();
 if (installed == true)
     window.location.reload();
}

function IEShell()
{
alert("IE Users: Please install our security certificate and refresh this page after that.");
window.location.replace("http://www.eurora3d.com/eurora3dinst/Eurora3D.cer");
}