function pageScroll() {
	var _width = 1830;
	var _height = 1106;
	var left_pad = 305; //Width of the filling pad on the left side, if window is smaller than min_view_width, x_pos should be this
	//var right_pad = 540;
	var top_pad = 380;
	//var bottom_pad = 155;
	var y_offset = 195; //How much taller the page would need to be in order for the visible section to appear verticaly centered
	var min_view_width = 1005;
	var min_view_height = 668;
	var h_client = f_clientHeight();
	var w_client = f_clientWidth();
	var x_pos = f_scrollLeft();
	var y_pos = f_scrollTop();
	//alert("h * w: " + h + " * " + w + " x_pos: " + x_pos + " y_pos: " + y_pos);
	var vertScrollPos = 0;
	var horizScrollPos = 0;
	//alert("height: " + h);
	
	var right_pad = _width - min_view_width - left_pad;
	var bottom_pad = _height - min_view_height - top_pad;
    	if(h_client < _height) {
		if(h_client < min_view_height) {
		  vertScrollPos = top_pad - y_pos;
		} else {
                  vertScrollPos = (_height + (top_pad - bottom_pad) - h_client)/2 - y_pos;
		}
		//alert("vertScrollPos: " + vertScrollPos);
		//window.scrollBy(0,vertScrollPos); // horizontal and vertical scroll increments
	}
	if(w_client < _width) {
		if(w_client < min_view_width) {
			//x_pos += x_pos - max_x;
			horizScrollPos = left_pad - x_pos;
		} else {
			//horizScrollPos = (_width - w_client)/2 - (left_pad/2) - x_pos;
			//horizScrollPos = left_pad + (w_client - min_view_height - left_pad - right_pad)/2 - x_pos;
			horizScrollPos = (_width + (left_pad - right_pad) - w_client)/2 - x_pos;
			//alert("left_pad: " + left_pad + ", _width: " + _width + ", w_client: " + w_client + ", right_pad: " + right_pad + ", x_pos: " + x_pos + " = " + horizScrollPos);
		}
		//horizScrollPos = (1441 - w) - x_pos;
		//alert("horizScrollPos: " + horizScrollPos);
	}
	//alert("vertScrollPos: " + vertScrollPos + " horizScrollPos: " + horizScrollPos);
    	//scrolldelay = setTimeout('pageScroll()',100); // scrolls every 100 milliseconds
	window.scrollBy(horizScrollPos,vertScrollPos); // horizontal and vertical scroll increments
}


function alertSize() {
  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;
  }
  window.alert( 'Width = ' + myWidth );
  window.alert( 'Height = ' + myHeight );
}

// cross browser functions
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}

function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}

function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
