function bgImage() {
	var wWidth, half, css;
	if (self.innerHeight) // all except Explorer
	{
		wWidth = self.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		wWidth = document.documentElement.clientWidth;
	}
	else if (document.body) // other Explorers
	{
		wWidth = document.body.clientWidth;
	}
	half = Math.round(wWidth/2);
	css  = '<style type="text/css">';
	css += 'body {background-image:url(images/half.php?width=' + half + ');}'
	css += '</style>';
	document.write(css);
	win.status=css;
}
bgImage();

