function CaricaFoto(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){
//  anchura=foto1.width+20;
//  altura=foto1.height+60;

  anchura=foto1.width+50;
  altura=350;

  condensado="width="+anchura+",height="+altura+",scrollbars=1,left=30";
  ventana=window.open(img,"",condensado);

  ventana.document.write('<html>\n<head>\n');
  ventana.document.write('<title>Lloyd Mats Logos</title>\n');
  ventana.document.write('<style>\n');
  ventana.document.write('body {\n	font-family: "Comic Sans MS",sans-serif;\n}\n');
  ventana.document.write('td {\n	font-family: "Comic Sans MS",sans-serif;\n }\n</style>\n');
ventana.document.write('<meta http-equiv="imagetoolbar" content="no" />');

	script1 = '</script'+'>';
  ventana.document.write('<script src="JSscripts/protect.js">'+script1);
  ventana.document.write('</head>\n');

  ventana.document.write('<body bgcolor=#FFFFCC text=#003300>\n');
  ventana.document.write('<center>\n');

  ventana.document.write('<font size=1>All emblems are used under license to Lloyd Mats!</font>');
ventana.document.write('<br><font size =-1><a href="#"onclick=window.close()>Close Window</a></font></br></h2>\n');
  ventana.document.write('<table>\n');
  ventana.document.write('  <tr>\n');
  ventana.document.write('    <td>\n');
  ventana.document.write('      <img src="' + img + '">');
  ventana.document.write('    </td>\n');
  ventana.document.write('    <td>\n');
  ventana.document.write('    </td>\n');
  ventana.document.write('  </tr>\n');
  ventana.document.write('</table>\n');
ventana.document.write('<br><font size =-1><a href="#"onclick=window.close()>Close Window</a></font></br></h2>\n');
  ventana.document.write('</center>\n');
  ventana.document.write('</body>\n');
  ventana.document.write('</html>\n');
//  ventana.document.close();
}