
var __nonMSBrowser = window.navigator.appName.toLowerCase().indexOf("netscape") > -1;
if (__nonMSBrowser)
{
HTMLElement.prototype.__defineGetter__("innerText", function ()
{
var rng = this.ownerDocument.createRange ();
rng.selectNodeContents (this);
return rng.toString ();
});
}
if (__nonMSBrowser)
{
HTMLElement.prototype.__defineSetter__("innerText", 
function (valor){this.innerHTML = valor.replace(/\&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");});
HTMLElement.prototype.__defineGetter__("children", function(){return this.childNodes; });
}
function getControlsByName(tagName, name)
{
    var ctrls = document.getElementsByTagName(tagName);
    var list = new Array();
    for (var i = 0; i < ctrls.length; i++)
    {
        if (ctrls[i].name == name || ctrls[i].getAttribute('name') == name)
            list[list.length++] = ctrls[i];
    }
    return list;
}