Full browser images that scale smooth on resize

Hi

I am building a site for a photog. The site will pull in the images dynamically through XML. I would really like the images to be as big possible and so am building a site which stretches full browser. I have seen a few sites where the images fill the screen and when the browser is resized, the photo shrinks down, without loosing quality. Could someone shed some light on this for me. I am a designer, so p-l-e-a-s-e s-p-e-a-k s-l-o-w-l-y…:()

Here is an example of what I am talking about: http://www.richardfoster.com/
Go to portfolio and select an image then resize the browser.

I think I need to put in a ‘listener’ but of this I am not sure. I have attached some code which centres the image. Could I include the new listener function in within this function?

function keepItCentered() {
	picture.onResize = function() {
		this._x = Stage.width/2-(this._width/2);
		this._y = Stage.height/2-(this._height/2);
	};
	Stage.addListener(picture);
	picture.onResize();
}

Thanks