	function CenterMe(imgobj, maxw, maxh)
	{
		var img;
		if (imgobj && imgobj.src) {
			img = new Image();
			img.src = imgobj.src;
			
			if ((img.width<maxw) && (img.height<maxh)) {
				imgobj.style.margin = "0px";
				imgobj.style.marginLeft = Math.floor((maxw-img.width)/2)+"px";
				imgobj.style.marginTop = Math.floor((maxh-img.height)/2)+"px";
			} else if ((img.width>0) && (img.height>0)){
				var neww, newh;
				
				// wider
				if ((img.width/img.height)>(maxw/maxh)) {
					neww = maxw;
					newh = Math.floor(img.height*maxw/img.width);
				// taller
				} else {
					newh = maxh;
					neww = Math.floor(img.width*maxh/img.height);
				}
				
				imgobj.style.margin = "0px";
				imgobj.style.marginLeft = Math.floor((maxw-neww)/2)+"px";
				imgobj.style.marginTop = Math.floor((maxh-newh)/2)+"px";
				imgobj.style.width = neww+"px";
				imgobj.style.height = newh+"px";
			}
		}
	}

	function OpenHelpWindow(page_to_load) {
		window.open(page_to_load,'new_win','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=500, height=600');
	}

