function view_image(path, w, h) {
var baseURL = "http://java-dev.ldmfoundry.com/ps_classic/";  
var image_request_url = baseURL + 'viewimage.jsp' + '?path=' + path + '&w=' + w + '&h=' + h;
  var image_win_params = 'width=' + (w+20) + ',height=' + (h+20) + ',directories=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0';
  window.open(image_request_url, 'viewImage', image_win_params);

  return false; //to stop the browser following the 'actual' link.
}

function initExternalLinks() {
  var as = document.getElementsByTagName("a");
  for (var i = 0; i < as.length; i++) {
    if (as[i].getAttribute("rel") == "external") {
      as[i].onclick = openNewWindow;
    }
  }

  function openNewWindow() {
    window.open(this.href);
    return false;
  }
}