function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {oldonload();}
      func();
    }
  }
}

addLoadEvent(prepareCommentQuotes);


function commentQuote() {

}

function prepareCommentQuotes() {
     if (!document.getElementsByTagName || !document.createElement || !document.appendChild) return;
     var quotes = document.getElementsByTagName("blockquote");
     for (var i=0; i<quotes.length; i++) {
          var source = quotes[i].getAttribute("author");
          if (!source) continue;
          var source_date = quotes[i].getAttribute("date");
          var para = document.createElement("p");
          var link = document.createElement("b");
          para.className = "quote_author";
          link.appendChild(document.createTextNode(source+" said: "));
          para.appendChild(link);
          quotes[i].insertBefore(para,quotes[i].firstChild);
          quotes[i].className="quoteColapse";
          quotes[i].setAttribute("onclick","expandQuote(this)");
     }
 }

function expandQuote(quote) {quote.className="quoteExpand";}