var wWidth  = 1004;  // A default if none of what follows works
var minWidth = 760; // The minimum width of our content
var maxWidth = 1142; // The maximum width of our content
var width;          // The calculated width of our content
var hr;             // The calculated width of our horizontal rule

if( typeof( window.innerHeight ) == 'number' ) {
	//Non-IE 
   wWidth = window.innerWidth;
} else if( document.documentElement &&
	     ( document.documentElement.clientWidth ) ) {
    //IE 6+ in 'standards compliant mode'
    wWidth = document.documentElement.clientWidth;
  } else if( document.body && document.body.clientWidth ) {
    //IE 4 compatible
    wWidth = document.body.clientWidth;
  }

width = wWidth - 162; 
width = Math.max(minWidth,width);
width = Math.min(maxWidth,width);
hr    = width - 348;

document.write('<style type="text/css">'+ "\n");
document.write("/* div.container {\n    width: " + width + "px;\n} */\n");
document.write("/* div.hr {\n    width: " + hr + "px;\n} */\n");
document.write("</style>\n");

