function imgOpen(imgPath){

poto = new Image();
poto.src = (imgPath);
Controlla(imgPath);
}

function Controlla(imgPath){
if((poto.width!=0) && (poto.height!=0)) {
  winopen(imgPath, poto.width, poto.height);
} else{
  funzione = "Controlla('" + imgPath + "')";
  intervallo = setTimeout(funzione, 20);
}
}

function winopen(imgPath, Width, Height) {
var winHandle = window.open("" ,"windowName","toolbar=no,scrollbars=no,resizable=no, top=200, left=200 ,width=" + Width + ",height=" + Height)
  if(winHandle != null) {
  var htmlString = "<html><head><title>ÀÌ¹ÌÁö</title></head>" 
   htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>"
   htmlString += "<a href=javascript:window.close()><img src=" + imgPath + " border=0 alt=ÀÌ¹ÌÁöÅ¬¸¯:È­¸é´Ý±â></a>"
   htmlString += "</body></html>"
   winHandle.document.open()
   winHandle.document.write(htmlString)
   winHandle.document.close()
  } 
  if(winHandle != null) winHandle.focus()
   return winHandle
}