var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";

if (navigator.plugins && navigator.plugins.length) {
  x = navigator.plugins["Shockwave Flash"];
  if (x) {
    flashinstalled = 2;
    if (x.description) {
      y = x.description;
      flashversion = y.charAt(y.indexOf('.')-1);
    }
  }
  else flashinstalled = 1;
  if (navigator.plugins["Shockwave Flash 2.0"]) {
    flashinstalled = 2;
    flashversion = 2;
  }
}
else if (navigator.mimeTypes && navigator.mimeTypes.length) {
  x = navigator.mimeTypes['application/x-shockwave-flash'];
  if (x && x.enabledPlugin) flashinstalled = 2;
  else flashinstalled = 1;
}
else MSDetect = "true";

function hideFlash () {
  document.getElementById ('blink').style.display = 'none';
}

function showContent () {
  document.body.style.backgroundColor = '#000';
  document.getElementById ('content').style.display = 'inline';
//  document.getElementById ('blink').style.display = 'none';
}

function init () {
  if (flashversion > 5) {
//    document.getElementById ('blink').style.display = 'inline';
    setTimeout ('showContent ()', 15);
  }
  else showContent ();
}

function writeFlash () {
  document.write ('<div id="blink"><object type="application/x-shockwave-flash" data="http://www.redrum.fi/wp-content/themes/default/swf/blink.swf" style="width: 100%; height: 100%"><param name="movie" value="http://www.redrum.fi/wp-content/themes/default/swf/blink.swf" /><param name="wmode" value="transparent" /><param name="scale" value="exactfit" /></object></div>');
}
