
document.byId = function(strId) {
    if (document.getElementById)
        return document.getElementById(strId);
    else if (document.all)
        return document.all[strId];
    else if (document[strId])
        return document[strId];
    else if (document.layers && document.layers[strId])
        return document.layers[strId];
}

if (String && String.prototype) {
    String.prototype.trim = function() {
        return this.replace(/^\s+|\s+$/g, "");
    }
}
