
var SdEcSpecifics = {};		// public  global identifiers
var $_EcSpecifics = {};		// private global identifiers

$_EcSpecifics.tagIdToSpecifics = {};

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

SdEcSpecifics.setSpecific = function (tagId, specificId, specificValue)
{
	var  specifics = $_EcSpecifics.tagIdToSpecifics[tagId];
	if (!specifics)
	{
		specifics = {};
		$_EcSpecifics.tagIdToSpecifics[tagId] = specifics;
	}

//	var previousValue = specifics[specificId];
//	if (previousValue) SdCommon.error("specific value (" + specificId + " of " + tagId + ") previously set"
//	                                + " (old vs new is '" + previousValue + "' vs '" + specificValue + "')");

	specifics[specificId] = specificValue;

//	SdCommon.log(tagId + "." + specificId + " <-- '" + specificValue + "'");
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

SdEcSpecifics.getSpecific = function (tagId, specificId, debug)
{
	var  specifics = $_EcSpecifics.tagIdToSpecifics[tagId];
	if (!specifics) SdCommon.error("unknown tag-id '" + tagId + "'");

	var specificValue = specifics[specificId];
	if (typeof specificValue === 'undefined') SdCommon.error("specific value (" + specificId + " of " + tagId + ") not previously set");

	if (debug) SdCommon.log(tagId + "." + specificId + " --> '" + specificValue + "'");

	return specificValue;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


