var timer = null;
function imagePreview(chck)
{
	if ((imgpreview = document.getElementById("preview")) && chck)
	{
		if (timer) clearTimeout(timer);
		chck.onclick = function()
		{
			timer = setTimeout('imgpreview.src="'+this+'"', 150);
			imgpreview.src = "gts_themes/default/images/pixel.gif";
			imgpreview.setAttribute("title", chck.getElementsByTagName("img")[0].getAttribute("title"));
			return false;
		};
	}
}

function autoLoad()
{
	if (anchors = document.getElementsByTagName("a"))
	{
		for (var i=0; i<anchors.length; i++)
		{
			if (anchors[i].className == "blank") anchors[i].target = "_blank";
			if (anchors[i].className == "photo") imagePreview(anchors[i]);
		}
	}
}

try
{
	window.addEventListener("load", autoLoad, true);
}
catch(e)
{
	window.attachEvent("onload", autoLoad);
}

