var pugWindow1=null;

function pugNewWindow(pugname,puglink,pugw,pugh){
// modified for Image Application
pugCloseWin();
if (pugname==pugWindow1){
Img=new Image();
Img.onload=function(){ pugWindow1=window.open(this.src,'pugWindow1','width='+(this.width+20)+',height='+(this.height+20)+', left=10,top=10,location=yes,menubar=yes,resizable=yes,status=yes,scrollbars=no,toolbar=yes'); }
Img.src=puglink;
}
}

function pugCloseWin(){
// Recommended - include onunload="pugCloseWin();" in the <body> tag.
if (pugWindow1&&!pugWindow1.closed){ pugWindow1.close(); }
}