calculate_savings = function(select_state, ce_amount, cg_amount, re_amount, rg_amount) {  

alert("Hello World! select_state=" + select_state + "ce_amount=" + ce_amount + "cg_amount=" + cg_amount+ "re_amount=" + re_amount+ "rg_amount=" + rg_amount);
}	

function displayAnswer ()
{
    var myform = document.getElementById('myform');
    var selected = 0;
	alert("starting DisplayAnswer()");
    if (myform.amount.ce_amount > 0) {
            selected = 1;
			alert("ce_amount: You answered:  " + myform.ce_amount.value );
            break;
        }
		else 
			alert("ce_amount - ZERO:  " + myform.cg_amount.value );
	if (myform.amount.cg_amount > 0) {
            selected = 1;
			alert("cg_amount: You answered:  " + myform.cg_amount.value );
            break;
        }
		else 
			alert("cg_amount - ZERO:  " + myform.cg_amount.value );
	if (myform.amount.re_amount > 0) {
            selected = 1;
			alert("re_amount: You answered:  " + myform.re_amount.value );
            break;
        }
		else 
			alert("re_amount - ZERO:  " + myform.re_amount.value );
	if (myform.amount.rg_amount > 0) {
            selected = 1;
			alert("rg_amount: You answered:  " + myform.rg_amount.value );
            break;
        }
		else 
			alert("rg_amount - ZERO:  " + myform.rg_amount.value );

    if (selected > 0) {
          alert("Selected Variable = 0");
          return true;
    }
    alert("Selected Variable = " + selected);
    return false;
}  
function displayAnswer1 ()
{
    var myform = document.getElementById('myform');
    var selected = -1;
    for (var i=0; i<myform.amount.length; i++)
    {
        if (myform.amount[i] > 0) {
            selected = i;
			alert("1 - You answered:  " + myform.amount[selected].value );
            break;
        }
		else alert("0 - You answered:  " + myform.amount[selected].value );
    }
    if (selected > -1) {
          alert("-1 - You answered:  " + myform.amount[selected].value );
          return true;
    }
    alert("Please enter an amount.");
    return false;
}
    
function estimate_savings() {  

alert("Hello World!");
}
