InputHint = function (id) {
    bindMethods(this);
    var f = $(id);
    this.hint = f.value;
    connect(f, 'onfocus', this.focus);
    connect(f, 'onblur', this.blur);
};

InputHint.prototype.focus = function (evt) {
    if (this.hint)
        evt.target().value = '';
};

InputHint.prototype.blur = function (evt) {
    var target = evt.target();
    if (target.value)
        this.hint = '';
    if (this.hint)
        target.value = this.hint;
};

sfHover = function (sfEls) {
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover = function () {
            this.className += " sfhover";
        }
        sfEls[i].onmouseout = function () {
            this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}

if (window.attachEvent) {
    window.attachEvent("onload", function () {
        sfHover($$(".addsfhover"));
        sfHover(getElementsByTagAndClassName("input", "button"));
    });
}
