var widget_433 = document.getElementById('twitter_div_433');
if (widget_433 == null) widget_433 = document.getElementById('twitter_div');
var TIDYTWEETWIDGET_433 = {    addStylesheet: function(path) {
        var head = document.getElementsByTagName('head')[0];
        var link = document.createElement('link');
        link.setAttribute('href', path);
        link.setAttribute('type', 'text/css');
        link.setAttribute('rel', 'stylesheet');
        head.insertBefore(link,head.childNodes[0]);
    },
    setClass: function(e, cssClass) {
        e.className = cssClass;
    },
    makeLink: function(text, navigateUrl, tooltip, target) {
        var a = document.createElement('a');
        a.setAttribute('href', navigateUrl);
        a.id = 'twitter-link';
        if (tooltip != '') {
            a.setAttribute('title', tooltip);
        }
        a.setAttribute('target', target);
        a.innerHTML = text;
        return a;
    },
    makeListItem: function(text,authorImgPath,screenName,authorURL,createDate,tweetURL) {
        var li = document.createElement('li');
        li.innerHTML = '';
        li.innerHTML +=  text + '<div class=\'by\'><a href=\'' + authorURL + '\' target=\'_blank\'>@' + screenName + '</a> at <a href=\'' + tweetURL + '\' target=\'_blank\'>' + createDate + '</a>' ;
        return li;
    },
    makeEmptyListItem: function() {
        var li = document.createElement('li');
        li.innerHTML = 'No tweets to display';
        return li;
    },
    init: function() {
        TIDYTWEETWIDGET_433.addStylesheet(document.location.protocol + '//rfiwalmart.tidytweet.com/_resources/Styles/widget.css');
    },
    renderTweets: function(widget) {
        var ulTweets = document.getElementById('twitter_update_list');

      if (ulTweets == null) ulTweets = document.getElementById('twitter_update_list_433');
        ulTweets.innerHTML = '';

        ulTweets.innerHTML = '';
        ulTweets.appendChild(TIDYTWEETWIDGET_433.makeListItem('Looks like <a href=\"http://search.twitter.com/search?q=%23MW2\"><b>#MW2</b></a> is pretty much unplayable until a patch comes out, they better expedite this... Infinity Ward really dropped the ball.','http://a3.twimg.com/profile_images/405984277/masseffect2_avatar_03_100x100_normal.jpg','ShadowXOR','http://twitter.com/ShadowXOR','12/15/2009 3:51:38 PM','http://twitter.com/ShadowXOR/statuses/6708936834'));
        ulTweets.appendChild(TIDYTWEETWIDGET_433.makeListItem('Grinding the last few hours out - then laundry and some <a href=\"http://search.twitter.com/search?q=%23MW2\"><b>#MW2</b></a> with the fellas','http://a1.twimg.com/profile_images/564038916/13961_1089983149576_1826417315_179173_2638957_n_normal.jpg','projekt21','http://twitter.com/projekt21','12/15/2009 3:47:32 PM','http://twitter.com/projekt21/statuses/6708825732'));
        ulTweets.appendChild(TIDYTWEETWIDGET_433.makeListItem('RT <a href=\"http://twitter.com/fourzerotwo\">@fourzerotwo</a>: Preparing an in depth <a href=\"http://search.twitter.com/search?q=%23MW2\"><b>#MW2</b></a> Status Report for players to stay aware of what we\'re addressing &amp; how it\'s progressing. Lot ...','http://a1.twimg.com/profile_images/425946752/twitterProfilePhoto_normal.jpg','GCamp07','http://twitter.com/GCamp07','12/15/2009 3:26:36 PM','http://twitter.com/GCamp07/statuses/6708262909'));
    },
    renderWidget: function() {
        TIDYTWEETWIDGET_433.renderTweets(widget_433);    }
};
if (TIDYTWEETWIDGET_433) {    TIDYTWEETWIDGET_433.init();    TIDYTWEETWIDGET_433.renderWidget();}
