

//---- Class comparisonContainer ----

function comparisonContainer() 
{
}
comparisonContainer.prototype.currentProduct = null;
comparisonContainer.prototype.elementID = null;

//---- Class comparisonContainerList ----

function comparisonContainerList()
{
	this.containers = new Array()
}

comparisonContainerList.prototype.name = "notdefined";
comparisonContainerList.prototype.addComparisonContainer = function(comparisonContainerToAdd)
{
	this.containers[this.containers.length] = comparisonContainerToAdd;
}

comparisonContainerList.prototype.getContainerByPhoneName = function(phoneName)
{
	var matchedContainer = null;
	for (var k = 0; k < this.containers.length; k++)
	{
		if (this.containers[k].currentProduct != null)
		{
			if (this.containers[k].currentProduct.name == phoneName)
			{
				matchedContainer = this.containers[k];
			}
		}		
	}
	return matchedContainer;
}



comparisonContainerList.prototype.getContainerByElementID = function(elementID)
{
	var matchedContainer = null;
	for (var k = 0; k < this.containers.length; k++)
	{
		if (this.containers[k].elementID == elementID)
		{
			matchedContainer = this.containers[k];
		}		
	}
	return matchedContainer;
}


