function Label(labelId, inputId)
{
    this.labelId = labelId;
    this.label = el(labelId);
    this.inputId = inputId;
    this.input = el(inputId);

    if (is_safari)
    {
        if (typeof navigator !== 'undefined' && (/t\/5/i.test(navigator.userAgent))) {
          return;
        }

        var self = this;
        this.label.onclick = function()
        {
            if (self.input.type == 'radio' || self.input.type == 'checkbox')
            {
                self.input.checked = !self.input.checked;
                if (self.input.onclick)
                {
                    self.input.onclick();
                }
            }
            else if (self.input.type == 'text' || self.input.type == 'password')
            {
                self.input.focus();
            }
        }
    }
}
