function screenshot(pic) {
	var obj = document.getElementById('sshot');

	var iAWidth = (navigator.userAgent.toLowerCase().indexOf('msie') + 1) ? document.body.clientWidth : window.innerWidth;
	var iAHeight = (navigator.userAgent.toLowerCase().indexOf('msie') + 1) ? 613 : window.innerHeight;
	var iATop = (navigator.userAgent.toLowerCase().indexOf('msie') + 1) ? document.body.scrollTop : window.pageYOffset;
	
	
	
	var iLeft = ((iAWidth - 744 ) / 2) - 20;
	var iTop = iATop + ((iAHeight - 584) / 2);
	obj.style.left = iLeft + "px";
	obj.style.top = iTop + "px";

	//browser detection for size purposes: IE doesn't support max-width in css
	if (navigator.userAgent.toLowerCase().indexOf('msie') + 1) {
		var oImage = new Image();
		var iWidth = 744;
		var iHeight = 554;
		oImage.src = pic;
		
		if (oImage.width > iWidth ||
			oImage.height > iHeight) {
			var sSize = "";
			if (oImage.width / oImage.height > iWidth / iHeight)
				sSize = 'style="width: ' + iWidth + 'px"';
			else
				sSize = 'style="height: ' + iHeight + 'px"';
			obj.innerHTML = '<div class="center" id="sshot_image"><img src="' + pic + '" ' + sSize + ' /></div><div class="center" id="sshot_menu"><a href="javascript:void(0);" onclick="no_screenshot()">close</a></div>';
		}
		else
			obj.innerHTML = '<div class="center" id="sshot_image"><img src="' + pic + '" /></div><div class="center" id="sshot_menu"><a href="javascript:void(0);" onclick="no_screenshot()">close</a></div>';
	}		
	else
		obj.innerHTML = '<div class="center" id="sshot_image"><img src="' + pic + '" /></div><div class="center" id="sshot_menu"><a href="javascript:void(0);" onclick="no_screenshot()">close</a></div>';
		
	obj.style.visibility = "visible";
}

function no_screenshot() {
	document.getElementById('sshot').style.visibility = "hidden";
	return true;
}