main.window() or what?
<p>I wrote some js code, but I can´t anything out. I just goes blank.
Is it becuse I don´t have a main fuctions for my functions?</p>

<pre><code>  &lt;html&gt;
&lt;head&gt;&lt;title&gt;JavaScript&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
    &lt;script language="JavaScript" type="text/javascript"&gt;
        document.write("Redovisning av Inlämningsuppgift 4" + "&lt;br/&gt;");
        document.write("Informationssystem 1-30, Malmö Högskola, dec 2010" + "&lt;br/&gt;");
        document.write("&lt;br/&gt;");
        document.write("Usman Rajab, datorid: CDA08028");
        document.write("&lt;br/&gt;");
        document.write("&lt;br/&gt;");

        document.write("==========================================================" + "&lt;br/&gt;");
        document.write("UPPGIFT NR 2" + "&lt;br/&gt;");
        document.write("============");
        document.write("&lt;br/&gt;");
        document.write("&lt;br/&gt;");

        var loan = 1000000;
        var amoyear = 6000;
        for( var answer = 1; amoyear * answer &lt;= loan; answer++)
        {
        }
        document.write("Ett lån på 1000000 kr är betalt efter " + Math.ceil(answer) + " år om amorteringen är 500 kr/mån. ");

        document.write("&lt;br/&gt;");
        document.write("&lt;br/&gt;");

        document.write("==========================================================" + "&lt;br/&gt;");
        document.write("UPPGIFT NR 3" + "&lt;br/&gt;");
        document.write("============");
        document.write("&lt;br/&gt;");
        document.write("&lt;br/&gt;");

        antalAr(1000000,1000);
        antalAr(1500000,500);
        function antalAr(lan, amortering)
        {
            amoyear = amortering * 12;
            for( var answer = 1; amoyear * answer &lt;= loan; answer++){}
            document.write("Ett lån på " + lan + " kr är betalt efter " + Math.ceil(answer) + "år om amorteringen är på " + amortering +" kr/mån." + "&lt;/br&gt;");
        }

        document.write("&lt;br/&gt;");
        document.write("&lt;br/&gt;");

        document.write("==========================================================" + "&lt;br/&gt;");
        document.write("UPPGIFT NR 4" + "&lt;br/&gt;");
        document.write("============");
        document.write("&lt;br/&gt;");
        document.write("&lt;br/&gt;");

        for(var i = 1000; i&lt;= 3000; i+=1000)
        {
            antalAr(1200000,i);
        }

        document.write("&lt;br/&gt;");
        document.write("&lt;br/&gt;");

        document.write("==========================================================" + "&lt;br/&gt;");
        document.write("UPPGIFT NR 5" + "&lt;br/&gt;");
        document.write("============");
        document.write("&lt;br/&gt;");
        document.write("&lt;br/&gt;");

        function Calc(){            
            for(int i=-1; i&lt;13; i++)
        {
            alert(monthName(i));
        }
        }
        function monthName(a)
        {
            if(a == 0)
                return 'Januari';
            else if(a == 1)
                return 'Februari';
            else if(a == 2)
                return 'Mars';
            else if(a == 3)
                return 'April';
            else if(a == 4)
                return 'Maj';
            else if(a == 5)
                return 'Juni';
            else if(a == 6)
                return 'Juli';
            else if(a == 7)
                return 'Augusti';
            else if(a == 8)
                return 'September';
            else if(a == 9)
                return 'Oktober';
            else if(a == 10)
                return 'November';
            else if(a == 11)
                return 'December';
            else 
                return 'undefined';
        }

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