<!--
function onChangeLic() {
	var bShowPP = true;

	// get form objects
	var frmUI = getForm("frmPayPalUI");
	var frmPP = getForm("frmPayPal");

	// get some elements
	var eLicCount = getElement(frmUI,"lstLicCount");
	//var eLicCurrency = getElement(frmUI,"lstLicCurrency");
	var eLicType = getElement(frmUI,"lstLicType");
	var eToS = getElement(frmUI,"chkTOS");

	// check for ToS acceptance
	var slblToS = "&nbsp;read and accepted";
	if (eToS.checked == false)
	{
		slblToS='<font color="#ff0000"><blink>'+slblToS+'</blink></font>';
		bShowPP = false;
	}
	document.getElementById('divToS').innerHTML=slblToS;

	// Get license type label.
	var sType = "DriveSitter Pro " + eLicType.options[eLicType.selectedIndex].text;

	// If "more" is selected in license count.
	if (eLicCount.value == "more")
	{
		//alert("Please contact the sales department to receive special discount prices for multiple licenses!");
		var nLicCount = 0;
		bShowPP = false;
	}
	else
	{
		// Get license count.
		var nLicCount = 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;

	// Add VAT.
	rgLicCosts.nCosts = Math.floor(rgLicCosts.nCosts * 1.19);

	// Format the license costs as string.
	var sLicCosts = formatLicCosts(rgLicCosts.nCosts);

	// setup paypal form
	getElement(frmPP,"amount").value = sLicCosts;
	getElement(frmPP,"item_name").value = ""+nLicCount+"* "+sType;
	getElement(frmPP,"currency_code").value = "USD";//eLicCurrency.options[eLicCurrency.selectedIndex].value;
	getElement(frmPP,"quantity").value = "1"/*+nLicCount*/;
	frmPP.action = "https://www.paypal.com/cgi-bin/webscr";

	// help
	var aLicHelp = getA("aLicHelp");
	if (aLicHelp)
		aLicHelp.href = "javascript:showLicHelp('lic_"+eLicType.options[eLicType.selectedIndex].value+".htm');";

	// link to no-java page is invalid now
	var aBuyNow = getA("aBuyNow");
	aBuyNow.href = "javascript:;";

	// display/hide image
	var imgBuyNow = getImage("imgBuyNow");
	if (imgBuyNow) {
		if (!document.MM_imgBuyNow_src)
			while(!(document.MM_imgBuyNow_src=imgBuyNow.src));
		imgBuyNow.src=(bShowPP?document.MM_imgBuyNow_src:"../gfx/paypal_buynow2_d.png"/*"1px.gif"*/);
	}
	document.MM_PPForm_SubmitEnabled = bShowPP;

	// Output total cost calculation or info.
	if (rgLicCosts.nCosts != 0)
	{
		// Output the license costs.
		document.getElementById('divAmount').innerHTML = sLicCosts + " $";
	}
	else {
		// Ask user to contact sales department.
		document.getElementById('divAmount').innerHTML = "<a href=\"../contact/index.php?product=ds&recipient=sales\">Contact</a>";
	}


	// setup user form
	eLicType.disabled = false;
	//eLicCurrency.disabled = false;
	eToS.disabled = false;
}

function submitPPForm() {
	var frmPP = getForm("frmPayPal");
	if (!frmPP) {
		alert("A submission error occured. Please use the non-JavaScript order page or contact the sales department (sales@otwesten.de).");
		// link to no-java page is invalid now
		var aBuyNow = getA("aBuyNow");
		aBuyNow.href = "order_njs.htm";
		location="order_njs.htm";
		return;
	}
	if (document.MM_PPForm_SubmitEnabled)
		frmPP.submit();
}

function showLicHelp(sHlp) {
	var wnd=window.open(sHlp,"wndLicHlp","dependent,HEIGHT=400,WIDTH="+screen.availWidth*.75);
}
//-->