function Foto(img){ foto1= new Image(); foto1.src=(img); Controlla(img); } function Controlla(img){ if((foto1.width!=0)&&(foto1.height!=0)){ viewFoto(img); } else{ funzione="Controlla('"+img+"')"; intervallo=setTimeout(funzione,20); } } function viewFoto(img){ LeftPosition = (screen.width) ? (screen.width-200)/2 : 0; TopPosition = (screen.height) ? (screen.height-200)/2-30 : 0; largh=foto1.width+25; altez=foto1.height+25; stringa="width="+largh+",height="+altez+",top=100,left100" finestra=window.open(img,"",stringa); } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); }