function swf(_element, _id, _class, _src, _width, _height, _bgcolor) { 
  if (hasFlashPlayer8()) {
    if (document.getElementById) {
      var element = document.getElementById(_element);
    }

    if (element) { 
      var xhtml = ''; 
      if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { 
        xhtml += '<embed wmode="transparent"';
        xhtml += ' id="' + _id + '"';
        xhtml += ' class="' + _class + '"';
        xhtml += ' src="' + _src + '"';
        xhtml += ' type="application/x-shockwave-flash"';
        xhtml += ' width="' + _width + '"';
        xhtml += ' height="' + _height + '"';
        xhtml += ' bgcolor="' + _bgcolor + '"';
        xhtml += ' allowScriptAccess="sameDomain"';
        xhtml += '></embed>';
      } else { 
        xhtml += '<object';
        xhtml += ' id="' + _id + '"';
        xhtml += ' class="' + _class + '"';
        xhtml += ' src="' + _src + '"';
        xhtml += ' type="application/x-shockwave-flash"';
        xhtml += ' width="' + _width + '"';
        xhtml += ' height="' + _height + '"';
        xhtml += '>';
        xhtml += '<param name="movie" value="' + _src + '" />';
        xhtml += '<param name="allowScriptAccess" value="sameDomain" />';
        xhtml += '<param name="bgcolor" value="' + _bgcolor + '" />';
        xhtml += '<param name="wmode" value="transparent" />';
        xhtml += '</object>';
	  }
      element.innerHTML = xhtml;
      return true;
    }
  }
  return false; 

}

function hasFlashPlayer8() {
  var majorVersion;
  if (typeof(navigator.plugins['Shockwave Flash']) == 'object') {
    var description = navigator.plugins['Shockwave Flash'].description;
    majorVersion = description.substr(16, (description.indexOf('.', 16) - 16));
  } else if (typeof(ActiveXObject) == "function") {
    try {
      if (typeof(new ActiveXObject('ShockwaveFlash.ShockwaveFlash.8')) == 'object') {
        var fp8 = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.8');
        fp8.AllowScriptAccess = 'sameDomain';
        majorVersion = fp8.GetVariable('$version').split(' ')[1].split(',')[0];
      }
    }
    catch(error) {
    }
  } 
  if (parseInt(majorVersion) >= 8) {
    return true;
  } else {
    return false;
  }
}

function popup(url) 
{
 var width  = 500;
 var height = 420;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=no';
 params += ', status=no';
 params += ', toolbar=no';
 newwin = window.open(url, 'windowname5', params);
 if (window.focus) { newwin.focus() }
 return false;
}

function showVideo() {
	var element = document.getElementById('OVERLAY');
	if (element.style.display == "none" || element.style.display == "") {
		element.style.display = "block";
		xhtml  = "";
		xhtml += "<table width='100%' height='100%'><tr><td align='center' valign='middle' width='100%' height='100%'>";
		xhtml += '<div id="OVERLAY_SWF"></div>';
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { 
			xhtml += '<embed';
			xhtml += ' class="OL_SWF"';
			xhtml += ' src="/app/swf/SEGURES.swf"';
			xhtml += ' type="application/x-shockwave-flash"';
			xhtml += ' width="640"';
			xhtml += ' height="360"';
			xhtml += ' bgcolor="#000000"';
			//xhtml += ' wmode="transparent"';
			xhtml += ' scale="noScale"';
			xhtml += ' salign="TL"';
			xhtml += ' allowScriptAccess="sameDomain"';
			xhtml += '></embed>';
		} else { 
			xhtml += '<object';
			xhtml += ' class="OL_SWF"';
			xhtml += ' src="/app/swf/SEGURES.swf"';
			xhtml += ' type="application/x-shockwave-flash"';
			xhtml += ' width="640"';
			xhtml += ' height="360"';
			xhtml += '>';
			xhtml += '<param name="movie" value="/app/swf/SEGURES.swf" />';
			xhtml += '<param name="allowScriptAccess" value="sameDomain" />';
			xhtml += '<param name="bgcolor" value="#000000" />';
			xhtml += '<param name="scale" value="noScale" />';
			xhtml += '<param name="salign" value="TL" />';
			//xhtml += '<param name="wmode" value="transparent" />';
			xhtml += '</object>';
		}
		//xhtml += swf_xhtml;
		xhtml += "<br /><br /><a href='#' onclick='return showVideo();'><span style='color: #FFF;'>Fenster schlie&szlig;en</span></a>";
		xhtml += "</td></tr></table>";
		element.innerHTML = xhtml;
	} else {
		element.style.display = "none";
		element.innerHTML = '';
	}
	return false;
}
function showVideo2() {
	var element = document.getElementById('OVERLAY');
	if (element.style.display == "none" || element.style.display == "") {
		element.style.display = "block";
		xhtml  = "";
		xhtml += "<table width='100%' height='100%'><tr><td align='center' valign='middle' width='100%' height='100%'>";
		xhtml += '<div id="OVERLAY_SWF"></div>';
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { 
			xhtml += '<embed';
			xhtml += ' class="OL_SWF"';
			xhtml += ' src="/app/swf/techtextil.swf"';
			xhtml += ' type="application/x-shockwave-flash"';
			xhtml += ' width="640"';
			xhtml += ' height="360"';
			xhtml += ' bgcolor="#000000"';
			//xhtml += ' wmode="transparent"';
			xhtml += ' scale="noScale"';
			xhtml += ' salign="TL"';
			xhtml += ' allowScriptAccess="sameDomain"';
			xhtml += '></embed>';
		} else { 
			xhtml += '<object';
			xhtml += ' class="OL_SWF"';
			xhtml += ' src="/app/swf/techtextil.swf"';
			xhtml += ' type="application/x-shockwave-flash"';
			xhtml += ' width="640"';
			xhtml += ' height="360"';
			xhtml += '>';
			xhtml += '<param name="movie" value="/app/swf/techtextil.swf" />';
			xhtml += '<param name="allowScriptAccess" value="sameDomain" />';
			xhtml += '<param name="bgcolor" value="#000000" />';
			xhtml += '<param name="scale" value="noScale" />';
			xhtml += '<param name="salign" value="TL" />';
			//xhtml += '<param name="wmode" value="transparent" />';
			xhtml += '</object>';
		}
		//xhtml += swf_xhtml;
		xhtml += "<br /><br /><a href='#' onclick='return showVideo2();'><span style='color: #FFF;'>Fenster schlie&szlig;en</span></a>";
		xhtml += "</td></tr></table>";
		element.innerHTML = xhtml;
	} else {
		element.style.display = "none";
		element.innerHTML = '';
	}
	return false;
}
