
var lastactive=null;
function showPic (whichpic) {
        if (document.getElementById) {
                if(navigator.userAgent.toLowerCase().indexOf('safari') > 0) {
                        var nimg = document.createElement('img');
                        nimg.src = whichpic.href;
                        var place = document.getElementById('placeholder');
                        nimg.setAttribute('id','placeholder');
                        place.setAttribute('id', '');
                        place.parentNode.replaceChild(nimg, place);
                }
                else {
                        document.getElementById('placeholder').src=whichpic.href
;
                }
                if (whichpic.title) {
                        document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
                } else {
                        document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
                }
               	if(lastactive != null)
			lastactive.className='';
		lastactive = whichpic;
		lastactive.className='active';
		lastactive.blur(); 
		return false;
        } else {
                return true;
        }
}


function init()
{
	anchors = document.getElementsByTagName('a');

	for(i=0; i < anchors.length;i++)
	{
		if(anchors[i].className == 'active')
		{
			lastactive = anchors[i];
			break;
		}
	}
}

window.onload=init;
