Why isn't the following javascript code working? (Crafty.js used)
<p>I am a newbie, in crafty as well as js, so pardon me if I might have made very silly errors in the following program.
What is  wrong with the following code? The following code is supposed to create 5*5 matrix where each block would be a 60 pixel high and wide iceblock as stored in iceblock.jpg.</p>

<pre><code>window.onload=function()
{
    Crafty.init(500,500);
    Crafty.canvas();
    Crafty.sprite(60,"iceblock.jpg",{block : [0,0]});
    Crafty.c("iceblock",function(){
        init: function(){
            this.addComponent("2D, Canvas, Mouse, block");
            this.w = 60;
            this.h = 60;
        }
    });


};
for(var i=0;i&lt;5;i++)
    {
        for(var j=0;j&lt;5;j++)
        {
            Crafty.e("iceblock").attr({x: i*60,y: j*60})
        }
    }
</code></pre>

<p>The corresponding HTML code is:-</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;head&gt;
    &lt;script type="text/javascript" src="crafty.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="assignment.js"&gt;&lt;/script&gt;
    &lt;title&gt;My Crafty Game&lt;/title&gt;

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

<p>When I open the HTML page, the complete output page is blank.
This is the link to the image.
<a href="http://postimage.org/image/ivqfhmjt9/" rel="nofollow">http://postimage.org/image/ivqfhmjt9/</a></p>

<p>PS:- Is there a less annoying way to indent our code instead of putting 4 spaces infront of each line? Very time consuming and tedious.</p>
