// JavaScript Document
<!--
var bgW=0;
var bgH=0;

var resizeBg = function() {
	t=document.getElementById('backgroundImage');
	if (t) {
		if (bgW==0) bgW=t.width;
		if (bgH==0) bgH=t.height;
		var ratio=bgW/bgH;
		
		//window.status=bgW+'x'+bgH+' '+ratio;
		var h = self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
		var w = self.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
	
		if (h<w/ratio) {
			t.width = w;
			t.height = w/ratio;
		} else {
			t.width = h*ratio;
			t.height = h;
		}
	}
}
window.onresize=resizeBg;
window.onload=resizeBg;

