// ############################################################################
// ##
// ##  SHOP JS FUNCTIONS (INLINE)
// ##  Shop module functions that are used within regular CMS page templates.
// ##
// ############################################################################

// ====================
// Function:    UpdateShoppingCartInfo
//
// Purpose:     Update number of Items in the User Shopping Basket displayed in site header 
//				(in shop_nitems_header span) and shop trail navigation (in shop_nitems_trail span)
//
// Input:       intShoppingCartItems - Number of Shopping Cart Items
//
// History:     20060410 - GR created
// ====================
function UpdateShoppingCartInfo(intShoppingCartItems) {
	var oHeaderItems = document.getElementById("shop_nitems_header");
	if ( oHeaderItems ) {
		if ( intShoppingCartItems == 1 ) {
			oHeaderItems.innerHTML = intShoppingCartItems + " item";
		} else {
			oHeaderItems.innerHTML = intShoppingCartItems + " items";
		}
	}
	var oTrailItems = document.getElementById("shop_nitems_trail");
	if ( oTrailItems ) {
		if ( intShoppingCartItems == 1 ) {
			oTrailItems.innerHTML = intShoppingCartItems + " item";
		} else {
			oTrailItems.innerHTML = intShoppingCartItems + " items";
		}
	}
}

