var winOpen = null

function displayImage(picName, windowName, windowWidth, windowHeight){
  return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20)  + ",height=" + (parseInt(windowHeight)+15)) 
  }



function winClose(){    // close all open pop-up windows   
  if(winOpen != null) winOpen.close() 
  }
// is window already open, if so, close

// if (winOpen.open  && !winOpen.closed) {
//  winOpen.close();
//   }

function doNothing(){}  // does nothing but required by JavaScript in this case

function displayImage(picName,  windowName, windowWidth, windowHeight){
  var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + windowWidth + ",height=" + windowHeight)
  if(winHandle != null){
    var htmlString = "<html><head><title>Picture</title></head>"  
    htmlString += "<body background=" + picName + ">"
    htmlString += "</body></html>"
    winHandle.document.open()
    winHandle.document.write(htmlString)
    winHandle.document.close()
    }	
  if(winHandle != null) winHandle.focus() //brings window to top
  return winHandle
  }
// is window already open, if so, close

// if (winOpen.open  && !winOpen.closed) {
//  winOpen.close();
//   }


