var currencies = new Array("US$", "UK&pound;", "AU$", "NZ$");
var prices = new Array    ("84",  "59",        "109", "139");

function writeAmount() {
	document.getElementById('amount').value = prices[0];
	}

function calcPrice() {
	var Amount = document.getElementById('amount');
	var DisplayAmount = document.getElementById('displayamount');
	var selQuantityIndex = document.getElementById('quantity').selectedIndex;
	var selCurrencyIndex = document.getElementById('currency_code').selectedIndex;
	
	Amount.value = prices[selCurrencyIndex];
	DisplayAmount.innerHTML = "<b>" + currencies[selCurrencyIndex] + prices[selCurrencyIndex] * (selQuantityIndex + 1) + "</b>"
	}

function writePrices() {
	for(i=0; i < prices.length; i++) {
		document.write(currencies[i] + prices[i]);
		if(i < prices.length-1)
			document.write(" | ");
		}
	}

function writePrice(index) {
	document.write(currencies[index] + prices[index]);
	}
