﻿
function Checkbox(iId, iForm)
{
    var This = this;

    // Implements
    Implements(This, FormInput, iId, iForm);

    // Events
    This.OnChange = new EventHandler();

    // Methods
    This.GetName = function()
    {
        // TODO: fix hack
        return This.GetElement().checked ? This.GetElement().name : null;
    }

    // Initialize
    {
        This.GetElement().onchange = this.OnChange.Invoke;
    }
}
