My form calculates correctly (syntax could probably be improved), but I've tried several options to show two decimal places on some of the fields with no success. It would be great to have code that would add a comma where necessary, and also to add a $ for currency.

Code:
<form method="post" name="calculate">
						<div class="floatleft">
							<table style="width: 384px;" border="0" cellspacing="0" cellpadding="12" bgcolor="#FECB00">
								<tbody>
									<tr>
										<td colspan="2" bgcolor="#000000"><img src="images/stories/ownermenu/singlesockchart.png" alt="Single Sock" width="384" height="35" />
										</td>
									</tr>
									<tr>
										<td style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 5px; height: 5px;" align="left" valign="middle" width="61%">&nbsp;</td>
										<td style="text-align: center;" align="left" valign="middle" width="39%">&nbsp;</td>
									</tr>
									<tr>
										<td style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 26px; height: 26px; color: #000000;" align="left" valign="middle" width="61%">&nbsp; &nbsp;Pairs of shoes sold annually</td>
										<td style="text-align: center;" align="left" valign="middle" width="39%"><input id="shoessingle" type="text" name="shoessingle" size="15" />
										</td>
									</tr>
									<tr>
										<td style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 26px; height: 26px; color: #000000; font-style: normal; font-weight: bold;" align="left" valign="middle" width="61%">&nbsp; &nbsp;Sock to Shoe Ratio</td>
										<td style="text-align: center;" align="left" valign="middle"><input name="socktoshoe" type="text" disabled id="socktoshoe" value="1.5" size="15" />
										</td>
									</tr>
									<tr>
										<td style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 26px; height: 26px; color: #000000;" align="left" valign="middle" width="61%">&nbsp; &nbsp;Average Sock Selling Price (Pair)</td>
										<td style="text-align: center;" align="left" valign="middle"><input id="singlepair" type="text" name="singlepair" size="15" onchange="amargin(); update(); gmargin();  formatCurrency(grossmargin.value);" />
										</td>
									</tr>
									<tr>
										<td style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 26px; height: 26px; color: #000000;" align="left" valign="middle" width="61%">&nbsp; &nbsp;Average Gross Margin (50%)</td>
										<td style="text-align: center;" align="left" valign="middle"><input name="avgmarg" type="text" disabled id="avgmarg" size="15" />
										</td>
									</tr>
									<tr>
										<td style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 26px; height: 26px; color: #000000;" align="left" valign="middle" width="61%">&nbsp; &nbsp;Total Sock Sales</td>
										<td style="text-align: center;" align="left" valign="middle"><input name="totalsales" type="text" disabled id="totalsales" size="15" />
										</td>
									</tr>
									<tr>
										<td style="font-family: Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 26px; height: 26px; color: #000000; font-weight: bold;" align="left" valign="middle" width="61%">&nbsp; &nbsp;Gross Margin</td>
										<td style="text-align: center;" align="left" valign="middle"><input id="grossmargin" type="text" name="grossmargin" disabled="disabled" size="15" />
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</form>
					
<script type="text/javascript">
	// <![CDATA[
	function update() {
		document.calculate.totalsales.value = parseFloat(document.calculate.shoessingle.value) * parseFloat(document.calculate.socktoshoe.value) * parseFloat(document.calculate.singlepair.value);
	}
	// ]]>
	
</script>
<script type="text/javascript">
	// <![CDATA[
	function amargin() {
		document.calculate.avgmarg.value = parseFloat(document.calculate.singlepair.value) /2;
	}
	// ]]>
	
</script>


<script type="text/javascript">
	// <![CDATA[
	function gmargin() {
		document.calculate.grossmargin.value = parseFloat(document.calculate.totalsales.value) /2;
	}
	// ]]>
	
</script>