// JavaScript Document

<!--
	function center_page() {  // function to center page_wrapper div in browser window...
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	  } else if( document.documentElement &&
		  ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	  }
		// center the content on the page
		var page_width				=		myWidth;
		var current_left			=		xLeft ("page_wrapper");
		var new_left				= (page_width-960)/2  // work out where the left of the page should be

		if (new_left <0) { new_left = 0;} // if position to move to is less than zero move to zero
		xLeft("page_wrapper",(new_left))
		xShow("page_wrapper")
	  return true
	}

	function adjustLayout() {
		// get heights of columns
		var left_col_height			=		xHeight("left");
		var center_col_height		=		xHeight("center");
		var right_col_height		=		xHeight("right");

		// get maximum height
		var max_height				= Math.max(left_col_height, Math.max(center_col_height,right_col_height));
		
		// set all columns to max height

		xHeight ("left",max_height);
		xHeight ("right",max_height);
		xHeight ("center",max_height);

	}

function winOnResize() {
  xMoveTo('floater_left', 0, 120);
  xMoveTo('floater_right', 610, 120);
  winOnScroll(); // initial slide
}
function winOnScroll() {
		var slideTime = 500

		var pos	=	xScrollTop() + topMargin;
		// not sure why you have to put them in two if's  but it works so don't knock it...
		if (pos > 120) {
  			xSlideTo('floater_right', 610, xScrollTop() + topMargin, slideTime);
		}
		if (pos > 120) {
  			xSlideTo('floater_left', 0, xScrollTop() + topMargin, slideTime);
		}
}
	window.onload = function() {
		xAddEventListener (window, "resize", adjustLayout, false);
		adjustLayout();

		// slide code
		topMargin = 0;
		winOnResize(); // set initial position
		xShow('floater_left');
		xShow('floater_right');
		xAddEventListener(window, 'resize', winOnResize, false);
		xAddEventListener(window, 'scroll', winOnScroll, false);
	}
//-->
