// find size of browser window in a browser-independent manner.
// code for this function comes from 
// http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
function findbrowsersize()
	{
	myWidth = 0;
	myHeight = 0;
	
	if (typeof(window.innerWidth) == 'number')
		{
		// assume non-IE browser
		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, IE 5-6 in quirks mode
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
		}

	// retval = new Array(myHeight, myWidth);
	return {height: myHeight, width: myWidth};
	}

// find scrolled position of browser window in a browser-independent manner.
// code for this function comes from 
// http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
function findbrowserscroll() {
	var scrollX = 0;
	var scrollY = 0;
	
	if( typeof( window.pageYOffset ) == 'number' )
		{
		//Netscape compliant
		scrollY = window.pageYOffset;
		scrollX = window.pageXOffset;
		}
	else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) )
		{
		//DOM compliant
		scrollY = document.body.scrollTop;
		scrollX = document.body.scrollLeft;
		}
	else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) )
		{
		//IE6 standards compliant mode
		scrollY = document.documentElement.scrollTop;
		scrollX = document.documentElement.scrollLeft;
		}
	return { xoffset:scrollX, yoffset:scrollY };
}