var lastSub;
function showsub(name,x,y,extraUnderscore) {
	clearsubs(extraUnderscore);
	totalname = name + (typeof(extraUnderscore) != 'undefined' && extraUnderscore ? '_' : '') + x + '_' + y;
	if (totalname == lastSub) {
        document.getElementById(totalname).style.display = 'none';
		document.getElementById(totalname + (typeof(extraUnderscore) != 'undefined' && extraUnderscore ? '_' : '') + 'knop').className = 'productDicht';
		lastSub = '';
		if (document.getElementById('acc' + (typeof(extraUnderscore) != 'undefined' && extraUnderscore ? '_' : '') + x) != null) {
			document.getElementById('acc' + (typeof(extraUnderscore) != 'undefined' && extraUnderscore ? '_' : '') + x).style.display = 'none';
		}
	} else {
        document.getElementById(totalname).style.display = 'block';
		document.getElementById(totalname + (typeof(extraUnderscore) != 'undefined' && extraUnderscore ? '_' : '') + 'knop').className = 'productOpen';
		lastSub = totalname;
		if (document.getElementById('acc' + (typeof(extraUnderscore) != 'undefined' && extraUnderscore ? '_' : '') + x) != null) {
			document.getElementById('acc' + (typeof(extraUnderscore) != 'undefined' && extraUnderscore ? '_' : '') + x).style.display = 'block';
		}
	}

	$("eenhedenInput_" + y).focus();
	$("eenhedenInput_" + y).select();	
}

function clearsubs(extraUnderscore) {
	if (lastSub) {
		document.getElementById(lastSub).style.display = 'none';
		document.getElementById(lastSub + (typeof(extraUnderscore) != 'undefined' && extraUnderscore ? '_' : '') + 'knop').className = 'productDicht';
	}
	
	var accessoiresDivs = $$('.accessoiresDiv');
	for (var i=0; i < accessoiresDivs.length; i++) {
		
		accessoiresDivs[i].style.display = "none";
	}
}