<!--
ms = "";
ms1b = "";
smIDold = "";
hmID = "";
hmIDOld = "";

function showMenu(smID,hmID){
	if (smID == "ms" && ms1b != ""){
		clearTimeout(ms1b);
		return false;
	}
	
	smIDn = smID;
	hmIDn = hmID;
	if (ms1b != ""){
		clearTimeout(ms1b);
	}
	if (smIDold != ""){
		setElement(hmIDold,0,"className","hm");
		setElement(smIDold,1,"display","none");
	}
	
	setElement(hmID,0,"className","hm hmover");
	setElement(smID,1,"display","block");
	smIDold = smID;
	hmIDold = hmID;
}

function hideMenu(){
	ms1b=setTimeout('hideMenu2()',1000);
}

function hideMenu2(){
	setElement(hmIDn,0,"className","hm");
	setElement(smIDn,1,"display","none");
}

function setElement(eID,ifStyle,funct,wert){
	if (document.getElementById){
		if (ifStyle == 1){
			var newElement = document.getElementById(eID).style;
		}
		else {
			var newElement = document.getElementById(eID);
		}
		newElement[funct] = wert;
	}
}

function getRandomNumber(x1,x2,x3) {
	rNumber = (Math.floor((Math.random()*(x2-x1+1)+x1)*Math.pow(10,x3))) / Math.pow(10,x3);
	if (rNumber > x2){
		rNumber = x2;
	}
	return rNumber;
}

//check for flash
var flashversionMin = 9;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if (plugin) {
	for (f = 0; f < 20; f++) {
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		if (plugin.description.indexOf(f+".")>=0){
			flashversion = f;
			
			if (flashversion >= flashversionMin){
				plugin = true;
				break;
			}
		}
	}
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
	document.write('<SC'+'RIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+flashversionMin+'")))\n');
	document.write('</SC'+'RIPT\> \n'); 
}

function playSWF(file,id,vars,width,height,wmode,bgcolor,baseurl,wLName) {
	fsource='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
	fsource+=' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
	fsource+=' ID='+id+' WIDTH="'+width+'"; HEIGHT="'+height+'">';
	fsource+=' <PARAM NAME="allowScriptAccess" VALUE="sameDomain" /> <PARAM NAME=movie VALUE="'+file+'"> <PARAM NAME=FlashVars VALUE="'+vars+'"> <PARAM NAME=menu VALUE=false>  <PARAM NAME="BASE" VALUE='+baseurl+'> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode value='+wmode+'> <PARAM NAME=bgcolor VALUE='+bgcolor+'>';
	if(navigator.userAgent.indexOf("Opera")==-1) {
		fsource+=' <EMBED src="'+file+'" FlashVars="'+vars+'" wmode='+wmode+' menu=false quality=high bgcolor='+bgcolor+'';
		fsource+=' swLiveConnect=FALSE allowScriptAccess="sameDomain" NAME='+id+' WIDTH="'+width+'" HEIGHT="'+height+'"';
		fsource+=' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" BASE='+baseurl+'>';
		fsource+=' </EMBED>';
	}
	else {
		fsource+=' <EMBED src="'+file+'" FlashVars="'+vars+'" wmode='+wmode+' menu=false quality=high bgcolor='+bgcolor+'';
		fsource+=' swLiveConnect=FALSE allowScriptAccess="sameDomain" ID='+id+' WIDTH="'+width+'" HEIGHT="'+height+'"';
		fsource+=' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" BASE='+baseurl+'>';
		fsource+=' </EMBED>';
	}
	fsource+=' </OBJECT>';

	if (document.getElementById){
		document.getElementById(wLName).innerHTML=fsource;
	}
}


		function showContent(x){
			x.className="hmenu ie6showContent";
		}
		
		function hideContent(x){
			x.className="hmenu ie6hideContent";
		}
		

function printPage() { 
	var sOption="scrollbars=yes,width=730,height=580,left=100,top=25"; 

	//var sWinHTML = document.getElementById('contentMainInnerLeft').innerHTML;
	var sWinHTML = document.getElementById('contentMainInner').innerHTML;
	var strBereich = document.title;
	var strBodyClass = document.body.className;
	var strBodyId = document.body.id;
      
	var winprint=window.open("","",sOption); 
       winprint.document.open(); 
       winprint.document.write('<html><title>' + document.title + '</title><link rel="stylesheet" type="text/css" href="typo3temp/stylesheet_0036a0367f.css" /><link rel="stylesheet" type="text/css" media="screen" href="/style/rewegroup.css" /><link rel="stylesheet" type="text/css" media="screen" href="/style/rewegroup_ie6.css" /><link rel="stylesheet" href="/style/rewegroup_print_js.css" type="text/css"><style type="text/css" media="screen"> .sIFR-active h1, .sIFR-active h5 { visibility: hidden; font-family: Verdana; }</style><body id="'+strBodyId+'" class="'+strBodyClass+'" onload="//window.print();">'); 
       winprint.document.write('<div style="position: relative; z-index: 10; margin: 10px 0 0 20px; width:194px;"><img src="/image/top_logo_a.png" width="194" height="64" border="0"></div>');
       winprint.document.write('<div id="contentMainInner" style="position: relative; padding-top: 10px;">'+sWinHTML+'</div>');
       winprint.document.write('<hr />');
       winprint.document.write('<div class="mainBox"><div class="left floatLeft"><strong>REWE Group-Unternehmenskommunikation</strong><br />Domstra&szlig;e 20<br />D - 50668 K&ouml;ln</div><div class="right floatLeft">Tel: +49 (0)221 -149-1050<br />Fax: +49 (0)221 -138-898<br /><br />e-mail: presse(at)rewe-group.com </div></div>');
       winprint.document.write('</body></html>');
       winprint.document.close(); 
       winprint.focus(); 
}

function recommendPage(){
	
	jQuery.fn.center = function () {
	    this.css("position","absolute");
	    this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
	    this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
	    return this;
	}

	file = '/nx_mail_recommendation.php?url='+escape(document.location)+'&title='+escape(document.title);
	
	layer = '<div class="recommendLayer">';
	layer += '<iframe frameborder="0" class="recommendFrame" src="'+ file +'" name="recommend" width="720" height="490"></iframe>';	
	layer += '</div>';		

	if(!$('.recommendLayer').length)
		$('body').append(layer);
	
	$('.recommendLayer').center();
	$('.recommendLayer').append('<a href="javascript:void(null);" onclick="closeRecommendLayer()" title=""><img class="close" src="/fileadmin/templates/main/image/close_x.jpg" alt="" /></a>');
	$('.recommendLayer').fadeIn('fast');
	
    return false;
}

function recommendPage_en(){
	
	jQuery.fn.center = function () {
	    this.css("position","absolute");
	    this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
	    this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
	    return this;
	}

	file = '/nx_mail_recommendation_en.php?url='+escape(document.location)+'&title='+escape(document.title);
	
	layer = '<div class="recommendLayer">';
	layer += '<iframe frameborder="0" class="recommendFrame" src="'+ file +'" name="recommend" width="720" height="490"></iframe>';	
	layer += '</div>';		

	if(!$('.recommendLayer').length)
		$('body').append(layer);
	
	$('.recommendLayer').center();
	$('.recommendLayer').append('<a href="javascript:void(null);" onclick="closeRecommendLayer()" title=""><img class="close" src="/fileadmin/templates/main/image/close_x.jpg" alt="" /></a>');
	$('.recommendLayer').fadeIn('fast');
	
    return false;
}

function closeRecommendLayer() {
	if ($('.recommendLayer').length) {
		$('.recommendLayer').fadeOut('fast');
		$('.recommendLayer').remove();
	}
}

//-->
