function validateDownPayment(){if(validateFinanceForm("clickOnEMI")){var b=document.emiCalculatorForm;var a=b.downPayment.value;var c=b.carCost.value;if(a==c){if(!confirm("Do you wish to pay the full amount")){b.downPayment.value="";b.actualAmount.value="";b.emi.value="";b.downPayment.focus()}else{b.actualAmount.value="";b.emi.value=""}}if(parseFloat(a)>parseFloat(c)){alert("Down payment should be less than car cost");b.actualAmount.value="";b.emi.value="";b.downPayment.select();return false}}}function validateCarCost(){var b=document.getElementById("carCost").value;if(b==""||b.length==0){document.getElementById("downPayment").value="";document.getElementById("actualAmount").value=""}else{if(!checkIsNamber(b)){alert("Please input the number");if(b.length>0){for(var a=b.length;a>0;a--){if(b==""||checkIsNamber(b)){break}b=b.substr(0,b.length-1)}document.getElementById("carCost").value=b}}}}function updateBank(){document.getElementById("bankName").selectedIndex=0;document.getElementById("bankName").onclick()};