function isEmpty(s)
{
   return ((s == null) || (s.length == 0))
}

function formatCurrency(fAmount)
{
	temp=parseFloat(fAmount);
	// round to cents
	temp=Math.floor(100*temp)/100;
	temp=String(temp);
	if (temp.indexOf(".") == -1)
	  temp = temp + ".00";

	if (temp.indexOf(".") == temp.length - 2)
	  temp = temp + "0";
	  
	// Format as dutch currency
//	temp[temp.indexOf(".")] = ",";
	temp= "Fl. "+temp;
	
	return temp;
}

function formatEuroCurrency(fAmount)
{
	temp=parseFloat(fAmount);
	// round to cents
	temp=Math.floor(100*temp)/100;
	temp=String(temp);
	if (temp.indexOf(".") == -1)
	  temp = temp + ".00";

	if (temp.indexOf(".") == temp.length - 2)
	  temp = temp + "0";
	  
	// Format as dutch currency
//	temp[temp.indexOf(".")] = ",";
	temp= temp+" Euro";
	
	return temp;
}

function validateAdres(formObj)
{
    if (isEmpty(formObj.straat.value))
    {
      alert("Uw straat is niet ingevuld");
      formObj.straat.focus();
      return false;
    }
    if (isEmpty(formObj.postcode.value))
    {
      alert("Uw postcode is niet ingevuld");
      formObj.postcode.focus();
      return false;
    }
    if (isEmpty(formObj.plaats.value))
    {
      alert("Uw plaats is niet ingevuld");
      formObj.plaats.focus();
      return false;
    }
    return true;
}
