Numbers not displaying properly in HTML

Numbers not displaying properly in HTML

I have an HTML page where I am trying to display a currency field from a particular record.

When the number is small I get the number to display 800.0  but if the number is in the millions I get  8.0E+8?

I have found that when the currency is less then 8 digits I get something like 8000000.0  but when an additional digit is added it goes to 8.0E+8

How can I fix this to display like $8,000,000?

Thanks,
Sean

The top part of my HTML page
htmlpage Opportunity_Details(opportunity_idstr, opportunityID)
displayname = "Opportunity Details"
content
<%{
    curOpportunity  =  Opportunity  [ID == input.opportunity_idstr.toLong()];
    if (!curOpportunity.Read)
    {
        curOpportunity.Read = true;
    }%> 


The lower part

    <td width=15% class="zc-summary-label">Account Name</td>
            <td width=35% class="zc-summary-data"><%=curOpportunity.Account_Name%></td>
            <td width=15% class="zc-summary-label">Anticipated Total Contract Value</td>
            <td width=35% class="zc-summary-data"><%=curOpportunity.Anticipated_TCV%></td>