/**
 *  From http://userscripts.org/scripts/review/3400
 */

function getPageScroll() {
	var xScroll, yScroll;

	if (self.pageYOffset) {
		yScroll=self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll=document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll=document.body.scrollTop;
	}
	
	if (self.pageXOffset) {
		xScroll=self.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollLeft){	 // Explorer 6 Strict
		xScroll=document.documentElement.scrollLeft;
	} else if (document.body) {// all other Explorers
		xScroll=document.body.scrollLeft;
	}
	
	arrayPageScroll=new Array(xScroll,yScroll);

	return arrayPageScroll;
}

/**
 *  From http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
 */

function getWindowSize() {
  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;
  }

  return new Array(myWidth,myHeight);
}
