/******************************************************************************
* xStdShopPriceManagerComplement.js
*******************************************************************************
Surcharge du complement de gestionnaire de prix du module GenericShop
*******************************************************************************
*                                                                             *
* Copyright 2006									                          *
*                                                                             *
******************************************************************************/

//
// ------------------------------------- class xStdShopPriceManagerComplement
//
function xStdShopPriceManagerComplement()
{
}

xStdShopPriceManagerComplement.prototype.formatDiscountedPriceWithCounterValue = function(manager, price, discountedPrice, priceType)
{
	// Default treatment
	if(priceType == null) priceType = "";
	
	var str = "<span class='gshpDiscountedPriceContainer'>";
	str += "<span class='gshpDashedPrice'>Prix habituel: <span class='gshpDashedPriceValue'>";
	str += manager.formatPriceValue(price, manager._currency);
	if(manager._showPriceType) str += priceType;
	str += "</span></span>";

	str += "<span class='gshpSeparatorDashedDiscountedPrices'>&#160;</span>";

	str += "<span class='gshpDiscountedPrice'>Prix BPS: ";
	str += manager.formatPriceValue(discountedPrice, manager._currency);
	if(manager._showPriceType) str += priceType;
	if(manager._showCounterValue) {
		var counterPrice = discountedPrice * manager._counterValueRate;
		str += " <span class='gshpCounterValue'>(" + manager.formatPriceValue(counterPrice, manager._counterValueCurrency);
		if(manager._showPriceType) str += priceType;
		str += ")</span>";
	}
	str += "</span>";
	str += "</span>";
	return str;
}

// ------------------------------------- Global Object recovered by price manager
//
var objGshpPriceManagerComplement = new xStdShopPriceManagerComplement();