function writeReduc(price1, price2) {
	var reduc = parseFloat(price1.replace(",","."))-parseFloat(price2.replace(",","."));
	document.write((reduc.toFixed(2)+"").replace(".",","));
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function closemessage(){
	document.getElementById("colordisplay").style.display = "none";
}

document.onkeyup = showUp;
function showUp(e){
	var keycode = null;
	if (!e) var e = window.event
	if (e.keyCode) keycode = e.keyCode;
	else if (e.which) keycode = e.which;
	if (keycode == 27){
	document.getElementById("colordisplay").style.display = "none";
	document.getElementById("productinfo").style.display = "none";
	}
}


	// START Konfiguration
	var var_basketamount = 180;
	var var_basketimtes = 22;
	var xmlHttp = false;
	MM_preloadImages('/img/common/waiting.gif');
	// END Konfiguration
	
	function getX(el){
	x = el.offsetLeft;
	if (!el.offsetParent) return x;
	else return (x+getX(el.offsetParent));
	}
	
	function getY (el){
	y = el.offsetTop;
	if (!el.offsetParent) return y;
	else return (y+getY(el.offsetParent));
	}
	
  
    function addtobasket(id){
		
	checkStock(id);
	
	var basketimtes = document.getElementById("basketimtes").innerHTML;

    function checkStock(id){
	var x = getX(document.getElementById(id));
	var y = getY(document.getElementById(id));
	
	document.getElementById("productinfo").style.display = "none";
	document.getElementById("colordisplay").style.display = "none";
	document.getElementById("btncontinue").style.display = "block";
	document.getElementById("productinfo").style.left = x + 'px';
	document.getElementById("productinfo").style.top = (y-115) + 'px';
	document.getElementById("productloading").style.left = x + 'px';
	document.getElementById("productloading").style.top = (y-30) + 'px';
	
	var variant = (document.getElementById(id).getElementsByTagName("input")[0].value);
	var posQtyWeb = variant.indexOf('#');
	var endPosQtyWeb = variant.indexOf('#', posQtyWeb + 1);
	var qtyWeb = variant.slice(posQtyWeb + 1, endPosQtyWeb);

	//Status of stock
	if (qtyWeb > 5){
		varbaskettotalamount = document.getElementById("basketamount").innerHTML;
		varroundbasketamount = varbaskettotalamount.substr(0,3);
		var basketamount = Math.round(varroundbasketamount);
		if (basketimtes==var_basketimtes || basketamount>var_basketamount){
		} else {
		startaddtobasket();
	}
	
	// Anzahl der Produkte prüfen
	if (basketimtes==var_basketimtes){
		document.getElementById("productinfo").style.display = "block";
		document.getElementById("btncontinue").style.display = "block";
		document.getElementById("productinfotxt").innerHTML = 'Das Produkt konnte nicht dem Warenkorb hinzugef&uuml;gt werden, da die maximale Anzahl ('+var_basketimtes+') der Produkte im Warenkorb bereits erreicht ist.';
	}
	// Gesamtbetrag vom Warenkorb prüfen
	if (basketamount>var_basketamount){
		document.getElementById("productinfo").style.display = "block";
		document.getElementById("btncontinue").style.display = "none";
		document.getElementById("btnbasket").style.display = "block";
		document.getElementById("productinfotxt").innerHTML = 'Wenn Sie f&uuml;r mehr als '+basketamount+' &euro; bestellen m&ouml;chten, wenden Sie sich bitte an unseren <a href="/_de/_de/all_about_ccb/contact_us.aspx" style="font-size:12px; color:#333333">Kundenservice</a>';
	}
	} else if (qtyWeb < 5){
		document.getElementById("productinfo").style.display = "block";
		document.getElementById("btncontinue").style.display = "block";
		document.getElementById("productinfotxt").innerHTML = 'Das Produkt ist momentan leider vergriffen. F&uuml;r weitere Informationen wenden Sie sich bitte an unseren <a href="/_de/_de/all_about_ccb/contact_us.aspx" style="font-size:12px; color:#333333">Kundenservice</a>';
	}
	}
	
	// Adds a product to the basket from buy-one-product function
	function startaddtobasket(){
	xmlHttp = false;
		
        if (window.XMLHttpRequest) { // Mozilla, Safari,...
				xmlHttp = new XMLHttpRequest();
            if (xmlHttp.overrideMimeType){
                xmlHttp.overrideMimeType('text/xml');
            }
			
        } else if (window.ActiveXObject) { // IE
            try {
                xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!xmlHttp){
            alert('Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }
		cache = new Date().getTime();
        xmlHttp.open('GET', '/_de/_de/checkout/ajax_addproduct.aspx?pid='+id+'&q=1&cache='+cache+'', true);
		xmlHttp.onreadystatechange = function(){
		document.getElementById("productloading").style.display = "block";
        if (xmlHttp.readyState == 4){
            if (xmlHttp.status == 200){
				addminibasket();
				document.getElementById("btncontinue").style.display = "block";
				document.getElementById("productinfotxt").innerHTML = 'Das Produkt wurde dem Warenkorb hinzugef&uuml;gt.';
				document.getElementById("productinfo").style.display = "block";
				showcrossellings(id);
				document.getElementById("productloading").style.display = "none";
            } else {
                alert('Das Produkt konnte nicht dem Warenkorb hinzugefügt werden.');
            }
        }
		}
		xmlHttp.send(null);
	}
	}
	
	
	// Adds a product to the basket from choose-one-color function
	function addcolortobasket(prdcode){
	
	// Configurations of parameters
	cache = new Date().getTime();
	findcolorid = document.getElementById('colordisplay').getElementsByTagName('select')[0].options[document.getElementById('colordisplay').getElementsByTagName('select')[0].selectedIndex];
	colorid = findcolorid.value.slice(0, findcolorid.value.indexOf("#"));
	redprice = findcolorid.value.split("#");

	colorqty = document.getElementById('colordisplay').getElementsByTagName('select')[1].options[document.getElementById('colordisplay').getElementsByTagName('select')[1].selectedIndex].value;
	var basketimtes = document.getElementById("basketimtes").innerHTML;
	countofimtes = eval(basketimtes + "+" + colorqty);
	
	// Betrag von Warenkorb ermitteln / Komma in Punkt / Abrunden
	varbaskettotalamount = document.getElementById("basketamount").innerHTML;
	varslicebasketamount = varbaskettotalamount.slice(0,3);
	varreplabasketamount = varslicebasketamount.replace((/,/g), ".");
	var basketamount = Math.round(varreplabasketamount);
	
	// Reduzierter Preis mal der Anzahl der Produkte und abrunden = Gesamtpreis
	redprice = redprice[2].replace((/,/g), ".");
	redprice = redprice * colorqty;
	var redprice = Math.round(redprice);
	
	var x = getX(document.getElementById(prdcode));
	var y = getY(document.getElementById(prdcode));
	document.getElementById("productinfo").style.left = x + 'px';
	document.getElementById("productinfo").style.top = (y-115) + 'px';

	// Anzhal der Produkte prüfen
	if (countofimtes > var_basketimtes){
		document.getElementById("productinfo").style.display = "block";
		document.getElementById('btncontinue').style.display = "block";
		document.getElementById('btnbasket').style.display = "none";
		document.getElementById("crosssellingcontent").innerHTML = ' ';
		document.getElementById("productinfotxt").innerHTML = 'Das Produkt konnte nicht mit <b>'+colorqty+'</b> Einheiten dem Warenkorb hinzugef&uuml;gt werden, da die maximale Anzahl ('+var_basketimtes+') der Produkte im Warenkorb bereits erreicht ist.';
	} else
	// Gesamtbetrag vom Warenkorb prüfen
	if (eval(basketamount + "+" + redprice) > var_basketamount){
		document.getElementById("productinfo").style.display = "block";
		document.getElementById('btncontinue').style.display = "block";
		document.getElementById("crosssellingcontent").innerHTML = ' ';
		document.getElementById("productinfotxt").innerHTML = 'Wenn Sie f&uuml;r mehr als '+var_basketamount+' &euro; bestellen m&ouml;chten, wenden Sie sich bitte an unseren <a href="/_de/_de/all_about_ccb/contact_us.aspx" style="font-size:12px; color:#333333">Kundenservice</a>';
	} else {
		document.getElementById("productinfo").style.display = "none";
		document.getElementById('btncontinue').style.display = "block";
		document.getElementById('btnbasket').style.display = "block";
		document.getElementById("crosssellingcontent").innerHTML = ' ';
		document.getElementById("productinfotxt").innerHTML = 'Das Produkt wurde dem Warenkorb hinzugef&uuml;gt.';

	xmlHttp = false;
		
        if (window.XMLHttpRequest) { // Mozilla, Safari,...
				xmlHttp = new XMLHttpRequest();
            if (xmlHttp.overrideMimeType){
                xmlHttp.overrideMimeType('text/xml');
            }
			
        } else if (window.ActiveXObject) { // IE
            try {
                xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!xmlHttp){
            alert('Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }
				
        xmlHttp.open('GET', '/_de/_de/checkout/ajax_addproduct.aspx?pid='+colorid+'&q='+colorqty+'&cache='+cache+'', true);
		xmlHttp.onreadystatechange = function(){
		var x = getX(document.getElementById(prdcode));
		var y = getY(document.getElementById(prdcode));
		document.getElementById("productinfo").style.left = x + 'px';
		document.getElementById("productinfo").style.top = (y-115) + 'px';
		document.getElementById("productinfo").style.display = "none";
		document.getElementById("productloading").style.display = "block";
		document.getElementById("colordisplay").style.display = "none";

        if (xmlHttp.readyState == 4){
            if (xmlHttp.status == 200){
				addminibasket();
				document.getElementById("productinfo").style.display = "block";
				showcrossellings(prdcode);
				document.getElementById("colordisplay").style.display = "none";
				document.getElementById("productloading").style.display = "none";
            } else {
                alert('Das Produkt konnte nicht dem Warenkorb hinzugefügt werden.');
            }
        }
		}
		xmlHttp.send(null);
	}
	}
		
    function addminibasket(){
	xmlHttp = false;
	
	        if (window.XMLHttpRequest){ // Mozilla, Safari,...
				xmlHttp = new XMLHttpRequest();
            if (xmlHttp.overrideMimeType){
                xmlHttp.overrideMimeType('text/xml');
            }
			
        } else if (window.ActiveXObject){ // IE
            try {
                xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!xmlHttp){
            alert('Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }
		cache = new Date().getTime();
		xmlHttp.open('GET', '/_de/_de/test/dyn_minibasket.aspx?cache='+cache+'', true);
        xmlHttp.onreadystatechange = function() {
        if (xmlHttp.readyState == 4) {
            if (xmlHttp.status == 200) {
                document.getElementById("ajaxminibasket").innerHTML = xmlHttp.responseText;
				setTimeout("doBasketMagic()", 3000);
				xmlHttp = false;
				 
				 isDefined = function(value) { 
					return this[value] === undefined ? false : true;
				 }

				 if (isDefined('aktiv') == true) {
					window.clearTimeout(aktiv);
					window.status = "";
				 }
				 
				 if (isNaN(document.getElementById('basketvalue'))) {
				 txt = document.getElementById('basketvalue').value;
				 txt = txt.replace(/<b>/g, " ").replace(/<\/b>/g, " ");
				 
				 Breite = 300;
				 TextLaenge = txt.length;
				 Position = 1 - Breite;
				 
				 function statusMarquee() {
						Position++;
						var Textzustand="";
						if (Position == TextLaenge) {
							Position = 1 - Breite;
						}
						
						if (Position < 0) {
							for (var Zaehler=1; Zaehler <= Math.abs(Position); Zaehler++) {
								Textzustand = Textzustand + " ";
							}
							Textzustand = Textzustand + txt.substring(0, Breite - Zaehler + 1);
						} else {
							Textzustand = Textzustand + txt.substring(Position, Breite + Position);
						}
						window.status = Textzustand;
						setTimeout("statusMarquee()",80);
				 }
				 statusMarquee();
				 }
            } else {
                alert('Das Produkt konnte nicht dem Warenkorb hinzugefügt werden.');
            }
        }
    }
        xmlHttp.send(null);
	}
	

	function statusMarquee() {
		Position++;
		var Textzustand="";
		if (Position == TextLaenge) {
			Position = 1 - Breite;
		}
		
		if (Position < 0) {
			for (var Zaehler=1; Zaehler <= Math.abs(Position); Zaehler++) {
				Textzustand = Textzustand + " ";
			}
			Textzustand = Textzustand + txt.substring(0, Breite - Zaehler + 1);
		} else {
			Textzustand = Textzustand + txt.substring(Position, Breite + Position);
		}
		window.status = Textzustand;
		setTimeout("statusMarquee()",80);
	 }

	
	
	// Displays the cross-selling-products of bought product
	function showcrossellings(id){
	ajaxHttp = false;	
        if (window.XMLHttpRequest){
			ajaxHttp = new XMLHttpRequest();
            if (ajaxHttp.overrideMimeType){
                ajaxHttp.overrideMimeType('text/xml');
            }
			
        } else if (window.ActiveXObject){
            try { ajaxHttp = new ActiveXObject("Msxml2.XMLHTTP");  
			} catch (e) {
            try { ajaxHttp = new ActiveXObject("Microsoft.XMLHTTP");  
			} catch (e) {}
            }
        }

        if (!ajaxHttp){
            alert('Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }
		
		cache = new Date().getTime();
        ajaxHttp.open('GET', '/_de/_de/test/ajax_module_crossselling.aspx?pid='+id+'&cache='+cache+'', true);
		ajaxHttp.onreadystatechange = function(){
        if (ajaxHttp.readyState == 4){
            if (ajaxHttp.status == 200){
				var crosssellingcontent = ajaxHttp.responseText.replace(/form/, "input");
				document.getElementById("crosssellingcontent").innerHTML = crosssellingcontent;
				checkcrossellings();
            }
        }
		}
		ajaxHttp.send(null);
	}
	
	function checkcrossellings(){
		var content = document.getElementById('cscontent');
		if(navigator.appName == "Microsoft Internet Explorer"){
			if (!content.innerHTML.length){document.getElementById("crosssellingcontent").innerHTML = " ";}
		} else {
			if (content.innerHTML.length == 2){document.getElementById("crosssellingcontent").innerHTML = " ";}
		}
	}

	function choosecolor(prdcode){
	
		http_request = false;
		
		var x = getX(document.getElementById(prdcode));
		var y = getY(document.getElementById(prdcode));
		document.getElementById("colordisplay").style.display = "none";
		document.getElementById("productinfo").style.display = "none";
		document.getElementById("colordisplay").style.left = x + 'px';
		document.getElementById("colordisplay").style.top = (y-340) + 'px';
		document.getElementById("productloading").style.left = x + 'px';
		document.getElementById("productloading").style.top = (y-30) + 'px';


        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
            }
        } else if (window.ActiveXObject) { // IE
            try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
            http_request = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {
			alert("Your browser does not support AJAX!");
		}
        }
        }

        if (!http_request) {
            alert('Das Produkt konnte nicht dem Warenkorb hinzugefügt werden.');
            return false;
        }
        
        http_request.open('GET', '/_de/_de/test/ajax_colordiv.aspx?prdcode='+prdcode+'', true);
		http_request.onreadystatechange = function(){
		if (http_request.readyState == 1){
			document.getElementById("productloading").style.display = "block";
		}

        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
			var response = http_request.responseText.replace(/form/, "input");
			//alert(response);
				document.getElementById("colordisplay").innerHTML = response;
				setTimeout('chk()',1000);
				document.getElementById("productloading").style.display = "none";
				document.getElementById("colordisplay").style.display = "block";
            } else {
                alert('Das Produkt konnte nicht dem Warenkorb hinzugefügt werden.');
            }
        }
    }
        http_request.send(null);
    }

    function closecolordiv(){
		document.getElementById("colordisplay").style.display = "none";
	}

	var debut = "";
	function clearPrices() {
		document.pbleft.src="/img/common/number/vide.gif";
		document.pbright.src="/img/common/number/vide.gif";
		document.pbeuro.src="/img/common/number/vide.gif";
		for(var i=0; i<5; ++i) {
			document['pn'+i].src="/img/common/number/p_vide.gif";
			document['pb'+i].src="/img/common/number/vide.gif";
		}
	}

	function setPrices(main, sub) {
		clearPrices();
		if(!sub) {
			for(var i=0; i<main.length; ++i) {
				if(main.charAt(i) == ",") {
					document["pn"+i].src = "/img/common/number/p_dot.gif";
				} else {
					document["pn"+i].src = "/img/common/number/p_"+main.charAt(i)+".gif";
				}
			}
			document.pnleft.src="/img/common/number/p_left.gif";
			document.pnright.src="/img/common/number/p_right.gif";
			document.pneuro.src="/img/common/number/p_euro.gif";
		} else {
			for(var i=0; i<main.length; ++i) {
				if(main.charAt(i) == ",") {
					document["pn"+i].src = "/img/common/number/pn_dot.gif";
				} else {
					document["pn"+i].src = "/img/common/number/pn_"+main.charAt(i)+".gif";
				}
			}
			document.pnleft.src="/img/common/number/pn_left.gif";
			document.pnright.src="/img/common/number/pn_right.gif";
			document.pneuro.src="/img/common/number/pn_euro.gif";
			for(var i=0; i<sub.length; ++i) {
				if(sub.charAt(i) == ",") {
					document["pb"+i].src = "/img/common/number/pb_dot.gif";
				} else {
					document["pb"+i].src = "/img/common/number/pb_"+sub.charAt(i)+".gif";
				}
			}
			document.pbleft.src="/img/common/number/pb_left.gif";
			document.pbright.src="/img/common/number/pb_right.gif";
			document.pbeuro.src="/img/common/number/pb_euro.gif";
		}

		document['pb0'].style.display = "inline";
		document['pn0'].style.display = "inline";
		if(document['pn0'].src.lastIndexOf("pn_0.gif") != -1 || document['pn0'].src.lastIndexOf("p_0.gif") != -1)
		  document['pn0'].style.display = "none";


		if(document['pb0'].src.lastIndexOf("pb_0.gif") != -1 || document['pb0'].src.lastIndexOf("p_0.gif") != -1)
		  document['pb0'].style.display = "none";
	}
	
	function doPriceSetting(str) {
		var datum = str.split("#");
		var id = datum[0];
		var nowai = datum[1];
		var price = datum[2];
		var price2 = null;
		if(datum.length == 4)
			price2 = datum[3];
		setPrices(price, price2);
		debut = id;
		return id;
	}
		var TheMagicalPrice = "";
	var TheMagicalNewPrice = "";
	var TheMagivalProductId = "";
	function doPriceSetting(str) {
		var datum = str.split("#");
		var id = datum[0];
		TheMagivalProductId = id;
		var nowai = datum[1];
		var price = datum[2];
		var price2 = null;
		if(datum.length == 4)
			price2 = datum[3];
		debut = id;
		if (price2) {
			TheMagicalPrice = price2;
			TheMagicalNewPrice = price;
		} else {
			TheMagicalPrice = price;
			TheMagicalNewPrice = null;
		}
		setPrices(price, price2);
		return id;
	}
	
	function switchVariant(identifier){
		if(!identifier){
			
			var sel = document.getElementById('colordisplay').getElementsByTagName('select')[0];
			var id = doPriceSetting(sel.options[sel.selectedIndex].value);
			var visu = document.getElementById('visulevre');
			
			if(!visu) return;

			visu.src = "/img/common/colors/medium/ref_"+id+"_medium.jpg";
		} else {
			// fonction appelée depuis teintes
			var sel = document.getElementById('colordisplay').getElementsByTagName('select')[0];
			for(var i=0; i<sel.options.length; ++i) {
				var id = sel.options[i].value.slice(0, sel.options[i].value.indexOf("#"));
				

				if(id == identifier) {
					sel.selectedIndex = i;
					switchVariant();
					break;
				}
			}
		}
	}
	
	function fooMagicValueNoOneKnowsWhatImSupposedToDo() {
		var mf = GetMainFormName();
		if (!mf) return;
		var sel = GetElementName("_VarList", mf);
		if (!sel) return;
		doPriceSetting(document.forms[mf].elements[sel].value);
	}
	
	function writeMyReduc() {
		var TheReducBlock = document.getElementById('TheReducBlock');
		if (!TheMagicalPrice || !TheMagicalNewPrice) { 
			TheReducBlock.style.display = 'none';
			return;
		}
		TheReducBlock.style.display = 'block';
		var reduc = parseFloat(TheMagicalPrice.replace(",","."))-parseFloat(TheMagicalNewPrice.replace(",","."));
		if (TheReducBlock) TheReducBlock.innerHTML = "Sie sparen : "+(reduc.toFixed(2)+"").replace(".",",")+"&nbsp;&euro;";
	}
	
	function change_color(col,n) {
		switchVariant(col);
		checkstockofcolor();
		writeMyReduc();
	}
	
	function chk(n) {
		switchVariant(n);
		writeMyReduc();
		checkstockofcolor();
	}
	
    function checkstockofcolor(){
  
	var mf = GetMainFormName();
	var nameVarList = GetElementName("VarList", mf);	
	var nameQtyList = GetElementName("QtyList", mf);
	
	var varList = document.getElementById('colordisplay').getElementsByTagName('select')[0];
	
	// variant demande par le client ( attention ListControl or HtmlSelect )
	var variant = "";
	if(varList.options != null) // select
		variant = varList.options[varList.selectedIndex].value;
	else if(varList.length != null) // radio
	{
		for (var i=0; i < varList.length; i++)
		{
			if (varList[i].checked) 
			{
				variant = varList[i].value;
			}
		}
	}
	else // input type hidden
		variant = varList.value;
		
	var qtyList = document.getElementById('colordisplay').getElementsByTagName('select')[1];
	// quantite demande par le client
	var qty = qtyList.options[qtyList.selectedIndex].value;
	// quantite renvoy par le serveur aprs chargement
	var posQtyWeb = variant.indexOf('#'); // si apres les prix  lastIndexOf('#')
	var endPosQtyWeb = variant.indexOf('#', posQtyWeb + 1); //si aprs les prix variant.length ;
	var qtyWeb = variant.slice(posQtyWeb + 1, endPosQtyWeb);

	//Status of stock
	if (qtyWeb > 100){
	document.statusbalken.src="/img/_de/_de/common/txt_stock_yes.gif";
	document.statusbalken.alt='VerfÃ¼gbar';
	document.statusbalken.title='VerfÃ¼gbar';
	document.getElementById('status').innerHTML='lieferbar';
	document.getElementById("orderbtndiv").style.display = 'block';
	
	} else if ((qtyWeb>5) && (qtyWeb<100)){
	document.statusbalken.src="/img/_de/_de/common/txt_stock_yes.gif";
	document.statusbalken.alt='Nur noch wenige verfÃ¼gbar';
	document.statusbalken.title='Nur noch wenige verfÃ¼gbar';
	document.getElementById('status').innerHTML='nur noch wenige lieferbar';
	document.getElementById("orderbtndiv").style.display = 'block';
	
	} else if (qtyWeb < 5){
	document.statusbalken.src="/img/_de/_de/common/txt_stock_no.gif";
	document.statusbalken.alt='Nicht mehr verfÃ¼gbar';
	document.statusbalken.title='Nicht mehr verfÃ¼gbar';
	document.getElementById('status').innerHTML='vergriffen';
	document.getElementById("orderbtndiv").style.display = 'none';
	}
	}
