function blockquotes() {
  if (document.getElementsByTagName && document.createTextNode) {
    var quotes = document.getElementsByTagName("blockquote");
    for (var i=0; i<quotes.length; i++) {
      var source = quotes[i].getAttribute("cite");
      if (source) {
        var text = document.createTextNode("source: "+source);
        quotes[i].appendChild(text);
      }
    }
  }
}

window.onload = blockquotes;
