///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 	Beispiel für einen Aufruf:
//	parent.erstelleObjekt("ProduktError('A34563', 'green', 'XS','','')");
//	parent.HinweisLayer(parent.objProdukt.NichtLieferbar, this.name, 1, <auszuführendeFunktion>);			<- 1=ok, 2=ok,abbrechen

objMeldungslayer = "";																														//Fehlermeldungen 08.06.07

function erstelleObjekt(newObj){
	eval("objMeldungslayer = new " + newObj);
}


function ProduktError(StyleNumber, ColorNumber, Size, Anzahl, Bestellwert){
	this.Bestellmenge     = "To avoid misuse, the orderquantity is limited up to <b class='medium'>{Anzahl}&nbsp;pcs.</b>. Orderquantity was changed into {Anzahl} items.";
	this.maxBestellmenge  = "To avoid misuse, the orderquantity is limited up to <b class='medium'>{Anzahl}&nbsp;pcs.</b>.";
	this.Bestellwert      = "Unfortunately this order exceeds the maximum order value of $1.200.\nPlease divide this order in two seperate orders.";
	this.MaxAnzahl        = "The basket is has reached the limit. Please complete your order by clicking the checkout-button.";
	this.NichtLieferbar   = "SORRY! <br><br>The item <b>{StyleNumber}</b> in <b>{Farbe}</b> size <b>{Größe}</b> is not available.<br><br>Directly below the product illustrations the availability of the sizes is shown. The colour icons next to the product illustrations show the availability of the individual colours.";
	this.NiedrigerBestand = "Regretfully, we no longer have the desired quantity in stock. The quantity is therefore reset to 1. Do you wish to proceed with your order?";
	this.PopupHilfe       = "Apparently, software or one of the settings on your computer prevents the viewing of the product illustrations. <br><br>Please visit our special Help Site to learn more of this problem and how to solve it. Do you wish to proceed to the Help Site?";

	if(StyleNumber != ""){
		this.NichtLieferbar 	= this.NichtLieferbar.replace(/(\{StyleNumber\})/g, StyleNumber);
	}
	if(ColorNumber != ""){
		this.NichtLieferbar 	= this.NichtLieferbar.replace(/(\{Farbe\})/g, ColorNumber);
	}
	if(Size != ""){
		this.NichtLieferbar 	= this.NichtLieferbar.replace(/(\{Größe\})/g, Size);
	}
	if(Anzahl != ""){
		this.Bestellmenge	 		= this.Bestellmenge.replace(/(\{Anzahl\})/g, Anzahl);
		this.maxBestellmenge	= this.maxBestellmenge.replace(/(\{Anzahl\})/g, Anzahl);
	}
	if(Bestellwert != ""){
		this.Bestellwert 			=	this.Bestellwert.replace(/(\{Bestellwert\})/g, Bestellwert);
	}
}

var screenBreite=0;
var screenHoehe=0;

function HinweisLayer(Inhalt, objName){
	var TmpVar = "this";
/*
	if(eval("typeof FrameMainMain." + objName + "== 'object'")){

		TmpVar = eval("FrameMainMain" + objName);

	}else if(eval("typeof " + objName + "== 'object'")){

		TmpVar = eval(objName);

	}else{

		TmpVar = objName;

	}
*/
	screenBreite 		= document.getElementsByTagName('body')[0].offsetWidth;

	screenHoehe 		= document.getElementsByTagName('body')[0].offsetHeight;

	if(document.all){

		//screenHoehe = document.getElementsByTagName('body')[0].scrollHeight;

		screenBreite -= 16;

	}
	GroesseX	= 380;

	GroesseY	= 0;

	PosX			= (screenBreite / 2) - (GroesseX / 2);

	PosY 			= 50;
	
	Div = '<div id="div_fader" style="visibility:hidden; background-color:white; position:absolute; filter:alpha(opacity=80);-moz-opacity:0.80; z-index:999;top:0px; left:0px; width:'+screenBreite+'px; height:'+screenHoehe+'px;"></div>';
	Div += '<div id="div_anzeige" style="visibility:hidden; position:absolute; z-index:1000;top:'+PosY+'px; left:'+PosX+'px; width:'+GroesseX+'px; height:'+GroesseY+'px;">';
	Div += '<table border="0" cellpadding="0" cellspacing="0" style="background-color:white; border:8px solid #AFBEC5" width="'+GroesseX+'" height="'+GroesseY+'">';
	Div += '<tr>';
	Div += '<td valign="middle" align="left" style="padding:7px" class="medium" id="div_anzeige_inhalt">';
	Div += Inhalt;
	Div += '</td>';
	Div += '</tr>';
	Div += '<tr><td>&nbsp;</td></tr>';
	Div += '<tr>';
	Div += '<td align="center">';
	//Div += '<table border="0" style="background-color:#E7EBEE" cellpadding="7" cellspacing="0" width="'+eval(GroesseX-30)+'">';		//innere Tabelle für Kontakt und Hilfe
	//Div += '<tr>';
	//Div += '<td align="left" class="medium">';
	//Div += 'Mehr zum Thema Bestellung & Lieferung?<br>';
	//Div += 'Schauen Sie doch in unsere <a href="#" style="color:red" onMouseUp="WinOutHelp()">Online-Hilfe</a>, dort haben wir viele informative Themen für Sie zusammengestellt.<br><br>';
	//Div += 'Über das <a href="#" style="color:red" onMouseUp="WinOutKontakt()">Kontaktformular</a> können Sie gern auch jederzeit unsere Kundenservice erreichen.';
	//Div += '</td>';
	//Div += '</tr>';
	//Div += '</table>';
	Div += '<tr><td>&nbsp;</td></tr>';
	Div += '</td>';
	Div += '</tr>';
	Div += '<tr>';
	Div += '<td align="center">';			//Zelle mit Button(s)
	Div += '<div id="buttons" align="center">';
	Div += '</div>';
	Div += '</td>';
	Div += '</tr>';
	Div += '<tr><td>&nbsp;</td></tr>';
	Div += '</table>';
	Div += '</div>';
	document.write(Div);
}

function addButtonsInLayer(LayerArt, buttonFunktion){
	if(LayerArt==2){
		Div = '<input type="button" style="border:1px solid #AFBEC5; background-color:#F7F7F7;" id="btnOk" value=" ok " onMouseUp="events(\''+buttonFunktion+'\');"></input> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="button" id="btnAbbrechen" style="border:1px solid #AFBEC5; background-color:#F7F7F7;" value="abbrechen" onMouseUp="document.getElementById(\'div_fader\').style.visibility=\'hidden\';setTimeout(\'document.getElementById(\\\'div_anzeige\\\').style.visibility=\\\'hidden\\\'\',100);"></input>';
	}else{
		Div = '<input type="button" style="border:1px solid #AFBEC5; background-color:#F7F7F7;" id="btnOk" value=" ok " onMouseUp="events(\''+buttonFunktion+'\');"></input>';
	}
	if(document.getElementById('buttons')){
		document.getElementById('buttons').innerHTML = Div;
	}else{
		return false;
	}
}

function events(buttonFunktion){
	document.getElementById('div_fader').style.visibility='hidden';
	setTimeout('document.getElementById(\'div_anzeige\').style.visibility=\'hidden\'',100);
	return eval(buttonFunktion);
}


/*-------------------------
		Bestätigungslayer
-------------------------*/

function erstelleBestaetigungsDiv(){

if(blnNoCrossStyle || NewSale=='sale'){
	document.write('\
									<div id="size_tip_layer_small" style="position:absolute; left:187px; top:262px; z-index:100; visibility:hidden;">\
										<div style="position:absolute; top:0px; left:0px; width:210px; height:40px; text-align:right;">\
											<a id="SizeTipHrefSale"><img src="../../Img/transparent.gif" id="SizeTipImgSale"></a>\
										</div>\
										<div id="size_tip_sale_text" style="position:absolute; top:3px; left:65px; width:210px; height:40px; text-align:right; z-index:1000;"></div>\
									</div>\
									<!-- Großer Layer mit dem langen Text -->\
									<div id="size_tip_layer_big" style="position:absolute; z-index:101; top:220px; left:225px; width:219px; height:148px; text-align:right; visibility:hidden; background-image:url(../../Img/Product/'+strLng+'/size_alert_layer_with_icon.gif);"></div>');
}else{
	document.write('\
									<div id="size_tip_layer_small" style="position:absolute; left:297px; top:52px; z-index:100; visibility:hidden;">\
										<div style="position:absolute; top:0px; left:0px; width:210px; height:40px; text-align:right;">\
											<a id="SizeTipHrefRegular"><img src="../../Img/transparent.gif" id="SizeTipImgRegular"></a>\
										</div>\
										<div id="size_tip_sale_text" style="position:absolute; top:3px; left:65px; width:210px; height:40px; text-align:right; z-index:1000;"></div>\
									</div>\
									<!-- Großer Layer mit dem langen Text -->\
									<div id="size_tip_layer_big" style="position:absolute; z-index:101; top:35px; left:330px; width:219px; height:148px; text-align:right; visibility:hidden; background-image:url(../../Img/Product/'+strLng+'/size_alert_layer_with_icon.gif);"></div>');
}
	
	screenBreite 		= document.getElementsByTagName('body')[0].offsetWidth;
	screenHoehe 		= document.getElementsByTagName('body')[0].offsetHeight + 10;
	if(document.all){
		screenHoehe = document.getElementsByTagName('body')[0].scrollHeight;
		screenBreite -= 16;
	}



var fface2 = "'Verdana'";
document.write('\
\
<!-- Layer zum Darstellen der Schattierungen (werden bei beiden Bestätigungslayern benötigt) -->\
\
		<div id="schattenDiv1" style="z-index:27;position:absolute; background-color:#FFFFFF; width:'+screenBreite+'px ;height:'+screenHoehe+'px;top:0px; left:0px; filter:alpha(opacity=25);-moz-opacity:0.50;opacity: 0.75; align:left; visibility:hidden;">\
			<a href="javascript:bestaetigung_unsichtbar();MoreInfo()"><img src="../../Img/transparent.gif" border="1" width="520" height="550"></a>\
		</div>\
		<div id="schattenDiv2" style="z-index:28;position:absolute; background-color:white; top:0px;left:0px;height:0px;width:20px; margin-left:0px; filter:alpha(opacity=10);-moz-opacity:0.10; align:left; visibility:hidden;">\
			<a href="javascript:bestaetigung_unsichtbar();MoreInfo()"><img src="../../Img/transparent.gif" border="0" width="1" height="1"></a>\
		</div>\
<!--	ENDE Layer zum Darstellen der Schattierungen ENDE -->\
\
\
<!-- SALE Layer / Add to basket -->\
\
		<div id="sale_bestaetigung" style="position:absolute; filter:alpha(opacity=100);-moz-opacity:0.85;z-index:99;top:170px; left:80px;width:404px; height:176px;visibility:hidden">\
\
<!-- Anfang der Größer kleiner Geschichten  dann -->\
  		<div id="sale_empfehlung_auf" style="position:absolute; z-index:100;top:20%; left:50px;width:202px; height:100px;visibility:hidden"></div>\
			<div id="sale_groessen_layer" style="z-index:1;position:absolute;left:10px;top:85"></div>\
			<br>\
			<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" vspace="0" width="404" height="176" hspace="0" border="0" style="width:404;height:176;background-image:url(../../Img/Product/'+strLng+'/cross_background_small.gif);background-repeat:no-repeat;" id="sale">\
				<tr>\
					<td valign="top" align="left" height="78" width="40" style="padding-left:10px;padding-top:25px"><img id="PicDestStyleOver_List_Basket_Img" src="" border="0" style="border:1px solid #EFEDDF;" id="PicDestStyleOver_List_Basket_Img"></td>\
					<td valign="top" height="78" align="left" width="544" style="padding-left:15px; padding-top:30px;"><span style="font-size:16px;font-weight:bolder;color:#96675D">Size:</span>&nbsp;&nbsp;<span id="sale_groesse" style="font-size:16px;font-weight:bolder;color:#656565"></span><br><span style="font-size:9px;font-weight:bolder;color:#656565" id="td_StyleName"></span> <span style="font-size:9px;font-weight:bolder;color:'+((NewSale=='sale') ? '#FF0000' : '#656565')+'">$<span id="td_PriceNew"></span></span></td>\
				</tr>\
			</table>\
			<div style="position:absolute;z-index:58;top:15px;left:380px;width:12px;height:12px;"><a href="javascript:bestaetigung_unsichtbar()"><img src="../../Img/Product/'+strLng+'/cross_close.gif"></a></div>\
			<!--<div style="position:absolute;z-index:60;top:140px;left:190px;width:197px;height:33px;"><a href="../../basket_us_exe.htm" target="FrameMainMain" style="position:absolute;top:0px;left:0px;height:33px;width:197px;"><img src="../../Img/Product/'+strLng+'/transparent.gif" width="197" height="33" border="0"></a></div>-->\
			<div style="position:absolute;z-index:60;top:140px;left:190px;width:197px;height:33px;"><a href="../../HtmlNaviDir/us/start_frameset_basket.html" target="FrameStart" style="position:absolute;top:0px;left:0px;height:33px;width:197px;"><img src="../../Img/Product/'+strLng+'/transparent.gif" width="197" height="33" border="0"></a></div>\
			<div style="position:absolute;z-index:61;top:140px;left:10px;width:162px;height:33px;"><a href="javascript:bestaetigung_unsichtbar()" style="position:absolute;top:0px;left:0px;height:33px;width:162px;"><img src="../../Img/Product/'+strLng+'/transparent.gif" width="162" height="33" border="0"></a></div>\
		</div>\
\
<!-- ENDE SALE Layer / Add to basket -->\
\
\
\
<!-- REGULAR LAYER / Add to basket -->\
\
		<div id="bestaetigung" style="border:1px solid #B7B7B7;position:absolute; z-index:99;top:10px; left:0px;width:584px; background-color:white;height:515px;visibility:hidden">\
\
<!-- Größenempfehlungen (fällt klein aus, fällt groß aus) -->\
			<div id="empfehlung_auf" style="position:absolute; z-index:100;top:12%; left:350px;width:202px; height:112px;visibility:hidden;"></div>\
<!-- ENDE Größenempfehlungen (fällt klein aus, fällt groß aus) ENDE -->\
\
<!-- schliessen kreuz -->\
			<div style="position:absolute;z-index:58;top:17px;left:559px;width:12px;height:12px; border:0px solid green;">\
				<a href="javascript:bestaetigung_unsichtbar()"><img src="../../Img/Product/'+strLng+'/transparent.gif"></a>\
			</div>\
<!-- zum warenkorb -->\
			<div style="position:absolute;z-index:60;top:95px;left:390px;width:172px;height:33px;">\
				<!--<a href="../../basket_us_exe.htm" target="FrameMainMain" id="BasketLink"><img src="../../Img/Product/'+strLng+'/transparent.gif" width="172" height="33" border="0">&nbsp;</a>-->\
				<a href="../../HtmlNaviDir/us/start_frameset_basket.html" target="FrameStart" id="BasketLink"><img src="../../Img/Product/'+strLng+'/transparent.gif" width="172" height="33" border="0">&nbsp;</a>\
			</div>\
<!-- weiter einkaufen -->\
			<div style="position:absolute;z-index:61;top:95px;left:10px;width:152px;height:33px;">\
				<a href="javascript:bestaetigung_unsichtbar()"><img src="../../Img/Product/'+strLng+'/transparent.gif" width="152" height="33" border="0"></a>\
			</div>\
\
			<br>\
\
			<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" vspace="0" width="584" hspace="0" border="0" style="display:none;background-image:url(../../Img/Product/'+strLng+'/cross_title_'+strLng+'.gif);background-repeat:no-repeat;" id="reture">\
				<tr>\
					<td valign="middle" align="left" height="78" width="40" style="padding-left:10px;padding-top:15px">\
						<img src="../../PicDestStyleThumb/'+StyleNumber+'_'+ColorNumber+'.gif"  border="0" style="border:1px solid #EFEDDF;" id="PicDestStyleOver_List_Cross_Img">\
					</td>\
					<td height="78" align="left" width="544" style="padding-left:15">\
						<span style="font-size:16px;font-weight:bolder;color:#96675D">Size:</span>&nbsp;&nbsp;<span id="groesse" style="font-size:16px;font-weight:bolder;color:#656565"></span><br><span style="font-size:9px;font-weight:bolder;color:#656565">'+StyleName+', $'+PriceNew+'</span>\
					</td>\
					<!--<td align="right" valign="middle" style="padding-right:6px">-->\
					<td align="right" valign="middle" style="padding-right:11px">\
						<div><a id="SizeTipHrefRegular"><img src="../../Img/transparent.gif" id="SizeTipImgRegular"></a></div>\
					</td>\
				</tr>\
				<tr>\
					<td colspan="3" style="background-image:url(../../Img/Product/'+strLng+'/cross_unter_title_US.gif);background-repeat:no-repeat;width:584;height:46;" width="584" height="46">&nbsp;</td>\
				</tr>\
			</table>\
\
			<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" vspace="0" width="584" hspace="0" border="0">\
				<tr>\
					<td width="360">\
						<div id="CrossFrame2" style="width:584px; height:300px;"></div>\
					</td>\
				</tr>\
			</table>\
\
		</div>\
\
		<div id="schattenDivMI" style="z-index:27;position:absolute;top:0px; left:0%; margin-left:0px; filter:alpha(opacity=85);-moz-opacity:0.85; align:left; visibility:hidden;">\
			<a href="javascript:MoreInfo()"><img src="http://www.esprit.de/Shop/Img/transparent.gif" border="0" width="590" height="500" border="0"></a>\
		</div>\
		<div id="schattenDivMI2" onclick="MoreInfo()" style="z-index:28;border:1px solid #696969;position:absolute; background-color:black; top:40px;left:45px;height:385px;width:480px; margin-left:0px; filter:alpha(opacity=10);-moz-opacity:0.10; align:left; visibility:hidden;">\
			<img src="http://www.esprit.de/Shop/Img/transparent.gif" border="0" width="405" height="325">\
		</div>\
		<div id="MoreInfo" style="border:1px solid #666666;position:absolute; z-index:99;top:30px; left:33px;width:480px;padding-bottom:10px;background-color:white;visibility:hidden">\
			<div style="position:absolute;left:420;width:18px;height:16px">\
				<a href="javascript:MoreInfo()"><img src="../../Img/Product/'+strLng+'/ansichtenlayer/schliessen.gif" border="0"></a>\
			</div>\
			<br><br>\
			<table bgcolor="#ffffff" align="center">\
				<tr>\
					<td align="center">\
						<table border="0" cellspacing="0" cellpadding="0" width="450" height="40">\
							<tr>\
								<td align="left" valign="top" width="420" height="40">\
									<img src="../../PicTmpl/'+strLng+'/moreinfo.gif" border="0" alt="close window" width="300" height="40">\
								</td>\
							</tr>\
						</table>\
						<table border="0" cellspacing="0" cellpadding="0" width="450">\
							<tr>\
								<td align="left" valign="top" width="1"  height="30">\
									<img src="../../Img/Main/'+strLng+'/transparent.gif"  width="1" border="0" height="30">\
								</td>\
								<td align="left" valign="top" width="420" height="30"><b id="td_DescStyleShort"></b></td>\
								<td align="left" valign="top" width="10" height="30">\
									<img src="../../Img/Main/'+strLng+'/transparent.gif" width="10" border="0" height="30">\
								</td>\
							</tr>\
							<tr>\
								<td align="left" valign="top" width="30" height="170">\
									<img src="../../Img/Main/'+strLng+'/transparent.gif" width="30" border="0" height="170">\
								</td>\
								<td align="left" valign="top" width="420" height="170" id="td_DescStyleLong"></td>\
								<td align="left" valign="top" width="10" height="170">\
									<img src="../../Img/Main/'+strLng+'/transparent.gif" width="10" border="0" height="170">\
								</td>\
							</tr>\
							<tr>\
								<td align="left" valign="bottom" width="30" height="30">\
									<img src="../../Img/Main/'+strLng+'/transparent.gif" width="30" border="0" height="30">\
								</td>\
								<td align="left" valign="bottom" width="420" height="30" id="td_Material"></td>\
								<td align="left" valign="bottom" width="10" height="30">\
									<img src="../../Img/Main/'+strLng+'/transparent.gif" width="10" border="0" height="30">\
								</td>\
							</tr>\
							<tr>\
								<td align="left" valign="bottom" width="30" height="30">\
									<img src="../../Img/Main/'+strLng+'/transparent.gif" width="30" border="0" height="30">\
								</td>\
								<td align="left" valign="bottom" width="260" height="30" id="caresym_td"><span id="td_CareSym"></span></td>\
								<td align="left" valign="bottom" width="10" height="30">\
									<img src="../../Img/Main/'+strLng+'/transparent.gif" width="10" border="0" height="30">\
								</td>\
							</tr>\
						</table>\
					</td>\
				</tr>\
			</table>\
		</div>\
		\
');

/*
   		if(parent.parent.parent.promoBool==true){		//wenn eine Promo läuft -ff
   			if(parent.parent.parent.promoStyle.indexOf(StyleNumber) >=0){
					document.getElementById('CrossFrame2').src = "../Promo40.html";
   			}else if(parent.parent.parent.promoStyle2.indexOf(StyleNumber) >=0){
					document.getElementById('CrossFrame2').src = "../Promo50.html";
		    }else if(parent.parent.parent.promoStyle3.indexOf(StyleNumber+'_'+ColorNumber) >=0){
						document.getElementById('CrossFrame2').src = "../KidsDenimPromo.html";
				}else{
						document.getElementById('CrossFrame2').src = "../CrossStyles_empfehlung_gross_NEU.html";
		    }
		  }else{
		   document.getElementById('CrossFrame2').src = "../CrossStyles_empfehlung_gross_NEU.html";
		  }
*/		  
}
