<!--
function onChangeLic() {

	// Inform the user about the calculation progress so she does not get
	// misleading old results in case the script is crashing.
	document.getElementById('divAmount').innerHTML = "Calculating...";

	// Get form objects.
	var frmUI = getForm("frmPriceCalcUI");

	// Get some elements.
	var eLicCount = getElement(frmUI,"lstLicCount");
	var eLicType = getElement(frmUI,"lstLicType");

	// Get license count.
	var nLicCount = eLicCount.value == "more" ? 0 : eLicCount.selectedIndex +1;

	// Calculate total price and whether single license is allowed only.
	var rgLicCosts = new calcLicCosts(eLicType.options[eLicType.selectedIndex].value, nLicCount);

	// Allow/disallow multiple licenses.
	eLicCount.disabled = rgLicCosts.bSingleLic;
	if (rgLicCosts.bSingleLic) {
		eLicCount.selectedIndex = 0;
		nLicCount = 1;
	}

	// Setup Help
	var aLicHelp = getA("aLicHelp");
	if (aLicHelp)
		aLicHelp.href = "javascript:showLicHelp('lic_"+eLicType.options[eLicType.selectedIndex].value+".htm');";

	// Output total cost calculation or info.
	if (rgLicCosts.nCosts != 0) {

		// Format the total license costs.
		var sLicCosts = formatLicCosts(rgLicCosts.nCosts);

		// Output the license costs.
		$sPriceInfo = "<strong>" + sLicCosts + " US Dollar</strong>";
		if (nLicCount != 1) {
			$sPriceInfo += "&nbsp;&nbsp;(~" + formatLicCosts(Math.floor(rgLicCosts.nCosts / nLicCount)) + " per License: -" + rgLicCosts.nDiscountPerc + "% off)";
		}
		document.getElementById('divAmount').innerHTML = $sPriceInfo;
	}
	else {
		// Ask user to contact sales department.
		document.getElementById('divAmount').innerHTML = "Please contact the <a href=\"../contact/index.php?product=ds&recipient=sales\">sales department</a>";
	}

	// Enable license type selection.
	eLicType.disabled = false;
}

function showLicHelp(sHlp) {
	var wnd=window.open(sHlp,"wndLicHlp","dependent,HEIGHT=400,WIDTH="+screen.availWidth*.75);
}
//-->