How to fix java script .js
<p>sry for my bad english .</p>

<p>my problem is with java code . </p>

<p>the output code is :</p>

<pre><code> &lt;script type="text/javascript"&gt;
Travian.Game.HeroAuction = new (new Class(
{
    alreadyOpen: false,
    textSingle: 'are you sure you want to sell this ?',
    textMulti: 'sell &amp;lt;input class=\"text\" id=\"sellAmount\" 
        style=\"width:30px\" type=\"text\" value=\"0\" /&amp;gt; unit ?'.unescapeHtml(),
    initialize: function() {
        var $this = this;
     &lt;?php
     $prefix = "".TB_PREFIX."heroitems";

       $sql2 = mysql_query("SELECT * FROM $prefix WHERE proc = 0 AND uid = 
       $session-&gt;uid");

       while($row = mysql_fetch_array($sql2)){ 
           $id = $row["id"];$num = $row["num"];
       ?&gt;
    $('item_&lt;?php echo $id; ?&gt;').addEvent('click', function() { 
      $this.sellItem(&lt;?php echo $id; ?&gt;,&lt;?php echo $num; ?&gt;); });
       &lt;?php } ?&gt;

                        },
    noMoreAuctions: function ()
    {
        ('you can only have 0 auction in time.').dialog(
        {
            relativeTo:         $('content'),
            elementFoucs:       'sellAmount',
            buttonTextOk:       'Accept'
        });
    },
    sellItem: function (id, amount)
    {
        var html = '';
        var $this = this;
        if (this.alreadyOpen)
        {
            return;
        }
        this.alreadyOpen = true;
        $('sellForm').id.value = id;
        $('sellForm').amount.value = amount;
        if (amount == 1)
        {
            html = $this.textSingle;
        }
        else
        {
            html = $this.textMulti;
        }
        html.dialog(
        {
            relativeTo:         $('content'),
            elementFoucs:       'sellAmount',
            buttonTextOk:       'YES',
            buttonTextCancel:   'NO',
            title:              'ACCEPT ?',
            onOpen: function(dialog, contentElement)
            {
                if ($('sellAmount'))
                {
                    $('sellAmount').value = amount;
                $('sellAmount').addEvent('change', function()
                    {
            $('sellForm').amount.value = $('sellAmount').value;
                    });
                }
            },
            onOkay: function(dialog, contentElement)
            {
                if ($('sellAmount'))
                {
                $('sellForm').amount.value = $('sellAmount').value;
                }
                $('sellForm').submit();
            },
            onClose: function(dialog, contentElement)
            {
                $this.alreadyOpen = false;
            }
        });
    }
}));
</code></pre>

<p></p>

<p>but the output with this <a href="http://www.4shared.com/document/1E_cqmrs/crypt.html" rel="nofollow">http://www.4shared.com/document/1E_cqmrs/crypt.html</a> java script is not ok and have problem . look at this <a href="http://img.ir/CGr.jpg" rel="nofollow">pic</a> </p>

<p>and look at this output when i use 
<a href="http://www.4shared.com/document/nGD5T3Uj/crypt2.html" rel="nofollow">http://www.4shared.com/document/nGD5T3Uj/crypt2.html</a></p>

<p>the image is <a href="http://img.ir/DGr.jpg" rel="nofollow">here</a></p>

<p>i want to fix first java script to be like java script 2 fixed</p>
