var successHandler = function(object) { }

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

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

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

    var feedicon = document.createElement("img")
    feedicon.setAttribute("src","http://www.mylatestobsession.org.uk//build/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/17083913.rss");
    feedlink.setAttribute("title","Feed of Catherine on Twitter");
    feedlink.appendChild(feedicon);
    
    var title = document.createElement("h2");
    title.appendChild(link) ;
    title.appendChild(feedlink);
    parentNode.insertBefore(title,document.getElementById("emaillink"));

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


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