Fullscreen background image?

Hi, im trying to make a background image on full html screen like this one at

http://www.refune.com/index_main.html

but i cant for the life at me get it to work right.

I have got it to scale using this code below

Stage.scaleMode = “noBorder”;
var stageListener = new Object();
Stage.addListener = (stageListener);
stageListener.onResize = function() {
background._height = Stage.height;
background._width = Stage.width;
};

it scales but pixelates and doesnt seem to scale like the website, any help would be appriciated im pulling my hair out on this!

Also im using a JPEG image but it pixelates when i resize the HTML page so i am wondering if the image should be of an another format?