// avoids text flickering while flash loads
if (document.getElementById) {
  // if flash is not installed, dont hide the text
  if (hasFlash()) { 
    createStyleRule("#content", "visibility:hidden;");
    // change position of flash container
    createStyleRule("#bespr", "top:195px;");
    createStyleRule("#bespr", "left:270px;");
  }
  
  var FO = { movie:"/swf/intro.swf", width:"586", height:"300", majorversion:"7", build:"0", wmode:"Transparent", base:"/design/home/" };
  UFO.create(FO, "bespr");
}

function removeFlash() {
  // remove the flash again
  var node = document.getElementById('bespr');
  node.parentNode.removeChild(node);
}

// gets called from flash
function showText() {
  // text wieder sichtbar machen
  createStyleRule("#content", "visibility:visible;");
}

function hasFlash() { 
	if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") {
        return true;
	}
	else if (window.ActiveXObject) {
		try { // avoid fp 6 crashes
			var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}
		catch(e) {
			try { 
				var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				_a.AllowScriptAccess = "always"; // throws if fp < 6.47 
			}
            catch(e) {}
			try {
				var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			}
			catch(e) {}
		}
		if (typeof _a == "object") {
			return true;
		}
	}
    return false;
}
