<SCRIPT type="text/javaScript">
function button1Listener()
{
var credit;
var income= parseFloat(document.getElementById("txtIncome").value);
var age= parseFloat(document.getElementById("txtAge").value);
if (isNaN(income)) alert("Income must be an numeric. Please Re-enter");
else if (isNaN(age)) alert("Age must be an integer. Please Re-enter");
else if (age<18) credit=0;
else if (age < 26) credit=income;
else credit=3.0*income;
document.getElementById("txtCreditLimit").value = '\u00A3'+ credit;
}
function doit()
{
//alert("hello");
var btn1=document.getElementById("cmdEstimateCredit");
btn1.addEventListener("click",
button1Listener,
false
);
}
</SCRIPT>