.NET to Javascript compiler

C# code   Html page   Start
public class ActivatorApp : HtmlGlobal
{
    public static void Start()
    {
        new Activator("left", new TextBox());
        new Activator("right", new NumericTextBox(true, 2, true));
    }
}
class Activator : HtmlGlobal
{
    HtmlElement parent;
    Control control;
    HtmlInputText active;

    internal Activator(string name, Control control)
    {
        parent = document.GetElementById(name);
        this.control = control;
        document.AdviseActivate(Activate);
    }

    void Activate(HtmlElement srcElement)
    {
        HtmlInputText element = srcElement as HtmlInputText;
        if (active != element)
        {
            if (active != null)
            {
                ((HtmlElement)active.ParentNode).ClassName = "";
                active = null;
            }

            if (element != null && parent.Contains(element))
            {
                control.Element = element;
                active = element;
                ((HtmlElement)active.ParentNode).ClassName = "Focus";
            }
        }
    }
}

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta http-equiv="x-ua-compatible" content="IE=11;IE=10;IE=9;IE=8;IE=7" />
	<title>Activator.html: Change focus and tab handling</title>
	<link type="text/css" href="css/activator.css" rel="stylesheet"></link>
	<script type="text/javascript" language="javascript" src="js/activator.js"></script>
</head>
<body onload="javascript:StartScript()">
	Activator.html: Change focus and tab handling
	<table class="Grid" id="grid" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td class="TextBox" id="left">
				<div><input type="text" id="target"/></div>
				<div>
					<input type="text"/>
				</div>
				<div>
					<input type="text"/>
				</div>
				<div>
					<input type="text"/>
				</div>
				<div>
					<input type="text"/>
				</div>
			</td>
			<td class="IntegerTextBox" id="right">
				<div>
					<input type="text"/>
				</div>
				<div>
					<input type="text"/>
				</div>
				<div>
					<input type="text"/>
				</div>
				<div>
					<input type="text"/>
				</div>
				<div>
					<input type="text"/>
				</div>
			</td>
		</tr>
	</table>
</body>
</html>
© 2009 JScriptSuite. All rights reserved.