Ciao ho il seguente script non so molto di javascipt però:

Lo script sotto mi visualizza delle immagini prese da panoramio e fin qui ok quello che vorrei fare è aggiungere degli attributi a queste immagini come ad esempio un bordo e hspace o un link come potrei aggiungere questi tag?

Codice PHP:
<html>
<
head>
  <
script type="text/javascript">
    
    function 
json(url)
    {
      var 
jstag=document.createElement("script");
      
jstag.setAttribute("type""text/javascript");
      
jstag.setAttribute("src"url);
      
document.getElementsByTagName("head")[0].appendChild(jstag);
    }

    function 
tratarFotos(datos)
    {
      
      var 
fotos datos['photos'];
      for(var 
i=0;i<20;i++)
      {
        var 
url fotos[i]['photo_file_url'];
        var 
miimagen = new Image();
        
miimagen.src url;
        
document.body.appendChild(miimagen);
      }
      

      
    }
      
json("http://www.panoramio.com/map/get_panoramas.php?order=popularity&size=square&set=full&from=0&to=21&minx=1.19000000&miny=38.7198706&maxx=1.64333330&maxy=39.080204&callback=tratarFotos");
  
</script>
</head>
<body>


</body>
</html>