function addShop(strShopId) {
	objBrancheIndicator.addShop(strShopId);
}
function addShopBranche(strShopId, strBrancheId) {
	for (var i = 0; i < objBrancheIndicator.arrShops.length; i++) {
		if (objBrancheIndicator.arrShops[i].shopId == strShopId) objBrancheIndicator.arrShops[i].addBranche(strBrancheId);
	}
}
function displayBranche(strBrancheId, objButton) {
	var objShop, blBrancheFound
	for (var i = 0; i < objBrancheIndicator.arrShops.length; i++) {		
		blBrancheFound = false;
		objShop = objBrancheIndicator.arrShops[i];
		for (var j = 0; j < objShop.arrShopBranches.length; j++) {
			if (objShop.arrShopBranches[j] == strBrancheId) blBrancheFound = true;
			if (blBrancheFound) activateShop(objShop.shopId);
			else deactivateShop(objShop.shopId);
		}
	}
	var arrElements = document.getElementsByTagName("A");
  	for (var i = 0; i < arrElements.length; i++) {
		if (arrElements[i].id && arrElements[i] != objButton && arrElements[i].id.indexOf("branche") != -1) {
			arrElements[i].className = "aVariant1";
		} else if (arrElements[i] == objButton) {
			arrElements[i].className = "aVariant2";
		}
	}
}
function activateShop(strShopId) {
	if(document.getElementById("logo" + strShopId)) document.getElementById("logo" + strShopId).src = "/_images/_logos/winkelLogo" + strShopId + "_2.jpg"; 
}
function deactivateShop(strShopId) {
	if(document.getElementById("logo" + strShopId)) document.getElementById("logo" + strShopId).src = "/_images/_logos/winkelLogo" + strShopId + "_1.jpg"; 
}
function brancheIndicator() {
	this.arrShops = new Array();

	this.addShop = function(strShopId) {
		objShop = new Object();
		objShop.shopId = strShopId;
		objShop.arrShopBranches = new Array();
		objShop.addBranche = function(strBrancheId) {
			objShop.arrShopBranches.push(strBrancheId);
		}
		this.arrShops.push(objShop);
	}
}
function initBrancheIndicator() {
	objBrancheIndicator = new brancheIndicator();
}
addLoadEvent(initBrancheIndicator);