/************************************************************************************************
*
*     General use javascript routines to support the display of information
*
**************************************************************************************************/
/*     Display a new window centered in the main brower window */

 var picWindow = null;
 function doWind(caption,isrc,wwidth,wheight,pwidth,pheight) {
  var winleft = (screen.width-wwidth)/2;
  var wintop = (screen.height-wheight)/2;
  if (winleft < 0) winleft = 0;
  if (wintop < 0) wintop = 0;
  var settings = 'height=' + wheight + ',';
  settings += 'width=' + wwidth + ',';
  settings += 'top=' + wintop + ',';
  settings += 'left=' + winleft + ',';
  settings += 'location=no,status=yes,scrollbars=yes,resizable=1';
  picWindow = window.open("","PicViewer",settings);
  var content = "<html><head><title>" + caption + "</title>";
  content += "<link rel=stylesheet href=danska.css type=text/css>";
  content += "</head><body><div id='gallery'>";
  content += "<h3 align='center'>" + caption + "</h3>";
  content += "<p><img src=" + isrc + " border='0'" + " width='" + pwidth + "'" + " height='" + pheight + "'" + "></p>";
  content += "<br /></div></body></html>";
  picWindow.document.write(content);
  picWindow.document.close();
  picWindow.window.focus(); 
  return false;
 }
