Function for the cost addition
<p>Ok, I'm building a website. Users will input their name and number of credit hours they are taking.  The program will then calculate the total cost.  For full-time students, the cost per credit hours is $44.50.  For part-time students , the cost per credit hour is $50.00.  8% is charged for fees (calculate the cost for credit hours and then multiply it by 8% for the fee).</p>

<p>Here is my current code:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript"&gt;
function totcost()
}
this.totalcostpercredit = totalcostpercredit
this.totcost = totalcost
this.parttime = parttime
this.fulltime = fulltime
{
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;&lt;b&gt;Name: &lt;/b&gt;
&lt;input type="text" name="name" /&gt;
&lt;br&gt;
&lt;br&gt;&lt;b&gt;Credit Hours:&lt;/b&gt; 
&lt;input type="text" name="credithours" /&gt;&lt;br&gt;
&lt;br&gt;
&lt;input type="radio" name="fullstudent" /&gt;Full time student
&lt;input type="radio" name="partstudent" /&gt;Partime time student&lt;br&gt;
&lt;br&gt;
&lt;button type="button"&gt;Calculate Tuition&lt;/button&gt; 
&lt;form method="post" action=""&gt;
&lt;textarea name="comments" cols="40" rows="2"&gt;
&lt;/textarea&gt;&lt;br&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
