var successHandler = function(object) { }

function initScripts() {
  var url = "http://twitter.com/statuses/user_timeline/andrewbowden.json?callback=twitter&count=1" ;
  var transaction = YAHOO.util.Get.script(url) ;
}

function twitter(obj) {
  if(obj.length > 0 ) {
    var parentNode = document.getElementById("aboutblog");

    var link = document.createElement("a");
    link.setAttribute("href","http://twitter.com/andrewbowden");
    link.setAttribute("title","Bods on Twitter");
    link.appendChild(document.createTextNode("Bods on Twitter"));

    var feedicon = document.createElement("img")
    feedicon.setAttribute("src","/tools/images/feedicon.gif");
    feedicon.setAttribute("alt","XML feed");
    feedicon.setAttribute("class","feed");

    // Grr.  Needed for IE
    feedicon.setAttribute("className","feed");


    var feedlink = document.createElement("a");
    feedlink.setAttribute("href","http://twitter.com/statuses/user_timeline/13819422.rss");
    feedlink.setAttribute("title","Feed of Bods on Twitter");
    feedlink.appendChild(feedicon);
    
    var title = document.createElement("dt");
    title.appendChild(link) ;
    title.appendChild(feedlink);
    parentNode.insertBefore(title,document.getElementById("emaillink"));

    var update = document.createElement("dd") ;
//    update.appendChild(document.createTextNode("Andrew "+obj[0].text.replace(/&quot;/g,'"'))) ;
    update.appendChild(document.createTextNode(obj[0].text.replace(/&quot;/g,'"'))) ;
    parentNode.insertBefore(update,document.getElementById("emaillink")) ;
  }
}


YAHOO.util.Event.addListener(window,"load",initScripts) ;
