//Funktion  um die Randspalten-Breite an das Browserfenster anzupassen

function adjust_window() {
  var width = jQuery(document).width();
  var height = jQuery(document).height();
	colWidth = (width - 845)/2;
  if (colWidth > 394) { colWidth = 394 }
  
  if (width < 830) {
    attribute = 'none';
    jQuery("#bg_right").css("display", attribute );
    jQuery("#bg_left").css("display", attribute );  
  }
  else {
    attribute = 'block';
    jQuery("#bg_right").css("width", colWidth );
    jQuery("#bg_left").css("width", colWidth );
    //$("#bg_right").css("height", height );
    //$("#bg_left").css("height", height );
    jQuery("#bg_right").css("display", attribute );
    jQuery("#bg_left").css("display", attribute ); 
  }
} 

$(document).ready(adjust_window);
$(window).resize(adjust_window);
