FullBackground=function(id) {
	this.container=document.getElementById(id);
	if (this.container) {
		var arr=this.container.getElementsByTagName("img");
		if (arr && arr.length) this.obj=arr[0];
		if (this.obj) {
			var self=this;
			this.image=new Image();
			this.image.onload=function() {
				self.k=self.image.width/self.image.height;
				self.onResize();
			}
			this.image.src=this.obj.src;
			window.onresize=function() {self.onResize();}
		}
	}
}

FullBackground.prototype.onResize=function() {
	if (this.obj && this.k) {
		var w=document.body.clientWidth;
		var h=document.body.clientHeight;
		if (w/h>this.k) {
			this.obj.style.width=w+'px';
			this.obj.style.height='auto';
		} else {
			this.obj.style.width='auto';
			this.obj.style.height=h+'px';
		}
	}
}

