JS Calculation assistance
<p>I'm having some issues with my code, I'm creating a site to get it to calculate mortgages with down payments of:
3% of the first $25,000
Insures home mortgages requiring a down payment as follows:
3% of the first $25,000
5% of the remainder</p>

<p>The input consists of a SSN and a mortgage amount. I wanted it to print the applicant’s SSN and the amount of down payment required. Reject any applications over $70,000. Don’t forget to validate your input. If the input is not good, and I want it to display an error message and ask for the input data again.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Mortgage Charges&lt;/title&gt;
&lt;script type="text/javascript"&gt; 
// Program name: FHA 
// Purpose: print the applicant’s SSN and the amount of down payment required
// Date last modified: 3/29/12
function mortgage() {
    var amtOwed = parseInt(document.frmOne.ssn.value);
    var mortgage = 0;

    if (mortgage &lt;= 25000) {
        amtOwed = 0;
    }
    else if (mortgage &gt;= 5%) {
    }
    alert(amtOwed);
    document.frmOne.mortage.value = amtOwed;
}

window.onload = function() {
    document.frmOne.onsubmit = function(e) {
       mortgage();
       return false;
    };
};

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form name="frmOne"&gt;
Enter your SSN:&lt;input type="text" id="ssn" /&gt;&lt;br /&gt;
Mortgage amount:&lt;input type="text" id="mortage" /&gt;&lt;br /&gt;
&lt;input type="submit" value="Submit" /&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt; 
</code></pre>
