function showLarge(src){
	d=document; ie=d.all?1:0;ns4=d.layers?1:0;dom=d.getElementById?1:0;var container=(dom)?d.getElementById("bigImg"):(ie)?d.all["bigImg"]:d.layers["bigImg"];
	if (src==""){ alert('Sorry, there is no larger image available at this time.'); return; }
	container.innerHTML="<a href='javascript:closeLarge();'><img id='anim' src='"+src+"' width='600' height='600' /><div id='close'>Click image to close</div></a>";
	
	for (var i in d.images){
		if (d.images[i].id=='anim'){im=d.images[i];}
	}
	enlarge(im, src, 50);
}
function enlarge(im, src, count){
	d=document; ie=d.all?1:0;ns4=d.layers?1:0;dom=d.getElementById?1:0;var container=(dom)?d.getElementById("bigImg"):(ie)?d.all["bigImg"]:d.layers["bigImg"];
	sz=Math.floor(Math.sin(Math.acos(1-(100/(100-count))))*600);
	im.width=sz;
	im.height=sz;

	var moz = (document.getElementById && !document.all)?1:0;
	winwidth = ((moz) ? window.innerWidth : document.body.clientWidth).valueOf();
	winheight = ((moz) ? window.innerHeight : document.body.clientHeight).valueOf();
	docleft = document.body.scrollLeft;
	doctop = (ie)?document.body.scrollTop:window.scrollY;

	topmargin = Math.floor((winheight-sz)/2);
	if (topmargin<0) topmargin=0;
	leftmargin = Math.floor((winwidth-sz)/2);
	if (leftmargin<0) leftmargin=0;
	cntprops=container.style;
	l = (leftmargin+docleft).toString()+"px";
	t =(topmargin+doctop).toString()+"px";
	cntprops.left=l;
	cntprops.top=t;
	cntprops.display="block";
	count-=10;
	if (count>-1){
		setTimeout("enlarge(im, '"+src+"', "+count+");", 1000/30);
	} else {
		setTimeout("finish('"+src+"');", 1000/30);
	}
}
function finish(src){
	d=document; ie=d.all?1:0;ns4=d.layers?1:0;dom=d.getElementById?1:0;var close=(dom)?d.getElementById("close"):(ie)?d.all["close"]:d.layers["close"];
	close.style.display="block";
}

function closeLarge(){
	d=document; ie=d.all?1:0;ns4=d.layers?1:0;dom=d.getElementById?1:0;var container=(dom)?d.getElementById("bigImg"):(ie)?d.all["bigImg"]:d.layers["bigImg"];
	container.style.display="none";
	container.innerHTML="";
}
