function showimage(img)
{
	document.getElementById('shader').style.visibility='visible';
	document.getElementById('imgbox').style.visibility='visible';
	document.getElementById('imgbox').innerHTML='<center>Loading...</center>';
	document.getElementById('imgbox').style.visibility='visible';
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
		{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
			document.getElementById("imgbox").innerHTML=xmlhttp.responseText;
		}
		else document.getElementById("imgbox").innerHTML='<center>Loading...</center>';
	}
	xmlhttp.open("GET","gallery.php?getimg=" + img,true);
	xmlhttp.send();
	var shaderwidth = document.getElementById('shader').offsetWidth;
	var imgboxwidth = document.getElementById('imgbox').offsetWidth;
	var newleft = (shaderwidth / 2) - (imgboxwidth / 2);
	document.getElementById('imgbox').style.left=newleft + 'px';
}

function closeimage()
{
	document.getElementById('shader').style.visibility='hidden';
	document.getElementById('imgbox').style.visibility='hidden';
	document.getElementById('bigimg').src='static/1px.gif';
}
