function LargePics(img,title2){
  foto1= new Image();
  foto1.src=(img);
  LargePics2(img,title2);
}

function LargePics2(img,title2){
  if((foto1.width!=0)&&(foto1.height!=0)){
    LargePics3(img,title2);
  }
  else{
    funzione="LargePics2('"+img+"','"+title2+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function LargePics3(img,title2){
  largh=foto1.width+200;
  altez=foto1.height+200;
  stringa="resizable=1, scrollbars=1, width="+largh+",height="+altez;
  newWind=window.open("","",stringa);
		 output="<HTML><HEAD><title>"+title2+"</title></HEAD><BODY><CENTER>"
 		 output+="<FONT FACE='Arial' SIZE='+1' COLOR='black'><B>"+title2+"</B></FONT><BR>"
		 	output+="<TABLE BORDER='0' cellspacing='0' cellpedding='0'><TR><TD>"
		 output+="<IMG SRC='"+img+"'>"
		 	output+="</TD></TR></TABLE>"
		 output+="<FORM><TABLE BORDER='0'><TR><TD><br/><INPUT TYPE='button' VALUE='Close' onClick='self.close()'>"
		 output+="</TD></TR></TABLE></FORM></CENTER></BODY></HTML>"
		 newWind.document.write(output);
		 newWind.document.close();
 		 newWind.focus();
}

