
	var mbb_debug="no";
	var hsi_debug="no";
	var ld_debug="no";
	var wls_debug = "no";
	//
	// PRICE CLASS
	// Contains all the constants, properties and methods used
	// to manage the pricing in the Order Entry solution.  It
	// is made up of sub-classes for each Order Entry service type.
	//

	//  
	// PRICE CLASS CONSTANTS
	// Constants global to all the pricing sub-classes.
	//
	
	//Default state to use for pricing.
	var DefaultPriceState = "ARIZONA";
	
	///The following constant MUST be changed whenever the pricing changes.
	var lastPriceChangeDate = 20090603;  //format: yyyymmdd

	//
	// PRICE CLASS PROPERTIES
	// Properties global to all the pricing sub-classes.
	//
	//
	function LastPriceChangeDate() {  return(lastPriceChangeDate); }
	
	//
	// PRICE CLASS METHODS
	// Methods global to all the pricing sub-classes.
	//
	
	//
	// LOCAL PHONE PRICE CLASS
	// Contains all the constants, properties and methods used
	// to manage the pricing of the local phone service.
	//
	
	//
	// LOCAL PHONE PRICE CLASS CONSTANTS
	// Constants used in the pricing of local phone service.
	//
	
	var localPhoneBusinessVMailUnitPrice = 9.95;
	
	//Discount Rate constants
	var localPhone3YearDiscountRate = 0.20;
	var localPhone2YearDiscountRate = 0.15;
	var localPhone1YearDiscountRate = 0.10;
	var localPhoneNoAgreementDiscountRate = 0.0;			
	//
	// LOCAL PHONE PRICE CLASS PROPERTIES
	// Properties used in the pricing of local phone service.
	//

	function LocalPhoneBusinessVMailUnitPrice() { return(localPhoneBusinessVMailUnitPrice); }

	//
	// LOCAL PHONE PRICE CLASS METHODS
	// Methods used in the pricing of local phone service.
	//

	//FUNCTION: GetLocalPhoneDiscountRate(commitment)
	//
	//This function returns the discount rate for the local phone service
	//based on the commitment level.
	//
	//PARAMETERS:
	//commitment: Commitment level ("0","1","2" or "3")
	//
	//RETURNS: Discount rate in decimal format
	
	function GetLocalPhoneDiscountRate(commitment)
	{
		if (debug == true) {
			alert("GetDiscountRate(commitment)");
		}	

		//return the appropriate discount rate given the commitment level
		if (commitment == "1") 
		{
			return Number(localPhone1YearDiscountRate);
		}
		else if (commitment == "2") 
		{
			return Number(localPhone2YearDiscountRate);
		}
		else if (commitment == "3") 
		{
			return Number(localPhone3YearDiscountRate);
		}
		else 
		{
			return Number(localPhoneNoAgreementDiscountRate);
		}
	}

	//FUNCTION: GetLocalPhoneBasePrice(localPlan, state)
	//
	//This function returns the base price of local phone service by state in
	//decimal dollars.
	//
	//PARAMETERS:
	//plan: Local Phone plan, A,B,C,D or X where X is the default.
	//state: State name string as defined in qwestfunctions.js
	//
	//RETURNS: Base price of local phone service plan specified in decimal dollars
	function GetLocalPhoneBasePrice(plan, state)
	{
	
		state = String(state).toUpperCase();

		var isBundle = String(IsBundle());
		isBundle = isBundle.toLowerCase();

		var serviceBasePrice = 0.00;

		if (state == "ARIZONA") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else  if (plan == "D") 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.40;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else if (plan == "D") 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.40;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
//alert("AZ 27 ");
				}
			}
		}
		else if (state == "COLORADO") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 35.02;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 32.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 35.02;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 32.00;
				}
				
			}
		}
		else if (state == "IOWA") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.24;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 25.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.24;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 25.00;
				}
			}
		}
		else if (state == "IDAHO") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.40;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 32.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.40;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 32.00;
				}
			}
		}
		else if (state == "MINNESOTA") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 43.29;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 32.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 43.29;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 32.00;
				}
			}
		}
		else if (state == "MONTANA") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness Prime
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 33.94;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness Prime
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 33.94;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.00;
				}
			}
		}
		else if (state == "NEBRASKA") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.55;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.55;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
				}
			}
		}
		else if (state == "NORTH DAKOTA") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 25.66;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 25.66;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
				}
			}
		}
		else if (state == "NEW MEXICO") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 34.37;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 34.37;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 30.00;
				}
			}
		}
		else if (state == "OREGON") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 34.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 26.00;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 25.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 34.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 26.00;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 25.00;
				}
			}
		}
		else if (state == "SOUTH DAKOTA") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.25;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 38.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.25;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
				}
			}
		}
		else if (state == "UTAH") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 44.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 34.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 30.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 22.00;
				}
				else 
				{
//alert("UT");
					// QCB Add-A-Line??
					serviceBasePrice = 20.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 44.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 34.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 30.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 22.00;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 22.00;
				}
			}
		}
		else if (state == "WASHINGTON") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 34.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 26.89;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 25.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 34.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 26.89;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 25.00;
				}
			}
		}
		else if (state == "WYOMING") 
		{
			if (isBundle == "true") 
			{
				// BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 23.10;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
				}
			}
			else 
			{
				// NON BUNDLED PRICING
				if (plan == "A") 
				{
					// QCB Plus
					serviceBasePrice = 49.99;
				}
				else if (plan == "B") 
				{
					// QCBusiness
					serviceBasePrice = 39.99;
				}
				else if (plan == "C") 
				{
					// QCBusiness
					serviceBasePrice = 36.00;
				}
				else  if (plan == "D")
				{
					// QCB Add-A-Line??
					serviceBasePrice = 23.10;
				}
				else 
				{
					// QCB Add-A-Line??
					serviceBasePrice = 27.00;
				}
			}
		}
		else 
		{
			// DEFAULT PRICING
			serviceBasePrice = GetLocalPhoneBasePrice(plan, DefaultPriceState);
		}
	
		return Math.round(serviceBasePrice*100)/100
	}

	
	//FUNCTION: GetLocalPhoneMonthlyServiceRate(state, localPlan, commitment)
	//
	//This function returns the monthly discounted unit price for the primary lines
	//based on the commitment level.
	//
	//PARAMETERS:
	//state: State name string as defined in qwestfunctions.js
	//plan: Local Phone plan, A,B,C,D or X where X is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	//
	//RETURNS: Monthly actual (adjusted) price of service in decimal format
	
	function GetLocalPhoneMonthlyServiceRate(state, plan, commitment)
	{
		if (debug == true) {
			alert("Price.LocalPhone.GetLocalPhoneMonthlyServiceRate(state, plan, commitment)");
		}	

		var serviceBasePrice = GetLocalPhoneBasePrice(plan, state);
		var discountRate = GetLocalPhoneDiscountRate(commitment);

		//Actual price is the base price adjusted by the discount rate
		var actualPrice = Number(serviceBasePrice) - (Number(serviceBasePrice) * Number(discountRate));

		//Round up the actual price
		return Math.round(actualPrice*100)/100;		
	}

	//FUNCTION: GetLocalPhoneMonthlyServiceCost(state, plan, commitment, lines)
	//
	//This function returns the total monthly cost of all primary lines.
	//
	//PARAMETERS:
	//isVmailSelected: True if voicemail is to be included.
	//vmailQty: Number of voicemail features to include
	//RETURNS: Monthly actual (adjusted) cost of service for all primary lines in decimal format
	function GetLocalPhoneMonthlyServiceCost(state, plan, commitment, numLines)
	{
		if (debug == true) {
			alert("Price.LocalPhone.GetLocalPhoneMonthlyServiceCost(state, plan, commitment,numLines)");
		}	
		
		return(GetLocalPhoneMonthlyServiceRate(state, plan,commitment) * Number(numLines));
	}

	//FUNCTION: GetLocalPhoneMonthlyFeatureCost(isVMailSelected, vmailQty)
	//
	//This function returns the total monthly cost of features.
	//
	//PARAMETERS:
	//isVmailSelected: True if voicemail is to be included.
	//vmailQty: Number of voicemail features to include
	//
	//RETURNS: Monthly cost of features (voicemail) for all lines in decimal format
	function GetLocalPhoneMonthlyFeatureCost(isVmailSelected, vmailQty)
	{
		if (debug == true) {
			alert("Price.LocalPhone.GetLocalPhoneMonthlyFeatureCost(isVmailSelected, vmailQty)");
		}	

		var actual = 0.00;
		if (isVmailSelected == true)
		{
			actual += (Number(vmailQty) * Number(LocalPhoneBusinessVMailUnitPrice()));
		}
			
		return actual;
	}

	//FUNCTION: GetLocalPhoneTotalCost(state, plan, commitment, lines, isVMailSelected, vmailQty)
	//
	//This function returns the total monthly cost including monthly feature costs.
	//
	//PARAMETERS:
	//state: State name string as defined in qwestfunctions.js
	//localPlan: Local Phone plan, A,B,C,D or X where X is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	// numLines: Number of primary lines
	//isVmailSelected: True if voicemail is to be included.
	//vmailQty: Number of voicemail features to include
	//
	//RETURNS: Monthly actual (adjusted) total cost of service for all primary lines and features in decimal format
	function GetLocalPhoneTotalCost(state, plan, commitment, numLines, isVmailSelected, vmailQty)
	{
		if (debug == true) {
			alert("Price.LocalPhone.GetLocalPhoneTotalCost()");
		}	

		var serviceTotal = GetLocalPhoneMonthlyServiceCost(state, plan, commitment, numLines);
		var featuresTotal = GetLocalPhoneMonthlyFeatureCost(isVmailSelected, vmailQty);

		if (debug == true) 
		{
			alert("serviceTotal: " + serviceTotal);
			alert("featuresTotal: " + featuresTotal);
		}

		if (plan == "C") 
		{
			serviceTotal = Number(serviceTotal) + Number(featuresTotal);
		}		
		return serviceTotal;
	}

	
	//FUNCTION: getLocalPhoneTotalNRC(GetState(), plan, commitment, lines, vmRequested, VoiceMailQty())
	//This function returns the local phone non-recurring charge total based on the selected phone service
	//currently, all plans have the same nrc for both the first line and each additional line (per state).  If this changes, we would need more logic below.
	
	function GetLocalPhoneOneTimeCharge(state, lines){
		var nrc=0;
		switch(state){
			case "ARIZONA":
				nrc+=42.5;
			default:
			break;
			case "COLORADO":
				nrc+=54;
			break;
			case "IOWA":
				nrc+=48.5;
			break;
			case "IDAHO":
				nrc+=52;
			break;
			case "MINNESOTA":
				nrc+=47.90;
			break;
			case "MONTANA":
				nrc+=61.25;
			break;
			case "NEBRASKA":
				nrc+=45;
			break;
			case "NORTH DAKOTA":
				nrc+=50.51;
			break;
			case "NEW MEXICO":
				nrc+=53.95
			break;
			case "OREGON":
				nrc+=31;
			break;
			case "SOUTH DAKOTA":
				nrc+=47;
			break;
			case "UTAH":
				nrc+=50;
			break;
			case "WASHINGTON":
				nrc+=48;
			break;
			case "WYOMING":
				nrc+=66;
			break;
		}
		return (nrc*lines);
	}	
	
	
	
	//FUNCTION: GetLocalPhoneMonthlyAdditionalLineRate(localPlan, commitment)
	//
	//This function returns the additional (non-primary) line cost based on the plan
	//and commitment level.
	//
	//PARAMETERS:
	//state: State name string as defined in qwestfunctions.js
	//localPlan: Local Phone plan, A,B,C,D or X where X is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	//
	//RETURNS: Monthly cost of additional lines in decimal format
	function GetLocalPhoneMonthlyAdditionalLineRate(state, localPlan, commitment)
	{
		if (debug == true) {
			alert("Price.LocalPhone.GetLocalPhoneMonthlyAdditionalLineRate(state, localPlan, commitment)");
		}	

		/*if(localPlan == "C")
			monthlyServiceRate = GetLocalPhoneMonthlyServiceRate(state, localPlan,commitment);
		else*/
			monthlyServiceRate = GetLocalPhoneMonthlyServiceRate(state, "X",commitment);  //use default price

		return monthlyServiceRate;	
	}

	//FUNCTION: GetLocalPhoneMonthlyAdditionalLinesCost(state, localPlan, commitment, addlLineQty)
	//
	//This function returns the total monthly additional line cost (rate * number of lines)
	//
	//PARAMETERS:
	//state: State name string as defined in qwestfunctions.js
	//localPlan: Local Phone plan, A,B,C,D or X where X is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	//addlLineQty: Number of additional lines
	//
	//RETURNS: Monthly total cost of additional lines
	function GetLocalPhoneMonthlyAdditionalLinesCost(state, localPlan, commitment, addlLineQty)
	{
		var actual = 0.00;
		actual = Number(addlLineQty) * Number(GetLocalPhoneMonthlyAdditionalLineRate(state, localPlan, commitment));

		return Number(actual);
	}
		//Returns whether voice mail is an option for the given plan.
	function IsLocalPhoneVoicemailOptional(plan)
	{
		//Voice mail is included for all plans except plan C
		if(plan == "C")
			return(true);
		else
			return(false);
	}
	
	//END LOCAL PHONE PRICE SUB-CLASS


//////
	// LONG DISTANCE PRICE CLASS
	// Contains all the constants, properties and methods used
	// to manage the pricing of the long distance phone service.
	//
	
	//
	// LONG DISTANCE PRICE CLASS CONSTANTS
	// Constants used in the pricing of long distance phone service.
	//
	
		
	//Discount Rate constants
	var LongDistancePlanBCostPerMinute = 0.07;
	var LongDistancePlanCCostPerMinute = 0.05;

	//
	// LONG DISTANCE PRICE CLASS PROPERTIES
	// Properties used in the pricing of long distance service.
	//
	//none.

	//
	// LONG DISTANCE PRICE CLASS METHODS
	// Methods used in the pricing of long distance phone service.
	//
	//

	
	//FUNCTION: LongDistanceCostPerMinute(plan)
	//
	//This function returns the cost per minute for the given plan.
	//
	//PARAMETERS:
	//ldPlan: Long Distance plan, A,B, or C.
	//
	//RETURNS: cost per minute as a decimal cost.
	function LongDistanceCostPerMinute(ldPlan)
	{
		var costPerMin =0.0;
		if(ldPlan == "B")
		{
			costPerMin = LongDistancePlanBCostPerMinute;
		}
		else if (ldPlan == "C")
		{
			costPerMin = LongDistancePlanCCostPerMinute;
		}
		//else, plan A, unlimited minutes
		
		return(costPerMin);		
	}
	
	//FUNCTION: LongDistanceBasePrice(ldPlan, commitment)
	//
	//This function returns the base price of monthly long distance service for one line.
	//
	//PARAMETERS:
	//ldPlan: Long Distance plan, A,B,C,D or X where X is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	//RETURNS: Base price monthly long distance service per the plan specified
	function LongDistanceBasePrice(ldPlan,commitment)
	{
		var price;

		if (ldPlan == "A") 
		{		
			if (commitment == "3") 
			{
				price = 20.00;
			}
			else 
			{
				price = 22.50;
			}								
		
		}
		else if (ldPlan == "B") 
		{
			price = 3.99;
		}
		else 
		{
			price = 15.00;
		}
		return price;
	
	}

	//FUNCTION: LongDistanceMonthlyServiceRate(ldPlan, commitment, numLines)
	//
	//This function returns the cost of monthly long distance service
	//
	//PARAMETERS:
	//ldPlan: Long Distance plan, A,B,C,D or X where X is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	//numLines: Number of lines with Long Distance service.
	//RETURNS: cost of monthly long distance service
	function LongDistanceMonthlyServiceRate(ldPlan, commitment, numLines)
	{
		var total = (Number(LongDistanceBasePrice(ldPlan,commitment)) * Number(numLines));
		return total;
	}

	//FUNCTION: LongDistanceTotalCost(ldPlan, commitment, numLines)
	//
	//This function returns the total cost of monthly long distance service
	//
	//PARAMETERS:
	//ldPlan: Long Distance plan, A,B,C,D or X where X is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	//numLines: Number of lines with Long Distance service.
	//RETURNS: Total cost of monthly long distance service
	//
	//NOTE: THE TOTAL IS CURRENTLY THE SAME AS THE MONTHLY SERVICE RATE
	//
	function LongDistanceTotalCost(ldPlan, commitment, numLines)
	{
		var total = LongDistanceMonthlyServiceRate(ldPlan, commitment, numLines)
		return total;
	}

	//END LONG DISTANCE PRICE SUB-CLASS


	//////
	// MOBILE BROADBAND PRICE CLASS
	// Contains all the constants, properties and methods used
	// to manage the pricing of the mobile broadband service.
	//
	
	//
	// MOBILE BROADBAND PRICE CLASS CONSTANTS
	// Constants used in the pricing of mobile broadband service.
	//
	var MobileBroadBandHighSpeedDiscount = 20.00;

	var MobileBroadBandHardwareCost2Year = 79.99;
	var MobileBroadBandHardwareCost1Year = 99.99;
	var MobileBroadBandHardwareCostNoAgreement = 239.99;
	
	var MobileBroadBandBasePricePlanA = 79.99;  //MBB Unlimited
	var MobileBroadBandBasePricePlanB = 69.99;  //MBB 600MB
	var MobileBroadBandBasePricePlanC = 59.99;  //MBB 500MB
	var MobileBroadBandBasePriceDefault = MobileBroadBandBasePricePlanA;  //MBB Default 
	
	var MobileBroadBandOverageChargePlanA = 0.00;  //unlimited plan (in dollars)
	var MobileBroadBandOverageChargePlanB = 5.00;  //600 MB plan (in dollars)
	var MobileBroadBandOverageChargePlanC = 3.00;  //500 MB plan (in dollars)
	
	//
	// MOBILE BROADBAND PRICE CLASS PROPERTIES
	// Properties used in the pricing of mobile broadband service.
	//
	
	function MobileBroadBandHighSpeedBundleDiscount() {return(MobileBroadBandHighSpeedDiscount);}
	
	//
	// MOBILE BROADBAND PRICE CLASS METHODS
	// Methods used in the pricing of mobile broadband service.
	//
	//
	
		//FUNCTION: MobileBroadBandMonthlyBasePrice(mbbPlan)
	//
	//This function returns the cost of mobile broadband monthly service base price 
	//given the commitment level.
	//
	//PARAMETERS:
	//mbbPlan: Mobile Broadband plan, A,B, or C
	//RETURNS: Monthly base price of Mobile Broadband service (no discount) as a decimal.
	function MobileBroadBandMonthlyBasePrice(mbbPlan)
	{
	
		if (mbbPlan == "A") 
		{
			// Mobile Broadband Unlimited
			cost = MobileBroadBandBasePricePlanA;
		}
		else if (mbbPlan == "B") 
		{
			// Mobile Broadband 600MB
			cost = MobileBroadBandBasePricePlanB;
		}
		else if (mbbPlan == "C") 
		{
			// Mobile Broadband 500MB
			cost = MobileBroadBandBasePricePlanC;
		}
		else
		{
			//default
			cost =MobileBroadBandBasePricePlanA;
		}
		
		return(cost);
		
	}

	//FUNCTION: MobileBroadBandHardwareCost(commitment)
	//
	//This function returns the cost of mobile broadband hardware given the commitment level.
	//
	//PARAMETERS:
	//commitment: Commitment level ("0","1", or "2")
	//RETURNS: Mobile Broadband hardware cost in decimal format.
	function MobileBroadBandHardwareCost(commitment)
	{
		// Default to no commitment price
		var cost = MobileBroadBandHardwareCostNoAgreement;

		if (commitment == "2") 
		{
			// 2 Year agreement
			cost = MobileBroadBandHardwareCost2Year;
		}
		else if (commitment == "1") 
		{
			// 1 Year agreement
			cost = MobileBroadBandHardwareCost1Year;
		}
		else if (commitment == "0") 
		{
			// No agreement
			cost = MobileBroadBandHardwareCostNoAgreement;
		}
		
		return Number(cost);
	}
	
	//FUNCTION: MobileBroadBandOverageCharge(mbbPlan)
	//
	//This function returns the overage charge cost
	//
	//PARAMETERS:
	//mbbPlan: Mobile Broadband plan, A,B, or C
	//RETURNS: Overage charge in dollars given the plan.
	function MobileBroadBandOverageCharge(mbbPlan)
	{
		var overageCharge = MobileBroadBandOverageChargePlanA;  //default 

		if(mbbPlan == "B")
		{
			overageCharge = MobileBroadBandOverageChargePlanB;
		}
		else if(mbbPlan == "C")
		{
			overageCharge = MobileBroadBandOverageChargePlanC;
		}
		//else use default above

		return(overageCharge);
	}
	
	//FUNCTION: MobileBroadBandMonthlyServiceRate(mbbPlan)
	//
	//This function returns the monthly cost of mobile broadband including any discounts for
	//bundle and high speed order
	//
	//PARAMETERS:
	//mbbPlan: Mobile Broadband plan, A,B, or C
	//RETURNS: cost of discounted mobile broadband service in decimal format.
	function MobileBroadBandMonthlyServiceRate(mbbPlan) 
	{
		var discountApplies = MobileBroadBandDiscountApplies();	

		// Get Mobile Broadband base price
		var cost = MobileBroadBandMonthlyBasePrice(mbbPlan);
		
		//Discount the cost if high speed internet is ordered
		if (String(discountApplies) == "true")
		{
			if(mbb_debug == "yes") alert("Applying discount: "+String(MobileBroadBandHighSpeedBundleDiscount()) + " to base cost: " + String(cost));
			cost = Number(cost) - Number(MobileBroadBandHighSpeedBundleDiscount());
		}
		
		return Number(cost);
	}
	
	
	//FUNCTION: MobileBroadBandDiscountApplies()
	//
	//This function returns whether the discount applies for mobile broadband service.
	//
	//PARAMETERS:
	//none.
	//RETURNS: True if discount for Mobile broadband service is applicable
	function MobileBroadBandDiscountApplies()
	{
		var discountApplies = false;  //default to No discount.
		var hiSpeedOneCmt = Get_Cookie('HSI_CMT')
		
		//Discount applies if high speed internet has been ordered for more than one year commitment
		if(IsHighSpeedInternetSelected() == 'true' && Number(hiSpeedOneCmt) > 1)
		{
			if(mbb_debug == "yes") alert("HSI Commitment: " + String(hiSpeedOneCmt) + "  MBB discount applies.");			
			discountApplies = true;	
		}
		else
		{
			discountApplies = false;
		}	
		
		return(discountApplies);
			
	}

	//END MOBILE BROADBAND PRICE SUB-CLASS


	//////
	// WIRELESS MOBILE PRICE CLASS
	// Contains all the constants, properties and methods used
	// to manage the pricing of the wireless mobile phone service
	// and accessories.
	//
	
	//
	// WIRELESS MOBILE  PRICE CLASS CONSTANTS
	// Constants used in the pricing of wireless mobile phone 
	// service and accessories.
	//

	//Hardware prices, discounts, rebates and credits
	var WirelessMobile_MotoQSmartPhoneName = "moto_q_smart_phone";
	var WirelessMobile_MotoQSmartPhoneRegPrice = 0.00;
	var WirelessMobile_MotoQSmartPhoneDiscount = 0.00;
	var WirelessMobile_MotoQSmartPhoneRebate = 50.00;
	var WirelessMobile_MotoQSmartPhoneBillCredit = 0.00;
	var WirelessMobile_MotoQSmartPhoneChargerCost = 29.95;
	var WirelessMobile_MotoQSmartPhoneChargerIncluded = false;
	var WirelessMobile_MotoQSmartPhoneActualPrice = 79.99;


	var WirelessMobile_MogulHTCSmartPhoneName = "mogul_by_htc_smart_phone";  //default phone
	var WirelessMobile_MogulHTCSmartPhoneRegPrice = 499.99;
	var WirelessMobile_MogulHTCSmartPhoneDiscount = 200.00;
	var WirelessMobile_MogulHTCSmartPhoneRebate = 50.00;
	var WirelessMobile_MogulHTCSmartPhoneBillCredit = 0.00;
	var WirelessMobile_MogulHTCSmartPhoneChargerCost = 29.95;
	var WirelessMobile_MogulHTCSmartPhoneChargerIncluded = false;
	
	var WirelessMobile_SanyoKatanaPinkPhoneName = "sanyo_katana_ii_pink";
	var WirelessMobile_SanyoKatanaPinkPhoneRegPrice = 0.00;
	var WirelessMobile_SanyoKatanaPinkPhoneDiscount = 0.00;
	var WirelessMobile_SanyoKatanaPinkPhoneRebate = 0.00;
	var WirelessMobile_SanyoKatanaPinkPhoneBillCredit = 0.00;
	var WirelessMobile_SanyoKatanaPinkPhoneChargerCost = 29.95;
	var WirelessMobile_SanyoKatanaPinkPhoneChargerIncluded = false;
	var WirelessMobile_SanyoKatanaPinkPhoneActualPrice = 39.99;
			
	var WirelessMobile_SanyoKatanaBlackPhoneName = "sanyo_katana_ii_black";
	var WirelessMobile_SanyoKatanaBlackPhoneRegPrice = 0.00;
	var WirelessMobile_SanyoKatanaBlackPhoneDiscount = 0.00;
	var WirelessMobile_SanyoKatanaBlackPhoneRebate = 0.00;
	var WirelessMobile_SanyoKatanaBlackPhoneBillCredit = 0.00;
	var WirelessMobile_SanyoKatanaBlackPhoneChargerCost = 29.95;
	var WirelessMobile_SanyoKatanaBlackPhoneChargerIncluded = false;
	var WirelessMobile_SanyoKatanaBlackPhoneActualPrice = 39.99;
	
	var WirelessMobile_Sanyo7050PhoneName = "sanyo_7050";
	var WirelessMobile_Sanyo7050PhoneRegPrice = 249.99;
	var WirelessMobile_Sanyo7050PhoneDiscount = 160.00;
	var WirelessMobile_Sanyo7050PhoneRebate = 0.00;
	var WirelessMobile_Sanyo7050PhoneBillCredit = 0.00;
	var WirelessMobile_Sanyo7050PhoneChargerCost = 29.95;
	var WirelessMobile_Sanyo7050PhoneChargerIncluded = false;
	
	var WirelessMobile_KyoceraK132PhoneName = "kyocera_k132";
	var WirelessMobile_KyoceraK132PhoneRegPrice = 159.99;
	var WirelessMobile_KyoceraK132PhoneDiscount = 159.99;
	var WirelessMobile_KyoceraK132PhoneRebate = 0.00;
	var WirelessMobile_KyoceraK132PhoneBillCredit = 0.00;
	var WirelessMobile_KyoceraK132PhoneChargerCost = 29.95;
	var WirelessMobile_KyoceraK132PhoneChargerIncluded = false;
	
	var WirelessMobile_QwestFusionHTC5800PhoneName = "qwest_fusion_htc_5800";
	var WirelessMobile_QwestFusionHTC5800PhoneRegPrice = 399.99;
	var WirelessMobile_QwestFusionHTC5800PhoneDiscount = 200.00;
	var WirelessMobile_QwestFusionHTC5800PhoneRebate = 50.00;
	var WirelessMobile_QwestFusionHTC5800PhoneBillCredit = 0.00;
	var WirelessMobile_QwestFusionHTC5800PhoneChargerCost = 29.95;
	var WirelessMobile_QwestFusionHTC5800PhoneChargerIncluded = true;


	var WirelessMobileBasePricePlanA = 59.99;  //1000 anytime mins
	var WirelessMobileBasePricePlanB = 39.99;  //500 anytime mins
	var WirelessMobileBasePricePlanC = 119.99;  //2500 anytime mins
	var WirelessMobileBasePriceDefault = WirelessMobileBasePricePlanC;  //Mobile Phone Plan Default 
	
	var wirelessMobileMinimumPlanPrice = 29.99;  //shown on Order summary page, not used in pricing.

	var WirelessMobileFeatureRoadsideAsst = 3.99;
	var WirelessMobileFeatureSprintPowerVision = 10.00;
	var WirelessMobileFeatureInsurance = 4.99;
	var WirelessMobileFeatureUnlimitedNightsWknds = 10.00;
	
	var WirelessMobileTextMessageMax = 15.00;
	var WirelessMobileTextMessageRate = 0.05;
	
	var WirelessMiscFeesActivation = 35.00;
	var WirelessMiscFeesShipping = 0.00;
	
	//// WIRELESS MOBILE PRICE CLASS PROPERTIES
	// Properties used in the pricing of wireless mobile phone 
	// service and accessories.
	//
	function WirelessMobileMinimumPlanPrice()   {return(wirelessMobileMinimumPlanPrice); }
	
	//Properties for hardware prices and discounts
	//
	function GetWirelessMobilePhoneRegPrice(phoneName)
	{
		switch(phoneName)
		{
			case WirelessMobile_MotoQSmartPhoneName:
				return(WirelessMobile_MotoQSmartPhoneRegPrice);
				break;
			case WirelessMobile_MogulHTCSmartPhoneName:
				return(WirelessMobile_MogulHTCSmartPhoneRegPrice);
				break;
			case WirelessMobile_SanyoKatanaPinkPhoneName:
				return(WirelessMobile_SanyoKatanaPinkPhoneRegPrice);
				break;
			case WirelessMobile_SanyoKatanaBlackPhoneName:
				return(WirelessMobile_SanyoKatanaBlackPhoneRegPrice);
				break;
			case WirelessMobile_Sanyo7050PhoneName:
				return(WirelessMobile_Sanyo7050PhoneRegPrice);
				break;
			case WirelessMobile_KyoceraK132PhoneName:
				return(WirelessMobile_KyoceraK132PhoneRegPrice);
				break;
            case WirelessMobile_QwestFusionHTC5800PhoneName:
            	return(WirelessMobile_QwestFusionHTC5800PhoneRegPrice);
            	break;
			default:
				return(WirelessMobile_MogulHTCSmartPhoneRegPrice);
				break;
		}
	}


	function GetWirelessMobilePhoneDiscount(phoneName)
	{
		switch(phoneName)
		{
			case WirelessMobile_MotoQSmartPhoneName:
				return(WirelessMobile_MotoQSmartPhoneDiscount);
				break;
			case WirelessMobile_MogulHTCSmartPhoneName:
				return(WirelessMobile_MogulHTCSmartPhoneDiscount);
				break;
			case WirelessMobile_SanyoKatanaPinkPhoneName:
				return(WirelessMobile_SanyoKatanaPinkPhoneDiscount);
				break;
			case WirelessMobile_SanyoKatanaBlackPhoneName:
				return(WirelessMobile_SanyoKatanaBlackPhoneDiscount);
				break;
			case WirelessMobile_Sanyo7050PhoneName:
				return(WirelessMobile_Sanyo7050PhoneDiscount);
				break;
			case WirelessMobile_KyoceraK132PhoneName:
				return(WirelessMobile_KyoceraK132PhoneDiscount);
				break;
            case WirelessMobile_QwestFusionHTC5800PhoneName:
				return(WirelessMobile_QwestFusionHTC5800PhoneDiscount);
				break;           
			default:
				return(WirelessMobile_MogulHTCSmartPhoneDiscount);
				break;
		}
	}
	function GetWirelessMobilePhoneRebate(phoneName,wlsPhonePlan,wlsPhoneCommitment)
	{
		switch(phoneName)
		{
			case WirelessMobile_MotoQSmartPhoneName:
				return(WirelessMobile_MotoQSmartPhoneRebate);
				break;
			case WirelessMobile_MogulHTCSmartPhoneName:
				return(WirelessMobile_MogulHTCSmartPhoneRebate);
				break;
			case WirelessMobile_SanyoKatanaPinkPhoneName:
				return(WirelessMobile_SanyoKatanaPinkPhoneRebate);
				break;
			case WirelessMobile_SanyoKatanaBlackPhoneName:
				return(WirelessMobile_SanyoKatanaBlackPhoneRebate);			
				break;
			case WirelessMobile_Sanyo7050PhoneName:
				return(WirelessMobile_Sanyo7050PhoneRebate);
				break;
			case WirelessMobile_KyoceraK132PhoneName:
				return(WirelessMobile_KyoceraK132PhoneRebate);
				break;
			case WirelessMobile_QwestFusionHTC5800PhoneName:
				return(WirelessMobile_QwestFusionHTC5800PhoneRebate);
				break;				
			default:
				return(WirelessMobile_MogulHTCSmartPhoneRebate);
				break;

		}
	}
	

	function GetWirelessMobilePhoneBillCredit(phoneName)
	{
		switch(phoneName)
		{
			case WirelessMobile_MotoQSmartPhoneName:
				return(WirelessMobile_MotoQSmartPhoneBillCredit);
				break;
			case WirelessMobile_MogulHTCSmartPhoneName:
				return(WirelessMobile_MogulHTCSmartPhoneBillCredit);
				break;
			case WirelessMobile_SanyoKatanaPinkPhoneName:
				return(WirelessMobile_SanyoKatanaPinkPhoneBillCredit);
				break;
			case WirelessMobile_SanyoKatanaBlackPhoneName:
				return(WirelessMobile_SanyoKatanaBlackPhoneBillCredit);
				break;
			case WirelessMobile_Sanyo7050PhoneName:
				return(WirelessMobile_Sanyo7050PhoneBillCredit);
				break;
			case WirelessMobile_KyoceraK132PhoneName:
				return(WirelessMobile_KyoceraK132PhoneBillCredit);
				break;
			case WirelessMobile_QwestFusionHTC5800PhoneName:
				return(WirelessMobile_QwestFusionHTC5800PhoneBillCredit);
				break;
			default:
				return(WirelessMobile_MogulHTCSmartPhoneBillCredit);
				break;

		}
	}
	
	function GetWirelessMobilePhoneChargerCost(phoneName)
	{
		switch(phoneName)
		{
			case WirelessMobile_MotoQSmartPhoneName:
				return(WirelessMobile_MotoQSmartPhoneChargerCost);
				break;
			case WirelessMobile_MogulHTCSmartPhoneName:
				return(WirelessMobile_MogulHTCSmartPhoneChargerCost);
				break;
			case WirelessMobile_SanyoKatanaPinkPhoneName:
				return(WirelessMobile_SanyoKatanaPinkPhoneChargerCost);
				break;
			case WirelessMobile_SanyoKatanaBlackPhoneName:
				return(WirelessMobile_SanyoKatanaBlackPhoneChargerCost);
				break;
			case WirelessMobile_Sanyo7050PhoneName:
				return(WirelessMobile_Sanyo7050PhoneChargerCost);
				break;
			case WirelessMobile_KyoceraK132PhoneName:
				return(WirelessMobile_KyoceraK132PhoneChargerCost);
				break;
			case WirelessMobile_QwestFusionHTC5800PhoneName:
				return(WirelessMobile_QwestFusionHTC5800PhoneChargerCost);
				break;				
			default:
				return(WirelessMobile_MogulHTCSmartPhoneChargerCost);
				break;
		}
	}

	function GetWirelessMobilePhoneChargerIncluded(phoneName)
	{
		switch(phoneName)
		{
			case WirelessMobile_MotoQSmartPhoneName:	
				if(wls_debug == "yes") alert("Wls phone: charger included " + phoneName + "  " +  WirelessMobile_MotoQSmartPhoneChargerIncluded);
				return(WirelessMobile_MotoQSmartPhoneChargerIncluded);
				break;
			case WirelessMobile_MogulHTCSmartPhoneName:
				if(wls_debug == "yes") alert("Wls phone: charger included " + phoneName + "  " +  WirelessMobile_MogulHTCSmartPhoneChargerIncluded);
				return(WirelessMobile_MogulHTCSmartPhoneChargerIncluded);
				break;
			case WirelessMobile_SanyoKatanaPinkPhoneName:
				if(wls_debug == "yes") alert("Wls phone: charger included " + phoneName + "  " +  WirelessMobile_SanyoKatanaPinkPhoneChargerIncluded);
				return(WirelessMobile_SanyoKatanaPinkPhoneChargerIncluded);
				break;
			case WirelessMobile_SanyoKatanaBlackPhoneName:
				if(wls_debug == "yes") alert("Wls phone: charger included " + phoneName + "  " +  WirelessMobile_SanyoKatanaBlackPhoneChargerIncluded);
				return(WirelessMobile_SanyoKatanaBlackPhoneChargerIncluded);
				break;
			case WirelessMobile_Sanyo7050PhoneName:
				if(wls_debug == "yes") alert("Wls phone: charger included " + phoneName + "  " +  WirelessMobile_Sanyo7050PhoneChargerIncluded);
				return(WirelessMobile_Sanyo7050PhoneChargerIncluded);
				break;
			case WirelessMobile_KyoceraK132PhoneName:
				if(wls_debug == "yes") alert("Wls phone: charger included " + phoneName + "  " +  WirelessMobile_KyoceraK132PhoneChargerIncluded);
				return(WirelessMobile_KyoceraK132PhoneChargerIncluded);
				break;
			case WirelessMobile_QwestFusionHTC5800PhoneName:
				if(wls_debug == "yes") alert("Wls phone: charger included " + phoneName + "  " +  WirelessMobile_KyoceraK132PhoneChargerIncluded);
				return(WirelessMobile_QwestFusionHTC5800PhoneChargerIncluded);
				break;
			default:
				if(wls_debug == "yes") alert("Wls phone: charger included " + phoneName + "  " +  WirelessMobile_MogulHTCSmartPhoneChargerIncluded);
				return(WirelessMobile_MogulHTCSmartPhoneChargerIncluded);
				break;
		}
	}
	
	//Properties for Wireless Mobile Features
	function GetWirelessMobileFeatureRoadSideAsstCost()			{	return(WirelessMobileFeatureRoadsideAsst); }
	function GetWirelessMobileFeatureSprintPowerVisionCost()	{	return(WirelessMobileFeatureSprintPowerVision); }
	function GetWirelessMobileFeatureUnlimitedNightsWkndsCost()	{	return(WirelessMobileFeatureUnlimitedNightsWknds); 	}
	function GetWirelessMobileFeatureInsuranceCost() 		    { 	return(WirelessMobileFeatureInsurance); 	}
		
	//Properties for Wireless Mobile Text Messaging
	function GetWirelessMobileTextMessageMaximum() 	{	return(WirelessMobileTextMessageMax);  }
	function GetWirelessMobileTextMessageRate() 	{	return(WirelessMobileTextMessageRate); }
	
	//Fees
	function GetWirelessMiscFeesActivation() { return(WirelessMiscFeesActivation); }
	function GetWirelessMiscFeesShipping()   { return(WirelessMiscFeesShipping);   }

	function GetWirelessMiscFeesTotal() 
	{
		var totalFees = GetWirelessMiscFeesActivation() + GetWirelessMiscFeesShipping();
		return(totalFees);
	}

	//
	// WIRELESS MOBILE PRICE CLASS METHODS
	// Methods used in the pricing of wireless mobile phone 
	// service and accessories.
	//
	//


	//FUNCTION: GetWirelessMobilePhoneChargerActualCost(phoneName,isChargerSelected)
	//
	//This function returns the actual charger cost (0.00 if included)
	//
	//PARAMETERS:
	//none.
	//RETURNS: Actual charger cost in decimal dollars (0.00 if included)
	function GetWirelessMobilePhoneChargerActualCost(phoneName,isChargerSelected)
	{
		var actualCost = 0.00;
		var chargerIncluded = GetWirelessMobilePhoneChargerIncluded(phoneName);

		if(chargerIncluded == false)
		{
		    if(isChargerSelected == "true")
		    {
			    actualCost = GetWirelessMobilePhoneChargerCost(phoneName);
			}
		}
		
		return(actualCost);
	}	
	
	//FUNCTION: GetWirelessMobilePhoneActualCost(phoneName,plan,commitment)
	//
	//This function returns the mobile phone's actual cost (reg price less discounts and rebates)
	//
	//PARAMETERS:
	//phoneName - phone name
	//plan - mobile phone plan (A,B,C)
	//commitment - agreement (0, 1, 2, 3 years)
	//RETURNS: Discounted phone cost in decimal dollars.
	function GetWirelessMobilePhoneActualCost(phoneName, plan, commitment)
	{
		var actualCost=0.00;
		var regPrice=0.00;
		var rebate=0.00;
		var discount=0.00;
		var billCredit=0.00;
		
		phoneName = String(phoneName).toLowerCase();
		
		regPrice = GetWirelessMobilePhoneRegPrice(phoneName);
		rebate = GetWirelessMobilePhoneRebate(phoneName, plan,commitment);
		discount = GetWirelessMobilePhoneDiscount(phoneName);
		billCredit = GetWirelessMobilePhoneBillCredit(phoneName);
	
	    if(regPrice == 0)
	    {
	        switch(phoneName)
	        {
	            case WirelessMobile_MotoQSmartPhoneName:
                    actualCost = WirelessMobile_MotoQSmartPhoneActualPrice;
                    break;
                case WirelessMobile_SanyoKatanaBlackPhoneName:
                    actualCost = WirelessMobile_SanyoKatanaBlackPhoneActualPrice;
                    break;
                case WirelessMobile_SanyoKatanaPinkPhoneName:
                    actualCost = WirelessMobile_SanyoKatanaPinkPhoneActualPrice;
                    break;
                default:
                    actualCost = 0.0;
                    break;
            }
        }
        else
        {
    		actualCost = regPrice - (rebate + discount + billCredit);
		
		    //Adjust to "free" if cost is less than $0.50.
		    if(actualCost < 0.50)
		    {
			    actualCost = 0.0;
		    }
        }		
		return(actualCost);		
	}
	
	//RETURNS: Phone cost + accessories cost in decimal dollars
	function GetWirelessMobilePhoneTotalCost(phoneModel,plan, commitment, chargerSelected)
	{
		var hardwareCost = GetWirelessMobilePhoneActualCost(phoneModel,plan,commitment); 	
		var chargerActualCost = GetWirelessMobilePhoneChargerActualCost(phoneModel, chargerSelected);  //returns 0.0 if included.
		
		if((phoneModel == "Mogul_by_HTC_Smart_Phone" || phoneModel == "mogul_by_htc_smart_phone") && chargerSelected == "true")
			hardwareCost += chargerActualCost;
		if((phoneModel == "Sanyo_7050" || phoneModel == "sanyo_7050") && chargerSelected == "true")
			hardwareCost += chargerActualCost;
		if((phoneModel == "Sanyo_Katana_II_Pink" || phoneModel == "sanyo_katana_ii_pink") && chargerSelected == "true")
			hardwareCost += chargerActualCost;
		if((phoneModel == "Sanyo_Katana_II_Black" || phoneModel == "sanyo_katana_ii_black") && chargerSelected == "true")
			hardwareCost += chargerActualCost;
		if((phoneModel == "Moto_Q_Smart_Phone" || phoneModel == "moto_q_smart_phone") && chargerSelected == "true")
			hardwareCost += chargerActualCost;
		if((phoneModel == "kyocera_k132" || phoneModel == "kyocera_k132") && chargerSelected == "true")
			hardwareCost += chargerActualCost;
		if((phoneModel == "Qwest_Fusion_HTC_5800" || phoneModel == "qwest_fusion_htc_5800") && chargerSelected == "true")
			hardwareCost += chargerActualCost;
		return(hardwareCost);
	}

	
	//FUNCTION: GetWirelessMobilePhoneMonthlyServiceRate(phoneName)
	//
	//This function returns the cost of monthly mobile service given the plan and commitment.
	//plan: Mobile Phone plan, A,B,or C, where A is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	//
	//PARAMETERS:
	//none.
	//RETURNS: Discounted phone cost in decimal dollars.


	function GetWirelessMobilePhoneMonthlyServiceRate(plan, commitment) 
	{
		var price = WirelessMobileBasePriceDefault;

		if (plan == "A") 
		{
			price = WirelessMobileBasePricePlanA;
		}
		else if (plan == "B") 
		{
			price = WirelessMobileBasePricePlanB;
		}
		else 
		{
			price = WirelessMobileBasePriceDefault;
		}
		return price;
	}
	
		
	//FUNCTION: GetWirelessMobilePhoneMonthlyServiceCost(plan, commitment, numLines)
	//
	//This function returns the total cost of monthly mobile phone service given the plan, commitment and 
	//number of lines.
	//plan: Mobile Phone plan, A,B,or C, where A is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	//numLines: Number of lines of service
	//PARAMETERS:
	//none.
	//RETURNS: Total monthly phone service cost
	function GetWirelessMobilePhoneMonthlyServiceCost(plan, commitment, numLines)
	{
		var total = (Number(GetWirelessMobilePhoneMonthlyServiceRate(plan,commitment)) * Number(numLines));
		return total;
	}
	

	//FUNCTION: GetWirelessMobilePhoneMonthlyFeatureCost(isRoadside, isSprintPowVision, isNightsWknds, isInsurance)
	//
	//This function returns the total cost of monthly mobile phone features.
	//isRoadside: True if Roadside Assistance selected
	//isSprintPowVision: True if Sprint Power Vision is selected
	//isNightsWknds: True if unlimited Nights/Weekends selected
	//isInsurance: True if Insurance is selected
	//PARAMETERS:
	//none.
	//RETURNS: Total monthly features cost
	function GetWirelessMobilePhoneMonthlyFeatureCost(isRoadside, isSprintPowVision, isNightsWknds, isInsurance)
	{
		var tmonthlyfeature = 0.00;

		if(isRoadside == true) { tmonthlyfeature += GetWirelessMobileFeatureRoadSideAsstCost(); }
		if(isSprintPowVision == true) { tmonthlyfeature += GetWirelessMobileFeatureSprintPowerVisionCost(); }
		if(isNightsWknds == true) { tmonthlyfeature += GetWirelessMobileFeatureUnlimitedNightsWkndsCost(); }
		if(isInsurance == true) { tmonthlyfeature += GetWirelessMobileFeatureInsuranceCost(); }

		return tmonthlyfeature;
	}
		
	//FUNCTION: GetWirelessMobilePhoneMonthlyTotalCost(plan, commitment, numLines, isRoadside, isSprintPowVision, isNightsWknds, isInsurance)
	//
	//This function returns the total cost of monthly mobile phone service given the plan, commitment and 
	//number of lines.
	//plan: Mobile Phone plan, A,B,or C, where A is the default.
	//commitment: Commitment level ("0","1","2" or "3")
	//numLines: Number of lines of service
	//isRoadside: True if Roadside Assistance selected
	//isSprintPowVision: True if Sprint Power Vision is selected
	//isNightsWknds: True if unlimited Nights/Weekends selected
	//isInsurance: True if Insurance is selected	
	//PARAMETERS:
	//none.
	//RETURNS: Total monthly phone service cost (total service + total features)
	function GetWirelessMobilePhoneMonthlyTotalCost(plan, commitment, numLines, isRoadside, isSprintPowVision, isNightsWknds, isInsurance)
	{
		var total = 0.0;
		total = GetWirelessMobilePhoneMonthlyServiceCost(plan,commitment,numLines);
		total += GetWirelessMobilePhoneMonthlyFeatureCost(isRoadside, isSprintPowVision, isNightsWknds, isInsurance);
		
		return total;
	}

	
	
	//END MOBILE BROADBAND PRICE SUB-CLASS
	
	//////
	// HIGH SPEED INTERNET PRICE CLASS
	// Contains all the constants, properties and methods used
	// to manage the pricing of the HSI service
	// and accessories.
	//
	
	//
	// HIGH SPEED INTERNET PRICE CLASS CONSTANTS
	// Constants used in the pricing of HSI service and accessories.
	//

	//
	// HIGH-SPEED INTERNET
	//

	var HighSpeedInternetBundle_OfficePlus_256_M = 50.00;
	var HighSpeedInternetBundle_OfficePlus_1_5_M = 62.50;
	var HighSpeedInternetBundle_OfficePlus_7_M = 81.25;
    var HighSpeedInternetBundle_OfficePlus_12_M = 103.25;	
    var HighSpeedInternetBundle_OfficePlus_20_M = 137.50;    

	var HighSpeedInternetBundle_OfficeBasic_256_M = 38.00;
	var HighSpeedInternetBundle_OfficeBasic_1_5_M = 50.50;
	var HighSpeedInternetBundle_OfficeBasic_7_M = 69.25;
	var HighSpeedInternetBundle_OfficeBasic_12_M = 94.25;
	var HighSpeedInternetBundle_OfficeBasic_20_M = 125.50;
	

	var HighSpeedInternet_OfficePlus_256_M = 67.5;
	var HighSpeedInternet_OfficePlus_1_5_M = 67.5;
	var HighSpeedInternet_OfficePlus_7_M = 86.25;
	var HighSpeedInternet_OfficePlus_12_M = 111.25;
	var HighSpeedInternet_OfficePlus_20_M = 142.50;

	var HighSpeedInternet_OfficeBasic_256_M = 55.50;
	var HighSpeedInternet_OfficeBasic_1_5_M = 55.50;
	var	HighSpeedInternet_OfficeBasic_7_M = 74.25;
	var HighSpeedInternet_OfficeBasic_12_M = 99.25;
	var	HighSpeedInternet_OfficeBasic_20_M = 130.50;


	// COMMITMENT DISCOUNTS
	var HighSpeedInternet3YearAgreementDiscount = .20;
	var HighSpeedInternet3YearAgreementDiscountText = "20%";
	var HighSpeedInternet2YearAgreementDiscount = .15;
	var HighSpeedInternet2YearAgreementDiscountText = "15%";
	var HighSpeedInternet1YearAgreementDiscount = .10;
	var HighSpeedInternet1YearAgreementDiscountText = "10%";
	var HighSpeedInternetNoAgreementDiscount = 0;

	var HighSpeedInternetActivationFee = 9.99;

	// MODEMS - WIRELESS
	var HighSpeedInternetModemWirelessPurchase = 129.99;
	var HighSpeedInternetModemWirelessRent = 8.00;

	// MODEMS - WIRED
	var HighSpeedInternetModemWiredPurchase = 59.99;
	var HighSpeedInternetModemWiredRent = 5.00;

	// OTHER ACCESSORIES
	var HighSpeedInternetUsbAdapterPurchase = 45.00;
	var HighSpeedInternetUsbAdapterDiscount = 20.00;
	var HighSpeedInternetLaptopCardPurchase = 45.00;
	var HighSpeedInternetLaptopCardDiscount = 20.00;
	
	//
	// HIGH SPEED INTERNET PRICE CLASS PROPERTIES
	// Properties used in the pricing of HSI service and accessories.
	//

	//Properties for USB adapters and laptop card prices
	function HighSpeedInternetWirelessUsbAdapterDiscount() { return (HighSpeedInternetUsbAdapterDiscount); }
	function HighSpeedInternetWirelessLaptopCardDiscount() { return (HighSpeedInternetLaptopCardDiscount); }
	function HighSpeedInternetWirelessUsbAdapterActualPrice() { return (HighSpeedInternetUsbAdapterPurchase - HighSpeedInternetUsbAdapterDiscount); }
	function HighSpeedInternetWirelessLaptopCardActualPrice() { return (HighSpeedInternetLaptopCardPurchase - HighSpeedInternetLaptopCardDiscount); }


	function HighSpeedInternet3YearDiscountText()       { return (HighSpeedInternet3YearAgreementDiscountText); }
	function HighSpeedInternet2YearDiscountText()       { return (HighSpeedInternet2YearAgreementDiscountText); }
	function HighSpeedInternet1YearDiscountText()       { return (HighSpeedInternet1YearAgreementDiscountText); }
	function HighSpeedInternetModemWirelessPurchasePrice() 	{ return(HighSpeedInternetModemWirelessPurchase); }
	function HighSpeedInternetModemWirelessRentPrice()   	{ return(HighSpeedInternetModemWirelessRent); }
	function HighSpeedInternetModemWiredPurchasePrice() 	{ return(HighSpeedInternetModemWiredPurchase); }
	function HighSpeedInternetModemWiredRentPrice()			{ return(HighSpeedInternetModemWiredRent); }
	
	//
	// HIGH SPEED INTERNET PRICE CLASS METHODS
	// Methods used in the pricing of HSI service and accessories.
	//
	
	//FUNCTION: GetHighSpeedInternetMonthlyBasePrice(speed, plantype)
	//
	//This function computes the base monthly cost of high speed internet service given the speed and plan type.
	//PARAMETERS:
	//speed: High speed internet speed, 256KB/s, 1.5MB/s, or 7MB/s.
	//planType: High speed internet plan, "plus" or "basic"
	//
	//RETURNS: Base monthly cost of high speed internet service
	function GetHighSpeedInternetMonthlyBasePrice(speed, plantype) 
	{
		var phoneBundle = "false";
		phoneBundle = IsPhoneSelected();
		
		if((hsi_debug == "yes") && (phoneBundle == "true")) alert("HSI Bundle pricing is in effect.");
		
		if (speed == "256") 
		{
			if (plantype == "plus") 
			{
				//if part of a bundle, then use the bundle pricing
				if(phoneBundle == "true") 
					return HighSpeedInternetBundle_OfficePlus_256_M;
				else 
					return HighSpeedInternet_OfficePlus_256_M;
			}
			else 
			{
				//if part of a bundle, then use the bundle pricing
				if(phoneBundle == "true") 
					return HighSpeedInternetBundle_OfficeBasic_256_M;
				else
					return HighSpeedInternet_OfficeBasic_256_M;				
			}
		}		
		else if (speed == "1_5") 
		{
			if (plantype == "plus") 
			{
				//if part of a bundle, then use the bundle pricing
				if(phoneBundle == "true") 
					return HighSpeedInternetBundle_OfficePlus_1_5_M;
				else
					return HighSpeedInternet_OfficePlus_1_5_M;			
			}
			else 
			{
				//if part of a bundle, then use the bundle pricing
				if(phoneBundle == "true") 
					return HighSpeedInternetBundle_OfficeBasic_1_5_M;
				else
					return HighSpeedInternet_OfficeBasic_1_5_M;				
			}
		}		
		else if (speed == "7")
		{
			if (plantype == "plus") 
			{
				//if part of a bundle, then use the bundle pricing
				if(phoneBundle == "true")
					return HighSpeedInternetBundle_OfficePlus_7_M;
				else
					return HighSpeedInternet_OfficePlus_7_M;
			}
			else 
			{
				if(phoneBundle == "true")
					return HighSpeedInternetBundle_OfficeBasic_7_M;
				else
					return HighSpeedInternet_OfficeBasic_7_M;				
			}
		}		
		else if (speed == "12")
		{
			if (plantype == "plus") 
			{
				//if part of a bundle, then use the bundle pricing
				if(phoneBundle == "true")
					return HighSpeedInternetBundle_OfficePlus_12_M;
				else
					return HighSpeedInternet_OfficePlus_12_M;
			}
			else 
			{
				if(phoneBundle == "true")
					return HighSpeedInternetBundle_OfficeBasic_12_M;
				else
					return HighSpeedInternet_OfficeBasic_12_M;				
			}
		}		
		else
		{
		    //speed = 20
			if (plantype == "plus") 
			{
				//if part of a bundle, then use the bundle pricing
				if(phoneBundle == "true")
					return HighSpeedInternetBundle_OfficePlus_20_M;
				else
					return HighSpeedInternet_OfficePlus_20_M;
			}
			else 
			{
				if(phoneBundle == "true")
					return HighSpeedInternetBundle_OfficeBasic_20_M;
				else
					return HighSpeedInternet_OfficeBasic_20_M;				
			}
		}		
	}
	
	//FUNCTION: GetHighSpeedInternetDiscountRate(commitmentYears)
	//
	//This function retrieves the discounted high speed internet monthly service 
	//rate given the commitment level.
	//PARAMETERS:
	//commitmentYears: Commitment level in years (0,1,2,3)
	//RETURN: Discount rate as a decimal.
	function GetHighSpeedInternetDiscountRate(commitmentYears)
	{
		if (commitmentYears == "3") 
		{
			return HighSpeedInternet3YearAgreementDiscount;
		}
		else if (commitmentYears == "2") 
		{
			return HighSpeedInternet2YearAgreementDiscount;
		}
		else if (commitmentYears == "1") 
		{
			return HighSpeedInternet1YearAgreementDiscount;
		}
		else 
		{
			return HighSpeedInternetNoAgreementDiscount;
		}	
	} 

	//FUNCTION: GetHighSpeedInternetMonthlyServiceActualRate(speed, plantype, commitmentYears)
	//
	//This function retrieves the actual (discounted) high speed internet monthly service 
	//rate given the speed, plan type, and commitment level.
	//PARAMETERS:
	//speed: High speed internet speed, 256KB/s, 1.5MB/s, or 7MB/s.
	//planType: High speed internet plan, "plus" or "basic"
	//commitmentYears: Commitment level in years ("0","1","2","3")
	//
	//RETURN: Monthly service rate after discount as a decimal.
	function GetHighSpeedInternetMonthlyServiceActualRate(speed, plantype, commitmentYears)
	{
		var discountRate = GetHighSpeedInternetDiscountRate(commitmentYears);		
		var baseMonthly = GetHighSpeedInternetMonthlyBasePrice(speed, plantype);
		var actualRate = baseMonthly - (baseMonthly * discountRate);
		
		return(actualRate);
	}
	
	//FUNCTION: GetHighSpeedInternetActivationFee()
	//
	//This function retrieves the activation fee.
	//PARAMETERS:
	//none.
	//
	//RETURNS: Activation fee in decimal dollars.
	function GetHighSpeedInternetActivationFee()
    {
		var phoneBundle = IsPhoneSelected();
		var hsiBundle = IsHighSpeedInternetSelected(); 
		var actFee = 0.00;
		      
        //act fee only valid with HSI and local phone service not in a bundle
		if(hsiBundle == "true")
		{
			if(phoneBundle != "true") 
			{
				if(hsi_debug == "yes") alert("HSI Activation fee is applicable.");
				actFee = HighSpeedInternetActivationFee;
			}
		}
        return actFee;
    }
    
	//FUNCTION: GetHighSpeedInternetMonthlyModemCost(modemOwnership, modemType)
	//
	//This function retrieves the high speed internet monthly modem service cost.
	//PARAMETERS:
	//modemOwnership: Modem rented or owned.
	//modemType: Modem type (Wireless or Wired)
	//
    //RETURNS: Monthly cost of modem rental in decimal dollars
    function GetHighSpeedInternetMonthlyModemCost(modemOwnership, modemType)
    {
    	var monthlyCost = 0.00;

		modemOwnership = String(modemOwnership).toLowerCase();
		modemType = String(modemType).toLowerCase();
	
		if(hsi_debug == "yes") alert("Modem Own: "+ String(modemOwnership) + "  Modem Type: " + String(modemType));
		
		if (modemOwnership == 'rent')
		{
			if(modemType == 'wireless')		
				monthlyCost = HighSpeedInternetModemWirelessRentPrice();		
			else if(modemType == 'wired')
				monthlyCost = HighSpeedInternetModemWiredRentPrice();
		}
		
		if(hsi_debug == "yes") alert("Monthly modem Cost: "+ monthlyCost);

		return(monthlyCost);
    }
    
	//FUNCTION: GetHighSpeedInternetOneTimeModemCost(modem)
	//
	//This function retrieves the high speed internet total one-time  odem hardware cost.
	//PARAMETERS:
	//modem: Modem type (Wireless rental or Wired rental)
	//
    //RETURNS: Total one time cost of modem purchase in decimal dollars.
    function GetHighSpeedInternetOneTimeModemCost(modemOwnership, modemType) 
	{
		var oneTimeCost=0.00;  //default to no cost.

		modemOwnership = String(modemOwnership).toLowerCase();
		modemType = String(modemType).toLowerCase();
		
		if(hsi_debug == "yes") alert("Modem Own: "+ String(modemOwnership) + "Modem Type: " + String(modemType));

		if (modemOwnership == 'purchase')
		{

			if(modemType == 'wireless')			
				oneTimeCost = HighSpeedInternetModemWirelessPurchasePrice();
			else if(modemType == 'wired')
				oneTimeCost = HighSpeedInternetModemWiredPurchasePrice();
		}

		if(hsi_debug == "yes") 	alert("One Time modem cost: "+ oneTimeCost);

		return oneTimeCost;
	}

   	//FUNCTION: GetHighSpeedInternetMonthlyTotalCost(speed, plantype, commitmentYears, modemOwnership, modemType)
	//
	//This function retrieves the total monthly cost of high speed internet service.
	//PARAMETERS:
	//speed: High speed internet speed, 256KB/s, 1.5MB/s, or 7MB/s.
	//planType: High speed internet plan, "plus" or "basic"
	//commitmentYears: Commitment level in years ("0","1","2","3")
	//modemOwnership: Modem rented or owned.
	//modemType: Modem type (Wireless or Wired)
	//	//
	//RETURNS: Total Monthly cost of High Speed Internet service (service + modem rental) in decimal dollars.
    function GetHighSpeedInternetMonthlyTotalCost(speed, plantype, commitmentYears, modemOwnership, modemType)
    {
    
		var totalMonthly = GetHighSpeedInternetMonthlyServiceActualRate(speed, plantype, commitmentYears);
		totalMonthly += GetHighSpeedInternetMonthlyModemCost(modemOwnership, modemType);
	
		return(totalMonthly);
	}
	
   	//FUNCTION: GetHighSpeedInternetUsbAdaptersTotalCost(usbSelected, quantityUsb)
	//
	//This function retrieves the total cost of usb adapters ordered
	//PARAMETERS:
	//usbSelected: True if USB Adapters were selected by the user.
	//quantityUsb: quantity of USB adapters ordered by user.
	//
	//RETURNS: Total cost of USB adapters ordered in decimal dollars.
	function GetHighSpeedInternetUsbAdaptersTotalCost(usbSelected, quantityUsb) 
	{
		var total;
		if (usbSelected == true) 
		{
			total = HighSpeedInternetWirelessUsbAdapterActualPrice() * Number(quantityUsb);
		}
		else 
		{
			total = 0.00;
		}
		return total;
	}

   	//FUNCTION: GetHighSpeedInternetLaptopCardsTotalCost(laptopCardSelected, quantityLaptop)
	//
	//This function retrieves the total cost of laptop cards ordered
	//PARAMETERS:
	//laptopCardSelected: True if laptop cards were selected by the user.
	//quantityLaptop: quantity of laptop cards ordered by user.
	//
	//RETURNS: Total cost of laptop cards ordered in decimal dollars.
	function GetHighSpeedInternetLaptopCardsTotalCost(laptopCardSelected, quantityLaptop)
	{
		var total;
		if (laptopCardSelected == true) 
		{
			total = HighSpeedInternetWirelessLaptopCardActualPrice() * Number(quantityLaptop);
		}
		else 
		{
			total = 0.00;
		}
		return total;
	}
	
   	//FUNCTION: GetHighSpeedInternetCardsAdaptersTotalCost(usbSelected, quantityUsb, laptopCardSelected, quantityLaptop)
	//
	//This function retrieves the total cost of laptop cards and usb adpters ordered
	//PARAMETERS:
	//usbSelected: True if USB Adapters were selected by the user.
	//quantityUsb: quantity of USB adapters ordered by user.
	//laptopCardSelected: True if laptop cards were selected by the user.
	//quantityLaptop: quantity of laptop cards ordered by user.
	//
	//RETURNS: Total cost of high speed internet hardware (laptop cards and usb adapters) in decimal dollars.
	function GetHighSpeedInternetCardsAdaptersTotalCost(usbSelected, quantityUsb, laptopCardSelected, quantityLaptop)
	{
		var total = GetHighSpeedInternetUsbAdaptersTotalCost(usbSelected, Number(quantityUsb));
		total += GetHighSpeedInternetLaptopCardsTotalCost(laptopCardSelected, Number(quantityLaptop));
		
		return(total);
	} 
	
   	//FUNCTION: GetHighSpeedInternetOneTimeTotalCost(modemOwnership, modemType, usbSelected, quantityUsb, laptopCardSelected, quantityLaptop)
	//
	//This function retrieves the total cost of all hardware ordered (modem, laptop cards and usb adpters)
	//PARAMETERS:
	//modemOwnership: Modem rented or owned.
	//modemType: Modem type (Wireless or Wired)
	//usbSelected: True if USB Adapters were selected by the user.
	//quantityUsb: quantity of USB adapters ordered by user.
	//laptopCardSelected: True if laptop cards were selected by the user.
	//quantityLaptop: quantity of laptop cards ordered by user.
	//
	//RETURNS: Total one-time cost of all high speed internet hardware (modem, activation fee, laptop cards and usb adapters) in decimal dollars.
	function GetHighSpeedInternetOneTimeTotalCost(modemOwnership, modemType, usbSelected, quantityUsb, laptopCardSelected, quantityLaptop)
	{
	
		var totalOneTime = GetHighSpeedInternetOneTimeModemCost(modemOwnership, modemType) + 
						   GetHighSpeedInternetUsbAdaptersTotalCost(usbSelected, Number(quantityUsb)) + 
						   GetHighSpeedInternetLaptopCardsTotalCost(laptopCardSelected, Number(quantityLaptop)) + 
						   GetHighSpeedInternetActivationFee(); 
        		
		return totalOneTime;		
	}