//====================================================================================================
//Gets Tier information mouseover, used by the Plan Detail page
//====================================================================================================
function getTierInfo(intTier)
{
	var strOutput;
	
	switch(intTier)
	{
		case 1:
			strOutput = "<b>Tier 1:</b> Lowest Co-pay";
			break;
		case 2:
			strOutput = "<b>Tier 2:</b> Medium Co-pay";
			break;
		case 3:
			strOutput = "<b>Tier 3:</b> Higher Co-pay";
			break;
		case 4:
			strOutput = "<b>Tier 4:</b> Specialty Tier (SP) Percentage Co-insurance";
			break;
	}
	return strOutput;
}

//====================================================================================================
//Functions to show/hide the Monthly Cost Estimator price chart
//====================================================================================================
var INT_NUM_MONTHS = 12; //Number of months
var STR_ROW_ID_NAME = "chartDetail_"; //Starting name for the unique IDs for each HTML row element.

//Shows selected month and hides all other months
function showMonth(intMonth, intNumRows, intTable)
{
	//Loop through all the months
	for (var i = 1; i <= INT_NUM_MONTHS; i++)
	{
		//Show selected month, hide all other 
		(i == intMonth) ? showSingleMonth(i, intNumRows, intTable) : hideSingleMonth(i, intNumRows, intTable);
	}
	//Hide the "Totals" row
	doHideOnly(STR_ROW_ID_NAME + intTable + "_Totals");
}

//Shows all months
function showAllMonths(intNumRows, intTable)
{
	//Loop through all the months
	for (var i = 1; i <= INT_NUM_MONTHS; i++)
	{
		showSingleMonth(i, intNumRows, intTable);
	}
	//Show the "Totals" row
	doShowOnly(STR_ROW_ID_NAME + intTable + "_Totals");
}

//Shows a single month's detail information, hides the general information
function showSingleMonth(intMonth, intNumRows, intTable)
{
	//Loop through all the items for each month
	for (var i = 1; i <= intNumRows; i++)
	{
		doShowOnly(STR_ROW_ID_NAME+ intTable + "_"+ intMonth + "_" + i);
	}
	doHideOnly(STR_ROW_ID_NAME + intTable + "_" + intMonth);
}

//Hides a single month and hides all other months
function hideSingleMonth(intMonth, intNumRows, intTable)
{
	for (var i = 1; i <= intNumRows; i++)
	{
		doHideOnly(STR_ROW_ID_NAME + intTable + "_" + intMonth + "_" + i);
	}
	doShowOnly(STR_ROW_ID_NAME + intTable + "_" + intMonth);
}