function getImgCaptions()	{
	for(var i = 0;i<document.images.length;i++)	{
		if (document.images[i].className.indexOf("caption") > -1)	{
			if (document.addEventListener)	{
				document.images[i].addEventListener("click",imgCaption,true);
			}
			else {
				document.images[i].onclick = imgCaption;
			}
		}
	}
}

function imgCaption(e)	{
	if (!e) var e = window.event;
	this.caption = document.createElement("div");
	this.caption.style.position = "absolute";
	this.caption.style.display = "block";
	if (this.parentNode.className.indexOf("_l") > -1)	{
		this.caption.style.left = "0";
	}
	else {
		this.caption.style.right = "0";			
	}
	this.caption.style.bottom = "0";
	this.caption.style.width = "350px";
	this.caption.style.height = "300px";
	this.caption.style.padding = "10px";
	this.caption.style.border = "1px solid #ccc";
	this.caption.style.backgroundColor = "#fff";
	this.caption.innerHTML = "<img src=\"" + this.src + "\" alt=\"\" />";
	if (document.addEventListener)	{
		this.caption.addEventListener("click",imgCaptionOff,true);
	}
	else {
		this.caption.onclick = imgCaptionOff;
	}
	this.parentNode.appendChild(this.caption);
}

function imgCaptionOff(e)	{
	if (!e) var e = window.event;
	this.parentNode.removeChild(this);
}