I'm learning to use Object literal syntax (from the Simply JavaScript book) and some things I don't like or don't get...

In the code below for the properties feeds and btnExternalFeeds I have to put the object setExternalFeeds in front of each property everytime.

The code below works, but I like the code below it better; by trying to give the properties global scope. Too bad it doesn't work.


Code JavaScript:
var setExternalFeeds = 
{ 
    init: function()
    {       
        setExternalFeeds.feeds = document.getElementById("externalFeeds").getElementsByTagName("div");
        setExternalFeeds.btnExternalFeeds = document.getElementById("BtnExternalFeeds");
 
        if (typeof setExternalFeeds.btnExternalFeeds.addEventListener != "undefined")
        {
            setExternalFeeds.btnExternalFeeds.addEventListener("click", setExternalFeeds.clickListener, false);
        }     
    },
 
    clickListener: function()
    {
        alert(setExternalFeeds.feeds.length);
        setExternalFeeds.btnExternalFeeds.value = "click me";
    }
};
// set the page load handler
if(typeof window.addEventListener != 'undefined')
{
    // not IE
    window.addEventListener('load', setExternalFeeds.init, false);
} else {
    // IE
    window.attachEvent('onload', setExternalFeeds.init);
}

Code JavaScript:
var setExternalFeeds = 
{ 
    feeds: "",
    btnExternalFeeds: "",
 
    init: function()
    {       
        feeds = document.getElementById("externalFeeds").getElementsByTagName("div");
        btnExternalFeeds = document.getElementById("BtnExternalFeeds");
 
        if (typeof btnExternalFeeds.addEventListener != "undefined")
        {
            btnExternalFeeds.addEventListener("click", setExternalFeeds.clickListener, false);
        }     
    },
 
    clickListener: function()
    {
        alert(setExternalFeeds.feeds.length);
        setExternalFeeds.btnExternalFeeds.value = "click me";
    }
};
// set the page load handler
if(typeof window.addEventListener != 'undefined')
{
    // not IE
    window.addEventListener('load', setExternalFeeds.init, false);
} else {
    // IE
    window.attachEvent('onload', setExternalFeeds.init);
}