

function phoneDroppedOnComparisonContainer(dragElem, droppableElem, theEvent)
{
	var phoneIndex = dragElem.id.split("_")[1];
	var phone = phoneList.getPhoneByIndex(phoneIndex);

	//check if this phone is already in the list
	if (comparisonContainers.getContainerByPhoneName(phone.name) == null)
	{
		var compContainer = comparisonContainers.getContainerByElementID(droppableElem.id);

		//Note: Does not perform "compContainer.currentProduct == null" check. Products dropped on already filled containers overwrite the current product.
		compContainer.currentProduct = phone;
		renderComparisonSelectionElements();

		saveComparisonSelections();

	}
	
}

function phoneHoveredOnComparisonContainer(dragElem, droppableElem, theEvent)
{
	/*
	REMOVED - could not hook up on the onmouseout event (scriptacolus only have a onHover event, not the opposite)	
	var phoneIndex = dragElem.id.split("_")[1];
	var phone = phoneList.getPhoneByIndex(phoneIndex);

	var compContainer = comparisonContainers.getContainerByElementID(droppableElem.id);

	if (comparisonContainers.getContainerByPhoneName(phone.name) != null && compContainer.currentProduct == null)
	{
		droppableElem.innerHTML = "already added to comparison";
	}
	else if (compContainer.currentProduct == null)
	{
		droppableElem.innerHTML = "release to add to container!";
	}
	*/
}

function phoneExitedComparisonContainer(dragElem, droppableElem, theEvent)
{
	removeDropToAddMessages();
}

