//afp41
var afpl = false;function gpd(dv,wh){absV=0;calV=parseInt(dv);calV=(calV<1)?1:(calV>100)?100:calV;absV=Math.round((calV * (eval('screen.'+wh)/100)));return absV;}function gsc(wh){cp = Math.round(eval('screen.'+wh+'-openPopup_'+wh)/2);return cp;}function pps(){aa=arguments[0].split(',');rs=',left='+aa[0]+',top='+aa[1];return rs;}function wps(){aa=arguments[0].split(',');sb=false;tb=false;st=false;lb=false;di=false;mb=false;rz=false;for (i=0;i<aa.length;i++){sb = (aa[i].indexOf('scrollbars') != -1)? aa[i]:(!sb)? 'scrollbars=no':sb;tb = (aa[i].indexOf('toolbar') != -1)? aa[i]:(!tb)? 'toolbar=no':tb;st = (aa[i].indexOf('status') != -1)? aa[i]:(!st)? 'status=no':st;lb = (aa[i].indexOf('location') != -1)? aa[i]:(!lb)? 'location=no':lb;di = (aa[i].indexOf('directories') != -1)? aa[i]:(!di)? 'directories=no':di;mb = (aa[i].indexOf('menubar') != -1)? aa[i]:(!mb)? 'menubar=no':mb;rz = (aa[i].indexOf('resizable') != -1)? aa[i]:(!rz)? 'resizable=no':rz;}rs=','+sb+','+tb+','+st+','+lb;return rs;}function pds(){aa = arguments[0].split(',');bName=navigator.appName;bApp=navigator.appVersion;bVer=parseInt(navigator.appVersion);ns4=(document.layers||(bName.indexOf('Netscape')>=0&&bVer<5))?true:false;ie4=(document.all&&document.styleSheets)?true:false;ns5=(document.getElementById&&!document.all)?true:false;op5=(document.all&&!document.styleSheets)?true:false;win=(bApp.indexOf('Win')>=0)?true:false;mac=(bApp.indexOf('Mac')>=0)?true:false;diw =(ie4&&win)?aa[0]:(ns4&&win)?aa[2]:(ns5&&win)?aa[4]:(op5&&win)?aa[6]:(ie4&&mac)?aa[8]:(ns4&&mac)?aa[10]:(ns5&&mac)?aa[12]:(op5&&mac)?aa[14]:0;dih=(ie4&&win)?aa[1]:(ns4&&win)?aa[3]:(ns5&&win)?aa[5]:(op5&&win)?aa[7]:(ie4&&mac)?aa[9]:(ns4&&mac)?aa[11]:(ns5&&mac)?aa[13]:(op5&&mac)?aa[15]:0;pw=parseInt(openPopup_width)+parseInt(diw);ph=parseInt(openPopup_height)+parseInt(dih);rs='width='+pw+',height='+ph;return rs;}function openPopup(){pa=new Array('customPosition','customParams','browserDiff');for (i=0;i<pa.length;i++) eval('openPopup_'+pa[i]+'=false');openPopup_popupUrl = arguments[0];openPopup_width=(typeof(arguments[1])=='string'&&arguments[1].indexOf('%')>-1)?gpd(arguments[1],'width'):arguments[1];openPopup_height=(typeof(arguments[2])=='string'&&arguments[2].indexOf('%')>-1)?gpd(arguments[2],'height'):arguments[2];opo=(arguments.length>3)?arguments[3]:'';if(opo!=''){opo=opo.slice(1,opo.length);opoArray = opo.split('-');for (i=0;i<opoArray.length;i++){for (j=0;j<pa.length;j++){eval('openPopup_'+pa[j]+' = (opoArray[i].indexOf("'+pa[j]+'") != -1 && typeof(opoArray[i]) == "string")? opoArray[i].substring(opoArray[i].indexOf("[")+1,opoArray[i].indexOf("]")):(!openPopup_'+pa[j]+')? false:openPopup_'+pa[j]);}}}ps=(!openPopup_browserDiff)?'width='+openPopup_width+',height='+openPopup_height:pds(openPopup_browserDiff);ps+=(!openPopup_customPosition)?',left='+gsc('width')+',top='+gsc('height'):pps(openPopup_customPosition);ps+=(!openPopup_customParams)?',scrollbars=no,toolbar=no,status=no,location=no,directories=no,menubar=no,resizable=no':wps(openPopup_customParams);var poa=new Array();var time=new Date();var rnd=time.getTime();var pna='POPUP'+rnd;poa[poa.length]=window.open(openPopup_popupUrl,pna,ps);if (typeof(poa[poa.length-2]) == 'object') poa[poa.length-2].close();poa[poa.length-1].focus();}var afpl = true;



// show subnavi (ALTE VERSION)
var subShowing = false;
var hideSubTO = null;
var subsArray = new Array ('sub1','sub2','sub3','sub4','sub5');

function hideSubsAndShow(subToShow) {
	var objArray = new Array();
	var triggerSubShowing = subShowing;
	for (var i=0;i<subsArray.length;i++) {
		var obj = (document.getElementById)? document.getElementById(subsArray[i]):(document.all)? document.all[subsArray[i]]:null;
		if (obj!=null && subToShow!=subsArray[i]) obj.style.display = 'none';
		else if (subToShow==subsArray[i]) {
			obj.style.display = 'block';
			triggerSubShowing = true;
			}
	}
	subShowing = (triggerSubShowing)? true:false;
}

function sS(objID,wo,subToShow) {
	var obj = (document.getElementById)? document.getElementById(objID):(document.all)? document.all[objID]:null;
	if (obj!=null) {
		if (wo==1) {
			if (hideSubTO!=null) {
				clearTimeout(hideSubTO);
			}
			obj.style.display = 'block';
			subShowing = true;
		}
		else if (wo==0 && subShowing) {
			hideSubTO=window.setTimeout('hideSubsAndShow("'+subToShow+'")',1000);
		}
	}
}

function showSubnav(subnavID) {
	//document.getElementById('sub51').style.display = 'none';
	document.getElementById('sub52').style.display = 'none';
	document.getElementById('sub53').style.display = 'none';
	document.getElementById('sub54').style.display = 'none';
	if (subnavID!='') document.getElementById(subnavID).style.display = 'block';
}

function showSubnav3() {
	document.getElementById('sub31').style.display = 'block';
}

function hideSubnav3() {
	document.getElementById('sub31').style.display = 'none';
}

function sSS(objID,wo) {
	var obj = (document.getElementById)? document.getElementById(objID):(document.all)? document.all[objID]:null;
	if (obj!=null) {
		if (wo==1) {
			if (hideSubTO!=null) {
				clearTimeout(hideSubTO);
			}
			obj.style.display = 'block';
			subShowing = true;
		}
		else if (wo==0 && subShowing) {
			hideSubTO=window.setTimeout('hSS("'+objID+'");',1000);
		}
	}
}

function hSS(objID) {
	var obj = (document.getElementById)? document.getElementById(objID):(document.all)? document.all[objID]:null;
	obj.style.display = 'none';
}


// backward compatibility
function hideSubs() {
	hideSubsAndShow();
}

//image switch used on e.g. naxos-page
function imgSwitch(objString,wo,imgNumber) {
	var msie = (document.all&&document.styleSheets)?true:false;
	var container = (document.getElementById)? document.getElementById(objString):objString;
	container.style.display = (wo==1)? 'block':'none';
}

//generic rollover
function rO(obj,wo){var msie=(document.all&&document.styleSheets)?true:false;var objRef=(obj.childNodes.length==0)?obj:obj.lastChild;
if(objRef!=null){objRef.src=(wo==1)?objRef.src.split('_lo.').join('_hi.'):objRef.src.split('_hi.').join('_lo.');}}

//preloader for rollover images
function iP(){
	if (doc.images){
	tImgs=new Array();
	for(var i=0;i<doc.images.length;i++){if(regEx.test(doc.images[i].src))tImgs[tImgs.length]=doc.images[i].src;var txt=doc.images[i].src;if(txt.indexOf('submit')>=0)alert(doc.images[i].src);}}for (var j=0;j<tImgs.length;j++){tImg_lo=new Image();tImg_hi=new Image();tImg_lo.src=tImgs[j];tImg_hi.src=tImgs[j].split('_lo'+RegExp.$1).join('_hi'+RegExp.$1);}}
	var doc=document;var regEx=/_lo([_|\.])/;
	doc.write('<scr'+'ipt for=window event=onload language="JScr'+'ipt">');doc.write('iP();');doc.write('<\/scr'+'ipt>');if(window.addEventListener!=null){window.addEventListener("load",iP,true);
}


// PowerBronze Produktshuffle


function shuffle(welcher) {
	
	var headline = "";
	var dertext = "";
	
	// Inhalte festlegen
	
	switch(welcher){
		
		case 1:
			headline ="Mattierender Puderpinsel";
			dertext ='<b>NAT&Uuml;RLICHE BR&Auml;UNE IN 15 SEKUNDEN</b><br />Die Innovation f&uuml;r ein gesundes, sonnenverw&ouml;hntes Aussehen in 15 Sekunden. Der Puderpinsel verleiht einen mattierenden Br&auml;unungseffekt mit regulierbarer Intensit&auml;t. Der Teint erscheint glatt, gleichm&auml;&szlig;ig - und anhaltend gebr&auml;unt!<br /><br /><a href="#" onclick="shuffle(2)" style="color: #fff; font-weight: bold; text-decoration: underline">Get&ouml;ntes Feuchtigkeitsgel</a> >';
			break;
	
		case 2:
			headline ="Get&ouml;ntes Feuchtigkeitsgel";
			dertext ='<b>2-IN-1 L&Ouml;SUNG:<br />BR&Auml;UNE UND FEUCHTIGKEIT</b><br />Das get&ouml;nte Feuchtigkeitsgel aus der POWER BRONZE Serie verbindet wertvolle Feuchtigkeitspflege mit authentischer T&ouml;nung. Eine ebenm&auml;&szlig;ige, ultra-nat&uuml;rliche Br&auml;unung ist das Ergebnis.<br /><br /><a href="#" onclick="shuffle(3)" style="color: #fff; font-weight: bold; text-decoration: underline">Abdeckcreme gegen Augenringe</a> >';
			break;
			
		case 3:
			headline ="Abdeckcreme gegen Augenringe";
			dertext ='<b>SOFORTWIRKUNG GEGEN AUGENRINGE</b><br />Die POWER BRONZE Abdeckcreme l&auml;sst Augenringe und Hautunebenheiten augenblicklich verschwinden und kaschiert Anzeichen von M&uuml;digkeit – für eine vitale, attraktive Ausstrahlung.<br /><br /><a href="#" onclick="shuffle(4)" style="color: #fff; font-weight: bold; text-decoration: underline">Selbstbr&auml;unungs-Gel</a> >';
			break;
			
		case 4:
			headline ="Selbstbr&auml;unungs-Gel";
			dertext ='<b>EXPRESS-BR&Auml;UNE MIT 7 TAGE-WIRKUNG</b><br />Die Sofortwirkung f&uuml;r den aktiven Mann: Das neue POWER BRONZE Selbstbr&auml;unungsgel verleiht langanhaltende, nat&uuml;rliche Br&auml;une &ndash; f&uuml;r einen Look wie frisch aus dem Urlaub!<br /><br /><a href="#" onclick="shuffle(1)" style="color: #fff; font-weight: bold; text-decoration: underline">Mattierender Puderpinsel</a> >';
			break;
			
	}
	
	// Ins Dokument einsetzen
	
	document.getElementById("shuffleHeadline").innerHTML = headline;
	document.getElementById("shuffleText").innerHTML = dertext;
	document.getElementById("shuffleProdukt").src = "images/powerbr_prod_"+welcher+".jpg";
	document.getElementById("shuffleUebersicht").src = "images/powerbr_prod_ue_"+welcher+".jpg";
}



// die Variable merkt sich den geöffneten Layer für function showLayer

var layerMerken = "";

function showLayer(welcher) {
		
		// alle aus.
		
		for (i=1;i<=2;i++){
			if (document.getElementById("l"+i).aktiv) {
					document.getElementById("l"+i).style.display = "none";
					document.getElementById("l"+i).aktiv = false;	
					document.getElementById("l"+i+"Schatten").style.display = "none";
					document.getElementById("popupLayerClose").style.display = "none";	
			}
		}
	
		// angeforderten Layer aktiv setzen
		
		document.getElementById(welcher).style.display = "block";
		document.getElementById(welcher).aktiv = true;	
		layerMerken = welcher;

		// dazugehörigen Hintergrund + Schatten anzeigen
		
		document.getElementById(welcher+"Schatten").style.display = "block";
		document.getElementById("popupLayerClose").style.display = "block";	
		
}

function hideLayer() {
	
		document.getElementById(layerMerken).style.display = "none";
		document.getElementById(layerMerken).aktiv = false;	
		document.getElementById(layerMerken+"Schatten").style.display = "none";	
		document.getElementById("popupLayerClose").style.display = "none";	
		
}

function changeAktiv(welcher) {
	if (welcher==1) {
	document.getElementById("changer1").innerHTML='<input type="image" name="submit_picture_1" src="images/ae08_t_but_dateiladen_lo.gif" border="0" width="108" height="23" style="width: 108px;height:23px;margin-left: 15px;border: 0;"  onmouseover="this.src=\'images/ae08_t_but_dateiladen_hi.gif\';" onMouseOut="this.src=\'images/ae08_t_but_dateiladen_lo.gif\';" />';
	} else {
	document.getElementById("changer2").innerHTML='<input type="image" name="submit_picture_2" src="images/ae08_t_but_dateiladen_lo.gif" border="0" width="108" height="23" style="width: 108px;height:23px;margin-left: 15px;border: 0;"  onmouseover="this.src=\'images/ae08_t_but_dateiladen_hi.gif\';" onMouseOut="this.src=\'images/ae08_t_but_dateiladen_lo.gif\';" />';
	}
	
}

// Dubai 08 Teilnahmebedingungen Layer

function showDubaiTeilnahme() { 
		var Teilnahmex,Teilnahmey;
		if (self.innerHeight) // all except Explorer
		{
			Teilnahmex = self.innerWidth;
			Teilnahmey = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight)
			// Explorer 6 Strict Mode
		{
			Teilnahmex = document.documentElement.clientWidth;
			Teilnahmey = document.documentElement.clientHeight;
		}
		else if (document.body) // other Explorers
		{
		Teilnahmex = document.body.clientWidth;
		Teilnahmey = document.body.clientHeight;
		}		

	var PositionTeilnahmex;
	
	if (Teilnahmex > 917 )
		 {
		 PositionTeilnahmex = (Teilnahmex - 916) / 2;
		 }
	else
	     {
	     PositionTeilnahmex = 1;
	     }
		 
	if (document.getElementById('teilnahmeDubaiLayer'))
	 {
		document.getElementById('teilnahmeDubaiLayer').style.left = PositionTeilnahmex + "px";
		document.getElementById('teilnahmeDubaiLayer').style.display = "block";
	}	
	if (document.getElementById('anrede'))
	 {
	 	document.getElementById('anrede').style.display = "none";
	}
	if (document.getElementById('birthdayFields'))
	 {
	 	document.getElementById('birthdayFields').style.display = "none";
	}
}

function hideDubaiTeilnahme() { 
		if (document.getElementById('teilnahmeDubaiLayer'))
	 {
		document.getElementById('teilnahmeDubaiLayer').style.display = "none";
	}	
	if (document.getElementById('anrede'))
	 {
	 	document.getElementById('anrede').style.display = "block";
	}
	if (document.getElementById('birthdayFields'))
	 {
	 	document.getElementById('birthdayFields').style.display = "block";
	}
}


// Force Supreme

function showFS(wen){

	// Navigation zuruecksetzen
	
	document.getElementById("prod1").src="images/fsup_prod_1.jpg";
	document.getElementById("prod2").src="images/fsup_prod_2.jpg";
	document.getElementById("prod3").src="images/fsup_prod_3.jpg";
	document.getElementById("prod4").src="images/fsup_prod_4.jpg";
	
	// gewaehlten Navipunkt aktiv setzen
	
	document.getElementById("prod"+wen).src="images/fsup_prod_"+wen+"a.jpg";
	
	// Produktlayer ausblenden
	
	document.getElementById("prod1_detail").style.display = "none";
	document.getElementById("prod2_detail").style.display = "none";
	document.getElementById("prod3_detail").style.display = "none";
	document.getElementById("prod4_detail").style.display = "none";
	
	// gewaehlten Produktdetail-Layer einblenden
	
	document.getElementById("prod"+wen+"_detail").style.display = "block";	
	
}

