function CaProductObj(productJSON)
{
	this.product = productJSON;
	this.caProdSizeIdx = -1;
	this.caProdColorIdx = 0;

	this.caBrand = '';

	this.caColorStockArray=new Array();		// Bestand pro Farbe.
	this.caColorIdxArray=new Array();			// Indizes der Farben mit Bestand.

	this.caCrossSellingObj=null;

	this.caMaxColors=5;										// Max. gleichzeitig dargestellte Farben in der Detailansicht.

	this.caActiveZoomImage = 0;
	// Über die Reihenfolge kann die Priporität gesteuert werden. Directories 
	// weiter vorne im Array werden als erstes durchsucht.
	this.caZoomImageDirs=new Array(
		'FRONT', 
		'FRONTDET1', 
		'BACK', 
		'BACKDET1', 
		'FUNCTION', 
		'DETAIL', 
		'FRONTDET2', 
		'BACKDET2'
	);
	// Dies sind die 6 Slots für die anzuzeigenden Zoom Bilder.
	this.caZoomThumbs=new Array(
		false, 
		false, 
		false, 
		false, 
		false, 
		false
	);
	this.caZoomThumbImageDirs=new Array(
		new CaZoomThumbImageDir(this.caZoomImageDirs[0]+'_layer_thumb', false, false), 
		new CaZoomThumbImageDir(this.caZoomImageDirs[1]+'_layer_thumb', false, false), 
		new CaZoomThumbImageDir(this.caZoomImageDirs[2]+'_layer_thumb', false, false), 
		new CaZoomThumbImageDir(this.caZoomImageDirs[3]+'_layer_thumb', false, false), 
		new CaZoomThumbImageDir(this.caZoomImageDirs[4]+'_layer_thumb', false, false), 
		new CaZoomThumbImageDir(this.caZoomImageDirs[5]+'_layer_thumb', false, false), 
		new CaZoomThumbImageDir(this.caZoomImageDirs[6]+'_layer_thumb', false, false), 
		new CaZoomThumbImageDir(this.caZoomImageDirs[7]+'_layer_thumb', false, false)
	);
	function CaZoomThumbImageDir(dir, exists, loading)
	{
		this.path = '';
		this.dir = dir;
		this.exists = exists;
		this.loading = loading;
		this.loaded = false;
		this.img = null;
	}



	this.caGetColorIdx = function(colorId)
	{
		var			colors=this.caGetColors();
		var			i;
		var			idx=0;


		for (i=0;i<colors.length;i++)
		{
			if (this.caColorStockArray[i] <= 0)
				continue;

			if (colors[i].colourId == colorId)
				return idx;

			idx++;
		}

		// Fehler. Farbe nicht gefunden.
		return -1;
	}

	this.caGetRealColorIdx = function()
	{
		if (this.caProdColorIdx < 0 || this.caProdColorIdx >= this.caColorIdxArray.length)
		{
			//alert('Invalid \"caProdColorIdx\" '+this.caProdColorIdx);
			return 0;
		}

		return this.caColorIdxArray[this.caProdColorIdx];
	}

	this.caGetSelectedColor = function()
	{
		return this.caGetColors()[this.caGetRealColorIdx()];
	}
	this.caGetSelectedSize = function()
	{
		var			color=this.caGetSelectedColor();


		if (this.caProdSizeIdx == -1)
			return null;

		return color.size[this.caProdSizeIdx];
	}

	this.caSetStockArray = function()
	{
		var			sizes;
		var			colors=this.caGetColors();
		var			i;
		var			j;


		// Bestand pro Farbe.
		this.caColorStockArray = new Array();
		for (i=0;i<colors.length;i++)
		{
			stockCount = 0;
			sizes = this.caGetSizes(i);

			for (j=0;j<sizes.length;j++)
				stockCount += Math.max(parseInt(sizes[j].BestellBestand), 0);

			this.caColorStockArray[i] = stockCount;
		}
	}

	this.caGetSizeGuideId = function()
	{
		if (typeof this.product.sizeGuideID == 'undefined')
			return '0';

		return this.product.sizeGuideID;
	}

	this.caGetSizeStockOfCurrentColor = function(sizeIdx)
	{
		var			color=this.caGetSelectedColor();
		var			stock;


		stock = color.size[sizeIdx].BestellBestand;

		return parseInt(stock);
	}

	this.caSetColorArray = function(selectedColorId)
	{
		var			colors=this.caGetColors();
		var			i;
		//Global, da für Basketstring benötigt
//		activeColorIdx=-1;
//		var			activeColorIdx=-1;


		// Alle farben mit Bestand in das Array sortieren.
		for (i=0;i<colors.length;i++)
		{
			// Farben ohne Bestand überspringen.
			if (this.caColorStockArray[i] <= 0)
				continue;

			if (colors[i].colourId == selectedColorId)
				this.caProdColorIdx = this.caColorIdxArray.length;

			this.caColorIdxArray[this.caColorIdxArray.length] = i;
		}

		// Es muss zumindest die erste Farbe vorhanden sein, auch wenn sie keinen Bestand hat - JS 12.09.08
		if (this.caColorIdxArray.length == 0)
			this.caColorIdxArray[this.caColorIdxArray.length] = 0;

		// Prüfen, ob ausgewählte Farbe Bestand hat.
		if (this.caProdColorIdx < 0)
		{
			// Erstes Produkt mit Bestand anzeigen.
			this.caProdColorIdx = 0;
		}

		// Aktive Farbe tauschen, wenn nicht unter den ersten 5.
		if (this.caProdColorIdx >= this.caMaxColors)
		{
			var			temp;


			// Erste Farbe mit der aktiven Farbe tauschen.
			temp = this.caColorIdxArray[0];
			this.caColorIdxArray[0] = this.caColorIdxArray[this.caProdColorIdx];
			this.caColorIdxArray[this.caProdColorIdx] = temp;

			this.caProdColorIdx = 0;
		}
	}

	this.caGetProductId = function()
	{
		return this.product.pricedProductId;
	}

	this.caGetLanguage = function(countryISOCode)
	{
		var		i=0;
		var		len=this.product.language.length;
		var		lang=null;
		var		isoCode=countryISOCode.toLowerCase();


		for (i=0;i<len;++i)
		{
			lang = this.product.language[i];
			if (lang.languageIsoCode.toLowerCase() == isoCode)
				return lang;
		}

		return null;
	}

	this.caGetName = function()
	{
		var		i=0;
		var		lang=this.caGetLanguage(caLanguage);
		var		len=lang.articleText.length;
		var		text=null;


		for (i=0;i<len;++i)
		{
			text = lang.articleText[i];

			if (typeof text.DescriptionName != "undefined")
				return text.DescriptionName;
		}

		return "";
	}

	this.caGetArtikelnummer = function()
	{
		var			artNr='';


		artNr += this.caGetProductId();
		artNr += '.';
		artNr += this.caGetSelectedColor().colourId;

		return artNr;
	}

	this.caGetPrice = function()
	{
		var			strOut='';
		var			priceNew=this.product.priceNew;
		var			priceSale=this.product.priceSale;


		if (parseFloat(priceSale.replace(',','.')) > parseFloat(priceNew.replace(',', '.')))
		{
			// Reduziert.
			strOut += '<div>';
			strOut += '<span id="preisSaleNew">'+parent.caToCurrency(priceNew)+'</span>';
			strOut += '<span id="euroSaleNew">&euro;</span>';
			strOut += '<div id="preisSale">'+parent.caToCurrency(priceSale)+'&euro;</div></div>';
		}
		else
		{
			// Normal.
			strOut += '<div align="left"><span id="preisRegular">'+parent.caToCurrency(priceNew)+'</span>';
			strOut += '<span id="euroRegular">&nbsp;&euro;</span></div>';
		}

		return strOut;
	}

	this.caGetDetailText = function()
	{
		var			textArr = new Array();


		if (typeof this.product.ThirdPartyBrands == 'undefined')
			return textArr;

		for(var key in this.product.ThirdPartyBrands)
		{
			if(typeof this.product.ThirdPartyBrands[key].detailText != 'undefined')
			{
				if(this.product.ThirdPartyBrands[key].detailText.indexOf(';') < 0)
					textArr[textArr.length] = this.product.ThirdPartyBrands[key].detailText;
				else
				{
					tempArr = this.product.ThirdPartyBrands[key].detailText.split(';');
					for (var key2 in tempArr)
						textArr[textArr.length] = tempArr[key2];
				}
			}
		}

		return textArr;
	}

	this.caGetDetailLogos = function()
	{
		var			picArr = new Array();


		if (typeof this.product.ThirdPartyBrands == 'undefined')
			return picArr;

		for(var key in this.product.ThirdPartyBrands)
		{
			if(typeof this.product.ThirdPartyBrands[key].detailLogo != 'undefined')
			{
				if(this.product.ThirdPartyBrands[key].detailLogo.indexOf(';') < 0)
					picArr[picArr.length] = this.product.ThirdPartyBrands[key].detailLogo;
				else
				{
					tempArr = this.product.ThirdPartyBrands[key].detailLogo.split(';');
					for (var key2 in tempArr)
						picArr[picArr.length] = tempArr[key2];
				}
			}
		}

		return picArr;
	}

	this.caGetColorSizes = function(color)
	{
		if (typeof color.size == 'undefined')
			return new Array();

		if (typeof color.size != 'object')
			return new Array(color.size);

		return color.size;
	}

	this.caGetSizes = function(colorIndex)
	{
		var		colors=this.caGetColors();

		if (typeof colors[colorIndex].size.length == 'undefined')
			return new Array(colors[colorIndex].size);

		return colors[colorIndex].size;
	}

	this.caGetColors = function()
	{
		if (typeof this.product.colour.length == 'undefined')
			return new Array(this.product.colour);

		return this.product.colour;
	}

	this.caGetMaterials = function()
	{
		var		lang=this.caGetLanguage(caLanguage);


		return lang.article;
	}

	this.caGetCareFeatures = function(article)
	{
		var			careArray=new Array();


		if (typeof article == 'undefined')
			return careArray;

		switch (typeof article.carefeatures)
		{
			case 'string':
				if (article.carefeatures != '0')
					careArray = article.carefeatures.split(';');
				break;

			case 'object':
				break;

			default:
			case 'undefined':
				break;
		}

		return careArray;
	}

	this.caGetOutfitId = function()
	{
		return this.product.Outfit_ID;
	}


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////


this.caSelectSize = function(selectId, selection)
{
	document.getElementById(selectId).selectedIndex = selection;
}

this.caGetSizeBlockHeight = function()
{
	var			sizes=this.caGetSizes(this.caGetRealColorIdx());
	var			height=0;
	var			numRows=Math.round((sizes.length / this.caSizesPerRow) + 0.49);


	// Oben.
	height += 25;
	// Wieviele Zeilen brauchen die Größen.
	height += numRows * 15;
	// Unten.
	height += 25;

	return height;
}

this.caGetSizeBlock = function()
{
	var			strOut='';
	var			i;
	var			sizes=this.caGetSizes(this.caGetRealColorIdx());
	var			numSizes=sizes.length;
	var			width=1+(Math.min(numSizes, 8)*(30+1));
	var			height;
	var			x=0;
	var			y=0;
	var			bgColor='#C0DEB3';
	var			fontColor='#000000';
	var			sizeCount=0;
	var			sizeName;
	var			colors=this.caGetColors();
	var			activeColor=this.caGetRealColorIdx();


	this.caBigSizes = false;
	for (i=0;i<numSizes;i++)
	{
		sizeName = this.product.sizeNames[i].replace(/XXXX/gi, '4X');
		sizeName = sizeName.replace(/XXX/gi, '3X');
		sizeName = sizeName.replace('  ', ' ');
		if (sizeName.indexOf(' ') >= 0)
			sizeName = sizeName.replace(/([A-Za-z]{1,3})\s{0,1}[A-Za-z0-9	\/]{2,}/gi, '$1');
		else if (sizeName.indexOf(' ') < 0 && sizeName.indexOf('/') >=0 && isNaN(sizeName.replace(/\//gi, '')))
			sizeName = sizeName.replace(/([A-Za-z]{1,3})\s{0,1}([A-Za-z0-9	\/]{2,})/gi, '$1');
		sizeName = (sizeName == '000') ? '1 size' : sizeName;

		if (sizeName.length > 5)
			this.caBigSizes = true;

		this.product.sizeNames[i] = sizeName;
	}

	if (this.caBigSizes == true)
	{
		this.caSizesWidth = 40;
		this.caSizesPerRow = 6;
	}
	else
	{
		this.caSizesWidth = 30;
		this.caSizesPerRow = 8;
	}

	var	numRows=Math.round((numSizes/this.caSizesPerRow)+0.49);
	height = 1 + numRows * 15;

	// Größen und "Größentabelle" Link.
	strOut += '<div style="width:272px;">';
	strOut += '  <div id="besch">Verf&uuml;gbare Gr&ouml;&szlig;en</div>';
	strOut += '  <div style="text-align:right;"><a href="" onClick="parent.caOpenLayer(\'layer_sizes\', true);return false;"><span style="font-family:Arial;font-size:13px;color:#666666;text-decoration:underline;">Gr&ouml;&szlig;enberater </span><img src="../Data/Img/Product/button_arrow_right.jpg" style="margin-bottom:-2px;"></a></div>';
	strOut += '  <div style="clear:both;"></div>';
	strOut += '</div>';

	strOut += '<div style="position:relative;top:0px;left:0px;width:272px;;text-align:left;">';
	strOut += '  <div style="position:relative;top:0px;left:0px;width:'+width+'px;height:'+height+'px;">';
	for (i=0;i<numSizes;i++)
	{
		stock = this.caGetSizeStockOfCurrentColor(i);

		if (stock <= 0)
		{
			bgColor = '#9E0923';
			fontColor = '#CCCCCC';
		}
		else if (stock <= 3)
		{
			bgColor = '#FFFAC8';
			fontColor = '#000000';
		}
		else
		{
			bgColor = '#C0DEB3';
			fontColor = '#000000';
		}

		sizeName = this.product.sizeNames[i];

		if (stock > 0)
			strOut += '<a href="" onClick="this.blur();caSelectSize(\'SelectSize_'+this.caGetProductId()+'\', '+sizeCount+');return false;">';
		strOut += '  <div style="'+(stock > 0 ? 'cursor:pointer;' : '')+'position:absolute;left:'+x+'px;top:'+y+'px;float:left;border:solid 1px #CCCCCC;background-color:'+bgColor+';width:'+this.caSizesWidth+'px;height:14px;">';
		strOut += '    <div style="width:'+this.caSizesWidth+'px;height:14px;color:'+fontColor+';font-family:Arial;font-size:11px;text-align:center;vertical-align:middle;">';
		strOut += sizeName;
		strOut += '    </div>';
		strOut += '  </div>';
		if (stock > 0)
			strOut += '</a>';

		x = (x + (this.caSizesWidth+1)) % ((this.caSizesWidth+1) * this.caSizesPerRow);
		if (i > 0 && (i+1) % this.caSizesPerRow == 0)
		{
			x = 0;
			y += 15;
		}

		if (stock > 0)
			sizeCount++;
	}
	x = -1 + (this.caProdSizeIdx % this.caSizesPerRow) * (this.caSizesWidth+1);
	y = -1 + (Math.floor(this.caProdSizeIdx / this.caSizesPerRow)) * 15;
	strOut += '    <div id="size_marker" style="position:absolute;left:'+x+'px;top:'+y+'px;width:'+(this.caSizesWidth+2)+'px;height:18px;"><img src="../Data/Img/trans.gif" width="'+(this.caSizesWidth-2)+'" height="12" style="border:solid 3px #002F5C;"></div>';
	strOut += '  </div>';
	strOut += '</div>';

	return strOut;
} 

this.caSetSizeMarker = function(objMarker)
{
	var	 	x;
	var	 	y;


	objMarker.style.display = (this.caProdSizeIdx == -1) ? 'none' : 'block';

	size = objMarker.style;

	x = -1 + (this.caProdSizeIdx % this.caSizesPerRow) * (this.caSizesWidth+1);
	y = -1 + (Math.floor(this.caProdSizeIdx / this.caSizesPerRow)) * 15;

	size.left = x + 'px';
	size.top = y + 'px';
}

	this.caGetShoeMaterial = function(materialId)
	{
		switch (materialId)
		{
			case 1:
				return 'echtes Leder';

			case 2:
				return 'Textil';

			case 3:
				return 'Synthetik';

			case 4:
				return 'Leder mit Synthetik';

			default:
				return '';
		}
	}

this.caGetMaterialString = function (article, shortOutput, hasMoreArticles)
{
	var			matStr='';
	var			materials;
	var			descArr=new Array();
	var			desc;
	var			j;
	var			k;


	if (typeof shortOutput == 'undefined')
		shortOutput = false;
	if (typeof hasMoreArticles == 'undefined')
		hasMoreArticles = false;

	matStr += '<div style="padding-bottom:1px;">';

	materials = article.material;
	var	numMaterials=materials.length;

	for (k=0;k<numMaterials;k++)
	{
		desc = materials[k].description;
		descArr.length = 0;

		if (materials[k].materialRole == "Shoe")
		{
			if (typeof desc[0].UpperText != "undefined")
			{
				matStr += 'Obermaterial:&nbsp;' + this.caGetShoeMaterial(parseInt(desc[0].UpperText));
				if (shortOutput == true)
				{
					if (matStr.indexOf(", ...") < 0)
						matStr += ', ...';
					break;
				}
				matStr += '<br>';
			}
			if (typeof desc[0].SoleText != "undefined")
			{
				matStr += 'Sohle:&nbsp;' + this.caGetShoeMaterial(parseInt(desc[0].SoleText));
				if (shortOutput == true)
				{
					if (matStr.indexOf(", ...") < 0)
						matStr += ', ...';
					break;
				}
				matStr += '<br>';
			}
			if (typeof desc[0].SockText != "undefined")
			{
				matStr += 'Decksohle (innen):&nbsp;' + this.caGetShoeMaterial(parseInt(desc[0].SockText));
				if (shortOutput == true)
				{
					if (matStr.indexOf(", ...") < 0)
						matStr += ', ...';
					break;
				}
				matStr += '<br>';
			}
			if (typeof desc[0].LiningText != "undefined")
			{
				matStr += 'Futter:&nbsp;' + this.caGetShoeMaterial(parseInt(desc[0].LiningText));
				if (shortOutput == true)
				{
					if (matStr.indexOf(", ...") < 0)
						matStr += ', ...';
					break;
				}
				matStr += '<br>';
			}

			// Go on with next material.
			continue;
		}

		matStr += '<div style="padding-bottom:1px;white-space:nowrap;">';

		if (numMaterials > 1)
		{
			switch (materials[k].materialRole)
			{
				case 'Lining':
					matStr += 'Futter:&nbsp;';
					break;

				case 'Inner':
					matStr += 'Innen:&nbsp;';
					break;

				case 'Outer':
					matStr += 'Au&szlig;en:&nbsp;';
					break;

				case 'Padded':
					matStr += 'Wattiert:&nbsp;';
					break;

				case 'Padding':
					matStr += 'Wattierung:&nbsp;';
					break;

				default:
					break;
			}
		}

		// evtl. 0%Materialien entfernen
		var		numDescr=desc.length;
		for (j=0;j<numDescr;j++)
		{
			if (desc[j].materialPercentage == '0,00' || desc[j].materialPercentage == '0.00')
			{
				matStr += '</div>';
				continue;
			}

			descArr[descArr.length] = desc[j];
		}

		for (j=0;j<descArr.length;j++)
		{
			if (j > 1 && descArr.length > 2 && shortOutput == true)
			{
				if (matStr.indexOf(", ...") < 0)
					matStr += ', ...';
				break;
			}

			if (j != 0)
				matStr += ', ';

			matStr += String(descArr[j].materialPercentage).replace(",00", "") + '%&nbsp;' + descArr[j].materialName;
		}

		if (materials.length > 1 && shortOutput == true && matStr.indexOf(", ...") < 0)
			matStr += ', ...';
		else if (shortOutput == true && hasMoreArticles == true && matStr.indexOf(", ...") < 0)
			matStr += ', ...';

		matStr += '</div>';

		if (materials.length > 1 && shortOutput == true)
			break;
	}

	matStr += '</div>';

	return matStr;
}

this.caGetInfoArray = function()
{
	var		lang=this.caGetLanguage(caLanguage);
	var		infoArray=[];
	var		len=lang.articleText.length;
	var		i=0;
	var		logo="";
	var		txt="";


	for (i=0;i<len;++i)
	{
		var			text=lang.articleText[i];

/*
		if (typeof text.DescriptionFeature2 != "undefined")
		{
			if (text.DescriptionFeature2.indexOf("|") > 0)
			{
				logo = text.DescriptionFeature2.split("|")[0];
				txt = text.DescriptionFeature2.split("|")[1];
			}
			else
			{
				logo = parseInt(text.DescriptionFeature2, 10);
				txt = text.DescriptionFeature2;
				if (isNaN(logo))
					logo = "";
				else
					txt = "";
			}	

			infoArray[infoArray.length] = {"text": txt, "pic": logo};
			continue;
		}*/
		if (typeof text.ProductDescription != "undefined")
		{
			var		txt=text.ProductDescription;
			var		pic="";


			if (txt.indexOf("|") >= 0)
			{
				pic = txt.split("|")[0];
				txt = txt.split("|")[1];
			}
			infoArray[infoArray.length] = {"text": txt, "pic": pic};
			continue;
		}
	}

	try
	{
	for (i=0;i<lang.article.length;++i)
	{
		for (var j=0;j<lang.article[i].material.length;++j)
		{
			for (var k=0;k<lang.article[i].material[j].description.length;++k)
			{
				var		text=lang.article[i].material[j].description[k];
				if (typeof text.HeelWedgeText != "undefined")
				{
					infoArray[infoArray.length] = {"text": "Absatzh&ouml;he: "+text.HeelWedgeText, "pic": ""};
					continue;
				}
			}
		}
	}
	}
	catch(e){}

	return infoArray;
}

this.caWriteInfo = function(infoStr, symbolImgFile)
{
	var			strOut='';
	var			picFile='';


	if (symbolImgFile != '0' && symbolImgFile != '' && typeof symbolImgFile != 'undefined')
		picFile = '<img src="../Data/Img/Product/logo/'+symbolImgFile+'.gif" width="40" height="40">';

	strOut += '<table cellspacing="0" cellpadding="0" width="100%" class="font_black">';
	strOut += '  <tr>';
	strOut += '    <td align="left" valign="top" width="5">';
	if (infoStr != '0')
		strOut += '      <div style="padding-top:7px;"><img src="../Data/Img/Product/symbol_dot_dunkel.gif"></div>';
	strOut += '    </td>';
	strOut += '    <td width="2"></td>';
	strOut += '    <td align="left" valign="top">';
	if (infoStr != '0')
		strOut += infoStr;
	else
		strOut += '&nbsp;';
	strOut += '    </td>';
	strOut += '    <td align="right" width="40">';
	if (picFile != '')
		strOut += picFile;
	strOut += '    </td>';
	strOut += '  </tr>';
	strOut += '</table>';	

	return strOut;
}

this.caGetInfoBlock = function()
{
	var			strOut='';
	var			infoArray=this.caGetInfoArray();
	var			articles=this.caGetMaterials();
	var			i;


	// Wenn keine Infos, Materialangaben anzeigen.
	if (infoArray.length == 0)
	{
		// Wenn mehr als zwei Artikelmaterialien vorhanden sind, nur den Link zum Layer anzeigen.
		if (articles.length < 3)
		{
			strOut += '<div style="font-family:Arial;font-size:13px;color:#000000;padding-bottom:5px;" valign="top" align="left">';
			for (i=0;i<articles.length;i++)
				strOut += this.caGetMaterialString(articles[i]);
			strOut += '</div>';
		}
		strOut += '<div width="100%" valign="top" align="left">';
		strOut += '<div><a href="" onClick="parent.caOpenLayer(\'layer_material\', false);return false;"><span style="font-family:Arial;font-size:13px;color:#666666;">Pflegehinweise&nbsp;</span><img src="../Data/Img/Product/button_arrow_right.jpg" style="margin-bottom:-2px;"></a></div>';
		strOut += '</div>';

		return strOut;
	}

	strOut += '<div style="font-family:Arial;font-size:13px;color:#000000;padding-bottom:0px;" valign="top">';

	// Die ersten beiden Produktbeschreibungen anzeigen.
	for (i=0;i<infoArray.length;i++)
	{
		strOut += this.caWriteInfo(infoArray[i].text, infoArray[i].pic);

		// Maximal 2 Produktbeschreibungen anzeigen.
		if (i == 1 && infoArray.length > 3)
		{
			strOut += '<div style="width:100%" valign="top" align="left">';
			strOut += '<div><a href="" onClick="parent.caOpenLayer(\'layer_infos\');return false;"><span style="font-family:Arial;font-size:13px;color:#666666;">Mehr Informationen&nbsp;</span><img src="../Data/Img/Product/button_arrow_right.jpg" style="margin-bottom:-2px;"></a></div>';
			strOut += '<div style="clear:both;"></div>';
			strOut += '</div>';

			break;
		}
	}

	strOut += '</div>';

	// Pflegehinweise und Material.
	strOut += '<div width="100%" valign="top" align="left">';
	strOut += '<div><a href="" onClick="parent.caOpenLayer(\'layer_material\');return false;"><span style="font-family:Arial;font-size:13px;color:#666666;">Pflegehinweise und Material&nbsp;</span><img src="../Data/Img/Product/button_arrow_right.jpg" style="margin-bottom:-2px;"></a></div>';
	strOut += '<div style="clear:both;"></div>';
	strOut += '</div>';

	return strOut;
}

this.caGetSizeLegendBlock = function ()
{
	var			strOut='';


	strOut += '<table cellpadding="0" cellspacing="0" id="legende"><tr>';
	strOut += '<td><img src="../Data/Img/Product/button_verfuegbar.gif" style="margin-right:2px;margin-bottom:-2px;">verf&uuml;gbar</td>';
	strOut += '<td><nobr><img src="../Data/Img/Product/button_fast_ausverkauft.gif" style="margin-left:3px;margin-right:2px;margin-bottom:-2px;">fast ausverkauft</nobr></td>';
	strOut += '<td><img src="../Data/Img/Product/button_ausverkauft.gif" style="margin-left:3px;margin-right:2px;margin-bottom:-2px;">ausverkauft</td>';
	strOut += '</tr></table>';

	return strOut;
}	


	this.caLoadZoomThumbsCS = function(csIndex)
	{
		var			thumb;
		var			dir;
		var			i;
		var			strOut='';


		for (i=0;i<this.caZoomThumbs.length;i++)
			this.caZoomThumbs[i] = false;

		// Nächstes zu ladendes Image suchen.
		for (i=0;i<this.caZoomThumbImageDirs.length;i++)
		{
			dir = this.caZoomThumbImageDirs[i];
			if (document.location.protocol.indexOf("https") >= 0)
				dir.path = 'https://www.cunda.de/Shop/ProductImg/' + dir.dir + '/' + this.caGetProductId() + '_' + this.caGetSelectedColor().colourId + '.jpg';
			else
				dir.path = 'http://www.cunda.de/Shop/ProductImg/' + dir.dir + '/' + this.caGetProductId() + '_' + this.caGetSelectedColor().colourId + '.jpg';

			this.caZoomThumbImageDirs[i].exists = false;
			this.caZoomThumbImageDirs[i].img = new Image();
			this.caZoomThumbImageDirs[i].img.execStr = 'caOnZoomThumbLoadCS('+i+', '+csIndex+');'
			this.caZoomThumbImageDirs[i].img.onload = function(){try{eval(this.execStr);}catch(e){}};
			this.caZoomThumbImageDirs[i].img.src = dir.path;
		}
	}
}
