<script type="text/javascript" language="javascript">
 
function jsonFlickrApi(rsp) {
 if (rsp.stat != "ok"){
  return;
 }
 
 var s = "";
 var i = Math.random();
 i = i * 100;
 i = Math.ceil(i);
 
 photo = rsp.photos.photo[ i ];
 
 t_url = "http://farm" + photo.farm +
 ".static.flickr.com/" + photo.server + "/" +
 photo.id + "_" + photo.secret + "_" + "m.jpg";
 
 p_url = "http://www.flickr.com/photos/" +
 photo.owner + "/" + photo.id;
 
 s =  '<img alt="'+ photo.title + '"src="' + t_url + '"/>'  ;
 
 
 document.writeln(s);
 //this tells the JavaScript to write
 //everything in variable "s" onto the page
 
}
</script>
