function solutionValidation (incompleteSolution)
{
	var incompleteError = incompleteSolution;
	alert(incompleteError);
	
	return;
}

function displayCurrentPackage (currentPackage,buyFlowInd,totalPack,packAaialable,downArrow,upArrow)
{
	if(buyFlowInd == 'Y')
	{
		if (packAaialable == "true")
		{
			expandCart(totalPack,packAaialable,downArrow);
			displaySolution(totalPack,currentPackage,downArrow,upArrow);
		}
	}
}

function expandCart (totalPack,packAaialable,downArrow)
{
	document.getElementById('cartClosed').style.display = 'none';
	document.getElementById('cartEnclosingBox').style.display = 'block';
	
	if (packAaialable == "false")
	{
		document.getElementById('emptyCart').style.display = 'block';
		document.getElementById('taxInfoId').style.display = 'none';
	}
	else if (packAaialable == "true")
	{
		for (count = 0; count < totalPack ; count++)
		{
			try
			{
				document.getElementById('soltion'+count).style.display = 'none';
				document.getElementById('solutionArrow'+count).src = downArrow;
			}
			catch(err)
			{}
		}
		
		document.getElementById('emptyCart').style.display = 'none';
		document.getElementById('newFidoCartMenu').style.display = 'block';
		document.getElementById('taxInfoId').style.display = 'block';
	}
}

function displaySolution (totalPack,packNo,downArrow,upArrow)
{	
	var count = 0;
	if (totalPack >= 1)
	{	
	for (count = 0; count < totalPack; count++)
	{
		try{

		if (packNo == count)
		{
			if (document.getElementById('soltion'+packNo).style.display == 'none')
			{
				document.getElementById('solutionArrow'+count).src = upArrow;
				document.getElementById('soltion'+packNo).style.display = 'block';
			}
			else if(document.getElementById('soltion'+packNo).style.display == 'block')
			{
				document.getElementById('solutionArrow'+count).src = downArrow;
				document.getElementById('soltion'+packNo).style.display = 'none';
				
			}
		}
		else 
		{
			document.getElementById('soltion'+count).style.display = 'none';
			document.getElementById('solutionArrow'+count).src = downArrow;	
		}
		}catch(err)
			{}
	}
	}
	else if (totalPack == 1)
	{
		document.getElementById('solutionArrow'+count).src = upArrow;
		document.getElementById('soltion'+packNo).style.display = 'block';
	}
	
}
function closeCart()
{
	document.getElementById('cartClosed').style.display = 'block';
	document.getElementById('cartEnclosingBox').style.display = 'none';
	document.getElementById('taxInfoId').style.display = 'none';
}

function changeOrRemove (strSelected)
{	
	var result = false;
	if (strSelected != null)
	{
		result = confirm(strSelected);	
	}
	else 
	{
		result = true
	}
	
	return result;
}
function checkOutInfo(checkOutInfo,language)
	{
		var result = false;
		if (checkOutInfo == 'true')
		{
			if (language == 'en')
			{
				result = confirm("If you exit the shopping process all the information you have entered so far will be lost.");
			}
			else if (language == 'fr')
			{
				result = confirm("Si vous sortez du processus d'achat, toute l'Information que vous avez entrée jusqu'à maintenant sera perdue.");		
			}
		}
		else 
		{
			result = true;
		}
		return result;
	}

