<!-- 
function AutoResize(img){
  photo1= new Image();
  photo1.src=(img);
  Controller(img);
}


function Controller(img){
  if((photo1.width!=0)&&(photo1.height!=0)){
    view_photo(img);
  }
  else{
    funzione="Controller('"+img+"')";
    interval=setTimeout(funzione,20);
  }
}

function view_photo(img){
  
  w=photo1.width+25;
  h=photo1.height+10;
  
  if(w>window.screen.width-150){ w = window.screen.width-150; }
  if(h>window.screen.height-200){ h = window.screen.height - 200; }
  
  t_str = (window.screen.height - h)/2;
  l_str = (window.screen.width - w)/2;
  

  img_str = "/js/view_photo.htm?img="+img;
  str="width="+w+", height="+h+",top="+t_str+",left="+l_str+", scrollbars=1, resizable=1";
  remote=window.open(img_str,"",str);
}



//  -->

