cannot call method appendchild of undefined
<p>I  get this error when I insert a a href tag inside innerHtml in the javascript(flickrshow-7.1.js), for inserting a link for an image.Images are pulled from the flickr account using flickrshow javascript and displayed in the website as slideshow.
pls help.</p>

<pre><code>a.onLoadWindow = function() {
    a.elements.target = typeof a.elements.target === "string" ? document.getElementById(a.elements.target) : a.elements.target;
    a.elements.target.innerHTML = '&lt;a href="http://www.google.com"&gt;&lt;div class="flickrshow-container" style="background:transparent;height:' + a.elements.target.offsetHeight + "px;margin:0;overflow:hidden;padding:0;position:relative;width:" + a.elements.target.offsetWidth + 'px"&gt;&lt;/div&gt;&lt;/a&gt;';
</code></pre>
