function resizeBackgroundImage() {
	
	if (document.layers) {
        Wd = window.innerWidth+window.pageXOffset;
        Ht = window.innerHeight+window.pageYOffset;
    } else if (document.all) {
        Wd = document.body.clientWidth+document.body.scrollLeft;
        Ht = document.body.clientHeight+document.body.scrollTop;
    } else if (document.getElementById) {
        Wd = window.innerWidth+window.pageXOffset;
        Ht = window.innerHeight+window.pageYOffset;
    }
		
	Wd = parseInt(Wd) + 10;
	Ht = parseInt(Ht) + 10;
	
	iHei = 	900;
	iWid = 1200;
		
	rat1 = Wd / Ht;
	rat2 = iWid / iHei;
		if (rat2 < rat1) {
			document.getElementById('backImage').width = Wd;
			newH = (Wd / iWid) * iHei;
			document.getElementById('backImage').height = newH;
			difY = Math.ceil(Number((newH - Ht) / 2)) -5;
			document.getElementById('backImage').style.marginTop = "-"+difY+"px";
			document.getElementById('backImage').style.left = "-"+5+"px";
		} else {
			document.getElementById('backImage').height = Ht;
			newW = (iWid / iHei) * Ht;
			document.getElementById('backImage').width = newW;
			difX = Math.ceil(Number((newW - Wd) / 2)) - 5;
			document.getElementById('backImage').style.marginLeft = "-"+difX+"px";
			document.getElementById('backImage').style.marginTop = "-"+5+"px";			
		}
}
	
window.onresize = function() {
	resizeBackgroundImage();
}
