function getProductId(element)
{
	return element.id.substr(element.id.indexOf('_') +1);
}

function changePrices()
{
    //clearBasket();
    var newCurrency = $("#ccy").val();
	currSymbol = $("#ccy")[0][$("#ccy")[0].selectedIndex].text.match(/\((.+)\)/)[1];
	currCode = $("#ccy")[0][$("#ccy")[0].selectedIndex].text.match(/(.+) \(/)[1];	
	var pricesFields=["Price","ServicePrice"];
	var i=0;
	for(var i=0;i<pricesFields.length;i++)
	{
	prices=$(pricesFields[i]);
	for (index=0;index<prices.length;index++) 
	{
                price=prices[index];
		productPrice = priceList[getProductId(price) + '_' + newCurrency];
		if(typeof(productPrice) == "undefined")
			productPriceText = "";
		else
			productPriceText= productPrice[i]
		price.innerHTML = productPriceText;
	}
		
	}	
}
/*function changePrices()
{
    //clearBasket();
    var newCurrency = $("#ccy").val();
	currSymbol = $("#ccy")[0][$("#ccy")[0].selectedIndex].text.match(/\((.+)\)/)[1];
	currCode = $("#ccy")[0][$("#ccy")[0].selectedIndex].text.match(/(.+) \(/)[1];
	
	prices = $("span.Price");
	for (index=0;index<prices.length;index++) 
	{
		price = prices[index];
		productPrice = priceList[ price.id.replace("ProductBottom","").replace("Product","") + '_' + newCurrency];
		if(typeof(productPrice) == "undefined")
			productPriceText = "";
		else
			productPriceText = productPrice[0];
		price.innerHTML = productPriceText;
	}
}
*/
