function ShowFoto(img)
	{
  	foto1= new Image();
 	 foto1.src=(img);
  	Control(img);
	}
	
function Control(img)
	{
  	if((foto1.width!=0)&&(foto1.height!=0))
		{
    	viewFoto(img);
 		}
  	else
		{
    	funcao="Control('"+img+"')";
    	intervall=setTimeout(funcao,10);
  		}
	}
	
function viewFoto(img)
	{
  	larg=foto1.width+20;
  	alt=foto1.height+20;
  	string="width="+larg+",height="+alt;
  	janela=window.open(img,"",string);
	}