/* NEW DODOSNOMARGIN SCRIPT IS MODIFIED FROM http://www.therotunda.net/code/autosized-popup-window.html */
/* http://regretless.com/dodo/newworld */
function viewPic(img)
{ 	
    picfile = new Image(); 
    picfile.src =(img); 
    fileCheck(img); 
}

function fileCheck(img)
{ 	
    if( (picfile.width!=0) && (picfile.height!=0) )
    { 
        makeWindow(img); 
    }
    else 
    {
        funzione="fileCheck('"+img+"')"; 
        intervallo=setTimeout(funzione,10); 
    }
}

 

function makeWindow(img)
{ 	
    ht = picfile.height+00;
    wd = picfile.width+00; 

    var args= "height=" + (ht+4) + ",innerHeight=" + ht;
    args += ",width=" + (wd+4) + ",innerWidth=" + wd;
    if (window.screen) 
    { 
        var avht = screen.availHeight; 
        var avwd = screen.availWidth;
        var xcen = (avwd - (wd-0)) / 2; 
        var ycen = (avht - (ht-0)) / 2;
        args += ",left=" + xcen + ",screenX=" + xcen;
        args += ",top=" + ycen + ",screenY=" + ycen + ",resizable=yes"; 	
    }

	popwin=window.open("","_blank",args)
	popwin.document.open()
	popwin.document.write('<html><head><title>'+img+'</title></head><body bgcolor=white scroll=no topmargin=0 leftmargin=0 rightmargin=0 bottomargin=0 marginheight=0 marginwidth=0><div align="center"><a href="javascript:window.close()"><img src="'+img+'" width="'+wd+'" height="'+ht+'" border="0"></a></div></body></html>')
	popwin.document.close()

}
