function loadPaint (jpg) {
 if (document.getElementById) {
  document.getElementById('paint').src = jpg.href;
  document.getElementById('caption').firstChild.nodeValue = jpg.title? jpg.title: jpg.getElementsByTagName('img')[0].title;
  return false;
 }
 return true;
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName('a');
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute('href') && anchor.getAttribute('rel') == 'external')
     anchor.target = '_blank';
 }
}
