
function getFlashMovieObject(movieName) {
				if (window.document[movieName])  {
					return window.document[movieName];
				}

				if (navigator.appName.indexOf("Microsoft Internet") == -1) {
					if (document.embeds && document.embeds[movieName])
						return document.embeds[movieName]; 
				} else {
					return document.getElementById(movieName);
				}
			}

			function loadVideo() {
				getFlashMovieObject("FlashApplication").SetVariable("loadVideo", "true");
			};
			function showLetter() {
				getFlashMovieObject("FlashApplication").SetVariable("flag", "true");
			}
			
			var setState = function(freeze) {
				if (navigator.appName.indexOf("Microsoft") != -1) {
					var movieID = window["FlashApplication"];
				} else {
					var movieID = document["FlashApplication"];
				}
	
				movieID.SetVariable("_root.freeze", freeze);
			};
			
			function setFlashHeight(divid, currH, newH, status){
				if(status == 3) ExpandProductFinderMask();
				else if(status == 0) ResetProductFinder();
//				window.status = divid +".height: "+ newH+"px - status="+status;
			}

//ReWe: Übergabe von flashVersions --> bitte im Body-Tag entsprechend anpassen
			function swap_init(flashVersion){
				if (flashVersion != 0){
					if(document.getElementById('productFinderFlash').attachEvent){
						document.body.attachEvent('onmousedown',closePF);
						document.getElementById('productFinderFlash').attachEvent('onmousedown',cancelEventBubbling);
					} else{
						document.body.addEventListener('mousedown',closePF,false);
						document.getElementById('productFinderFlash').addEventListener('mousedown',cancelEventBubbling,false);
					}
				}
			}
			//init(): delete this down-compatibility version when all entry.html-body-tags are updated
			function init(flashVersion){
				if (flashVersion != 0){
					if(document.getElementById('productFinderFlash').attachEvent){
						document.body.attachEvent('onmousedown',closePF);
						document.getElementById('productFinderFlash').attachEvent('onmousedown',cancelEventBubbling);
					} else{
						document.body.addEventListener('mousedown',closePF,false);
						document.getElementById('productFinderFlash').addEventListener('mousedown',cancelEventBubbling,false);
					}
				}
			}

//ReWe: auskommentiert und direkt in onLoad-Event angesprochen
//			window.onload disables onload-function within body-tag
//			if (flashVersion > 0)
//				{
//					window.onload = init;
//				}

			function cancelEventBubbling(e){
				if (!e) var e = window.event;
				e.cancelBubble = true;
				if (e.stopPropagation) e.stopPropagation();
			}


			function closePF(e){
				document.getElementById('productFinderFlash').TCallLabel('/', 'Close');
			}
			
			
			var productFinderDivHeightExpanded;
			var productFinderDivHeightCollapsed;
			var isSafari;
			var productFinderFlashId;
			var flashClicked = false;

			productFinderFlashId = "productFinderFlash";

			// If Safari use diffenert settings

//ReWe: Übergabe von flashVersions --> bitte im Body-Tag entsprechend anpassen
			function BodyClick(flashVersion)
			{
				if (flashVersion != 0)
					{
						if (!flashClicked) 
							{
								var date = new Date();
								var flash = document.getElementById(productFinderFlashId);
								flash.SetVariable("click", date.getTime());
							}
					}

				flashClicked = false;
			}

			function FlashClick()
			{
				flashClicked = true;
			}

			function ResetProductFinder()
			{
				//setState(true);
				document.getElementById("feature").style.zIndex = "10";
				if(document.getElementById("toolbar-zone") != null){document.getElementById("toolbar-zone").style.zIndex = "7";}
				document.getElementById("productFinder").style.zIndex = "5";
			}

			function ExpandProductFinderMask()
			{
				//setState(false);
				document.getElementById("feature").style.zIndex = "5";
				if(document.getElementById("toolbar-zone") != null){document.getElementById("toolbar-zone").style.zIndex = "7";}
				document.getElementById("productFinder").style.zIndex = "10";
			}