// Declare a handle to the popup window
var wininf=null;

function displaypic(url, w, h) {
 
     // close the popup if it is open already
       if( wininf != null && !wininf.closed ) wininf.close();

      // Create the popup
       wininf = window.open( url, "WINDOW","width=" + w + ",height=" + h + ",scrollbars=1,toolbar=0,menubar=0,resizable=0,directories=0,location=0"); 
 
    // Make it appear ontop of other windows
       wininf.focus();
  
    // Return false so that the HREF of the A tag is not executed
       return false;
}
