function GetControl(id) {
  return document.getElementById(id);
}

function ComputeAltPrice(ItemNbr, CuryIDFrom, CuryIDTo, Price, PriceType, Target) {
	var params = ItemNbr + ';' + CuryIDFrom + ';' + CuryIDTo + ';' + Price + ';' + PriceType + ';' + Target + ';';
	xcbShowAltPrice.PerformCallback(params);
}

function ShowAltPrice(s, e) {
	var parArr = new Array();
	parArr = e.result.split(';');
	var priceLabel = GetControl(parArr[3]);
	priceLabel.innerHTML = parArr[2];

	var itemNbr = parArr[0];
	var activePrice = parArr[1];

	if (activePrice == 'VND') {
		GetControl('showPrice_' + itemNbr + '_' + 'SJC').className = 'altprice';
		GetControl('showPrice_' + itemNbr + '_' + 'USD').className = 'altprice';
		GetControl('showPrice_' + itemNbr + '_' + 'VND').className = 'altprice_active';
	}
	if (activePrice == 'SJC') {
		GetControl('showPrice_' + itemNbr + '_' + 'SJC').className = 'altprice_active';
		GetControl('showPrice_' + itemNbr + '_' + 'USD').className = 'altprice';
		GetControl('showPrice_' + itemNbr + '_' + 'VND').className = 'altprice';
	}
	if (activePrice == 'USD') {
		GetControl('showPrice_' + itemNbr + '_' + 'SJC').className = 'altprice';
		GetControl('showPrice_' + itemNbr + '_' + 'USD').className = 'altprice_active';
		GetControl('showPrice_' + itemNbr + '_' + 'VND').className = 'altprice';
	}
}

