//create an interval
var myInterval = self.setInterval(insrtImgs, 50)


//global variables
var imgs = null;
function insrtImgs() {


	if (imgs == null)
	  return; 

	clearInterval(myInterval);
	var picCnt = imgs.length - 1;

	var x = Math.round(picCnt*Math.random())
		var aSrc = "http://farm1.static.flickr.com/" + imgs[x].server + "/" + imgs[x].id + "_" + imgs[x].secret + ".jpg";
	var aTitle = imgs[x].title;
    var picDiv = document.createElement('span');
    picDiv.className = 'flickritem';
    var image = document.createElement('img');
    image.setAttribute('src', aSrc);
    image.setAttribute('title', aTitle);
    image.setAttribute('alt',  + aTitle);
    image.setAttribute('width', 541);
    image.setAttribute('height', 275);
    image.className = 'flickrphoto';
    picDiv.appendChild(image);
	document.getElementById('dynoImg').appendChild(picDiv);


}