(function (SWFOBJECT, SWFADDRESS, SWFMACMOUSEWHEEL) {
	if (SWFOBJECT && SWFADDRESS) {

		if (location.pathname !== "/") {
			var replacement = (location.protocol + "//" + location.host + "/#" + location.pathname.replace((/\.[a-z]{2,}$/), "").replace((/\/produkt-uebersicht|\/service/), "") + location.hash.replace((/^#/), "\/") + "\/");
			if (location.pathname !== replacement) {
				location.replace(replacement);
			}
		} else {

			var flashvars = {
				languageFile:	"/flash/data/xml/language_de.xml",
				productFile:	"/products_de.xml",
				revision:		REVISION
			},
			params = {
				menu:			"false",
				quality:	"best",
				wmode:		"window",
				allowscriptaccess:	"always",
				allownetworking:		"all",
				seamlesstabbing:		"true"
			},
			attributes = {
				id: "stage"
			};
			SWFOBJECT.embedSWF("/flash/REWE_FeineWelt_Main.swf?"+REVISION, attributes.id, "100%", "100%", "9.0.28", "/extensions/libraries/swfobject-2.2/expressInstall.swf", flashvars, params, attributes);
/*
			SWFOBJECT.addDomLoadEvent(function () { // countercheck with line (2) as of "/extensions/libraries/allInOne.js" - s2: prevent flickering of any html-content if page is flash/javascript enabled and redirected to "SWFAddress".

				var docRoot = (document.documentElement || document.getElementsByTagName("html")[0]);
				docRoot.className = (docRoot.className + " swfApplication");
			});*/
			SWFOBJECT.addLoadEvent(function () {

				var objStage = SWFOBJECT.getObjectById(attributes.id);
				if (objStage && objStage.focus) {
					objStage.focus();
				}
				if (SWFMACMOUSEWHEEL && SWFMACMOUSEWHEEL.registerObject) {
					SWFMACMOUSEWHEEL.registerObject(attributes.id);
				}
			});
		}
	} else {
		var docRoot = (document.documentElement || document.getElementsByTagName("html")[0]);
		docRoot.className = (docRoot.className.replace((/(?:\s*|^)swfApplication(?:\s*|$)/g), " "));
	}
	delete arguments.callee;

})(swfobject, SWFAddress, swfmacmousewheel);
