﻿// RiskCalc.js
// Copywrite 2006-10 Connected Solutions
//  

 var ARO = 0;
 var EF = 0;
 var AV = 0;
 var SLE = 0;
 var ALE = 0;
 var answer = 0;


function btnSLE_onclick() {
AV = parseFloat(document.getElementById("AV1").value);
EF = parseFloat(document.getElementById("EF1").value);
answer = AV * EF ;
document.getElementById("SLE1").value = answer.toFixed(2);
document.getElementById("SLE2").value = answer.toFixed(2);
} 

function btnALE_onclick() {
SLE = parseFloat(document.getElementById("SLE2").value);
ARO = parseFloat(document.getElementById("ARO1").value);
answer = SLE * ARO;
document.getElementById("ALE1").value = answer.toFixed(2);
}

function btnReset_onclick() {
    document.getElementById("ALE1").value = "";
    document.getElementById("SLE1").value = "";
    document.getElementById("SLE2").value = "";
    document.getElementById("AV1").value = "";
    document.getElementById("EF1").value = "";
    document.getElementById("ARO1").value = "";
}