window.onload = function() {
	var As = document.getElementsByTagName("A");
	for (i=0; i<As.length; i++) {
		if (As[i].className == "ShowLargeImage") {
			As[i].onclick = function() {
				var id = this.href.split('#')[1];
				var parameters = "toolbar==0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1,width=100,height=100";
				var winOpener = window.open("PopupImage.aspx?CategoryID=" + id, "popup", parameters);
				return false;
			}
		}
	}
}

/*
window.onload = function() {
	var As = document.getElementsByTagName("A");
	for (i=0; i<As.length; i++) {
		if (As[i].className == "ShowLargeImage") {		
			As[i].onclick = function() {
				var id = this.href.split('#')[1];
				var largeImage = document.getElementById(id);
				largeImage.style.display = "block";

				var posx = 0;
				var posy = 0;
				if (!e) var e = window.event;
				if (e.pageX || e.pageY)
				{
					posx = e.pageX;
					posy = e.pageY;
				}
				else if (e.clientX || e.clientY)
				{
					posx = e.clientX + document.body.scrollLeft;
					posy = e.clientY + document.body.scrollTop;
				}
				
				largeImage.style.top = posy - (largeImage.height/2);
				largeImage.style.left = posx - (largeImage.width/2);
			}
		}
	}
	var IMGs = document.getElementsByTagName("IMG");
	for (i=0; i<IMGs.length; i++) {
		if (IMGs[i].className == "LargeImage") {		
			IMGs[i].onclick = function() {
				this.style.display = "none";
			}
			IMGs[i].onmouseout = function() {
				this.style.display = "none";
			}
		}
	}
}
*/
