.NET to Javascript compiler

C# code   Html page   Start
public class CalendarApp
{
    public static void Start()
    {
        InitCalendars();
    }

    internal static void InitCalendars()
    {
        InitCalendar(1033, Renderer);
        InitCalendar(1031, null);
    }

    static void InitCalendar(int lcid, Func<JDate, string> renderer)
    {
        glb.CultureInfo originalCultureInfo = glb.CultureInfo.CurrentUICulture;
        glb.CultureInfo cultureInfo = CultureInfos.TryGetCultureInfo(lcid);
        Thread.CurrentThread.CurrentUICulture = cultureInfo;
        Calendar calendar = new Calendar(HtmlDocument.Current.GetElementById("calendar" + lcid));
        Thread.CurrentThread.CurrentUICulture = cultureInfo;
        calendar.Renderer = renderer;
        HtmlElement element = HtmlDocument.Current.GetElementById("calendarValue" + lcid);
        calendar.AdviseValueChange(delegate()
        {
            JDate date = calendar.Value;
            element.InnerText = date != null ? date.ToString("g", cultureInfo) : null;
        });
    }

    static string Renderer(JDate date)
    {
        switch (date.Day % 7)
        {
            case 0:
            case 6:
                return "calendarHoliday";

            default:
                if (date.Date > 22)
                {
                    return "calendarVacation";
                }

                if (date.Date % 5 == 0)
                {
                    return "calendarMeeting";
                }

                break;
        }

        return string.Empty;
    }
}

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
    <meta http-equiv="x-ua-compatible" content="IE=11;IE=10;IE=9;IE=8;IE=7" />
    <script type="text/javascript" language="javascript" src="js/Calendar.js"></script>
    <link rel="stylesheet" href="styles/jscriptsuite.css" type="text/css" />
    <link rel="stylesheet" href="styles/summary.css" type="text/css" />
  </head>
	<body onload="StartScript()">
		Calendar.html. Mouse and Keyboard navigation, Activation, ValueChange Event
    <table cellpadding="2" cellspacing="2">
      <tr>
        <th>1033</th>
        <th>1031</th>
      </tr>
      <tr>
        <td>
          <div id="calendar1033" class="calendarWithImages" tabindex='1' hidefocus='true' style='outline:none'>
          </div>
        </td>
        <td>
          <div id="calendar1031" tabindex='1' hidefocus='true' style='outline:none'>
          </div>
        </td>
      </tr>
      <tr>
        <th id="calendarValue1033">
        </th>
        <th id="calendarValue1031">
        </th>
      </tr>
    </table>
	</body>
</html>
© 2009 JScriptSuite. All rights reserved.