function openImageSizedWindow(src){    var i = new Image();     i.onload = function() {        var pop_win = window.open(                          "",                          "_blank",                          "width="+i.width+",height="+i.height+",scrollbars=no,resizable=yes"                      );        if ( pop_win ) {            pop_win.window.document.open();            pop_win.window.document.write(             '<html>'            +'<head><title>'+i.alt+'</title></head>'            +'<body style="margin:0;padding:0;border:0;">'            +'<img src="'+i.src+'" width="100%" alt="" />'            +'</body>'            +'</html>'            );            pop_win.window.document.close();        } else {            location.href = i.src;        }        i.onload = function(){};    }    i.src = src;	}