//### WWW.DOIT24.DE - Product-Quantity Code for FactFinder-Search ###
function ArrayGet(ary, val) {
	if (ary!=null) {
		for (i=0; i<ary.length; i++) {
			if (ary[i].indexOf(val)>-1) {
				return ary[i];
				break;
			}
		}
	}
	return "";
}

WINDOW_LOCATION = ""+unescape(window.location);
WL_ARY = WINDOW_LOCATION.split("?");
WL_QUERYSTRING = (WL_ARY.length>1? WL_ARY[1]: "");
WL_PARAMS = WL_QUERYSTRING.split("&");
DOIT24_PROD_QUAN_STR = ArrayGet(WL_PARAMS, "product_quantities");

var DOIT24_QUAN_PRODS_ARR = new Array();
if (DOIT24_PROD_QUAN_STR.length>0) DOIT24_QUAN_PRODS_ARR = DOIT24_PROD_QUAN_STR.split("=")[1].split(":");

function getProductQuantity(artid) {
	res = ArrayGet(DOIT24_QUAN_PRODS_ARR, artid);
	if (res!=null && res.length>0) {
		res = res.split(",");
		return res[1];
	} else {
		return 0;
	}
}
//### WWW.DOIT24.DE - Product-Quantity Code - END ###
