Event.observe(window, 'load',
      function() { 
      	//setPageSize();
      	//accordion_setup();
      	//Event.observe(document.onresize ? document : window, "resize", function() { setPageSize(); });	
      }
    );
    
    
function accordion_setup(){
	var acc = new accordion('accordion_div'); 
	acc.activate($$('#accordion_div .accordion_toggle')[0]);
}

function setPageSize(){
	calcSize();
	$('pageWrap').style.height= (winHeight - 40) + "px";
	$('mapFrame').style.height= (winHeight - 300) + "px";
	$('mapFrame').style.width = (winWidth - 400) + "px";
	$('postSideBar').style.height= (winHeight - 260) + "px";
}



var winWidth = 0;
var winHeight = 0;

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

function alertSize() {
  calcSize();
  window.alert( 'Width = ' + winWidth );
  window.alert( 'Height = ' + winHeight );
}
