// Popup Image Window Script

function imgpopup(img,x,y) {
  // path, width and height as arguments
  var width = x-0;
  var height = y-0;
  var msgWindow = window.open('','','Width=' + eval(width) + ',Height=' + eval(height+20) + 'toolbar=no,status=no,menubar=no,scrollbars=no,resizeable=no');
  var imgsrc=img;
  msgWindow.document.open();
  msgWindow.document.write('<html><head><title>ConstructedWetlands.org - Image Popup</title></head><body leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 marginheight=0 marginwidth=0><table border=0 cellpadding=0 cellspacing=0 width=100% height=100%><td align=center><table border=0 cellpadding=0 cellspacing=0><tr><td valign=top><img src='+imgsrc+'></td></tr><tr><td align=center><a href="javascript:window.close()"><font face=arial size=1>Close Window</font></a></td></tr></table></td></table></body></html>');
  msgWindow.document.close();
}

// Popup Diagram Window Script

function diagpopup(diag,x,y,text) {
  // path, width, height and included text as arguments
  var width = x-0;
  var height = y-0;
  var msgWindow = window.open('','','Width=' + eval(width+50) + ',Height=' + eval(height+75) + 'toolbar=no,status=no,menubar=no,scrollbars=no,resizeable=no');
  var imgsrc=diag;
  var include=text;
  msgWindow.document.open();
  msgWindow.document.write('<html><head><title>ConstructedWetlands.org - Image Popup</title></head><body leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 marginheight=0 marginwidth=0><table border=0 cellpadding=0 cellspacing=0 width=100% height=100% align=center><td><table border=0 cellpadding=2 cellspacing=0><tr><td align=center><img src='+imgsrc+'><p><font face=arial size=1>'+include+'</font></td></tr><tr><td align=center><a href="javascript:window.close()"><font face=arial size=1>Close Window</font></a></td></tr></table></td></table></body></html>');
  msgWindow.document.close();
}