function popUp(strURL,strType,strWidth,strHeight) {
  var strOptions="";
  if (strType=="console") {strOptions="resizable,scrollbars,height="+strHeight+",width="+strWidth;}
  if (strType=="gallery") {strOptions="resizable,scrollbars,height="+strHeight+",width="+strWidth;}
  if (strType=="fixed") {strOptions="status,height="+strHeight+",width="+strWidth;}
  if (strType=="elastic") {strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;}
  window.open(strURL, strType, strOptions);
}

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";
    }
}
window.onload = externalLinks;