<html>
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">

</style><h1 align="center">
Australian dollar (AUD) Currency Converter
</h1>
<title>Currency Converter</title>

<script type="text/javascript">
var strCurrency=['U.S$','NZ$','€','Y','S$','HK$'];
var dblRate=[0.93, 1.26, 7.14, 1.34, 1.15, 6.29];

function convertCurrency(f){
  txtS = f['txtSterling'];
  var selC = f['selCurrency'];
  var txtC = f['txtConversion'];
  var txtD = f['Conversion'];

  txtC.value = txtS.value;

  if(isNaN(txtS.value)){
    txtS.value='0.00';
    return 0;
  }else{
    if(txtS.value <= 200) { txtC.value = numberFormat(parseFloat(txtC.value) * dblRate[selC.selectedIndex]); }
    if(txtS.value <= 500  && txtS.value > 200) { txtC.value = numberFormat(parseFloat(txtC.value) * dblRate[selC.selectedIndex]); }
    if(txtS.value >= 1000) { txtC.value = numberFormat(parseFloat(txtC.value) * dblRate[selC.selectedIndex]); }    

txtC.value = strCurrency[selC.selectedIndex] + numberFormat(txtC.value)  ;

  }
}

function numberFormat(number)
{
  return (Math.round(number * 100) / 100);
}

function convertTotal(f){
  txtS = f['txtSterling'];
  var selC = f['selCurrency'];
  var txtC = f['txtTotal'];
  var txtD = f['Conversion'];

  txtC.value = txtS.value;

  if(isNaN(txtS.value)){
    txtS.value='0.00';
    return 0;
  }else{
    if(txtS.value <= 200) { txtC.value = numberFormat(parseFloat(txtC.value) * dblRate[selC.selectedIndex]) + 20; }
    if(txtS.value <= 500  && txtS.value > 200) { txtC.value = numberFormat(parseFloat(txtC.value) * dblRate[selC.selectedIndex]) + 30; }
    if(txtS.value >= 1000) { txtC.value = numberFormat(parseFloat(txtC.value) * dblRate[selC.selectedIndex]) + 40; }    

txtC.value = strCurrency[selC.selectedIndex] + numberFormat(txtC.value)  ;

  }
}

function numberFormat(number)
{
  return (Math.round(number * 100) / 100);
}

function convertCommision(f){
  txtS = f['txtSterling'];
  var selC = f['selCurrency'];
  var txtC = f['txtComm'];
  var txtD = f['Conversion'];

  txtC.value = txtS.value;

  if(isNaN(txtS.value)){
    txtS.value='0.00';
    return 0;
  }else{
    if(txtC.value <= 100) { txtC.value = numberFormat(parseFloat( + 20)); }
    if(txtC.value >= 500 && txtC.value <= 1000) { txtC.value = numberFormat(parseFloat( + 30)); }
    if(txtC.value >= 1001) { txtC.value = numberFormat(parseFloat( + 40)); }    

txtC.value = numberFormat(txtC.value)  ;

  }
}

function numberFormat(number)
{
  return (Math.round(number * 100) / 100);
}


</script>
</head>
<body>
<td>
<form action="" align="center" valign="top">
  <div align="center">$ AUD
    <input type="text" name="txtSterling" onBlur="convertCurrency(this.form)">
    <select name="selCurrency">
      <option>U.S.A</option>
      <option>New Zealand</option>
      <option>UK</option>
      <option>Japanese</option>
      <option>Singapore</option>
      <option>Hong Kong</option>
    </select>
    <input type="button" value="Rate" name="cmdCurrency" onClick="convertCurrency(this.form)">
    <input type="text" name="txtConversion" readonly="readonly">
    <input type="button" value="Toatal" name="cmdTotal" onClick="convertTotal(this.form)">
    <input type="text" name="txtTotal" readonly="readonly">
    <input type="button" value="Commision" name="cmdComm" onClick="convertCommision(this.form)">
    <input type="text" name="txtComm" readonly="readonly">

  </div>
</form> 
</Td>
</body>
</html>
