/*
Description:-
-------------
Basic javascript calls to get/set some browser information.

Design Notes:-
--------------

Revision Control:-
------------------
Created On: 2008 July 22, 14:42
 
$Revision: 1$
$LastChangedDate:$
*/
function getBrowserHeight ( )
{
	if ( window.innerHeight ) {
		return window.innerHeight;
	}
	else if ( document.documentElement && document.documentElement.clientHeight ) {
		return document.documentElement.clientHeight;
	}
	else if ( document.body ) {
		return document.body.clientHeight;
	}
}

function getBrowserWidth ( )
{
	if ( window.innerWidth ) {
		return window.innerWidth;
	}
	else if ( document.documentElement && document.documentElement.clientWidth ) {
		return document.documentElement.clientWidth;
	}
	else if ( document.body ) {
		return document.body.clientWidth;
	}
}

//
// Gets the Y-coords starting from the top of the webpage. Should work for IE
// and FF.
//
function getBrowserYOffset ( )
{
	var y =0 ;
	if ( window.pageYOffset ) {
		// All except IE.
		y = window.pageYOffset;
	} else if ( document.body ) { 
		// IE.
		y = document.documentElement.scrollTop;
	}

	return y;
}

//
// Sets the Y-coords starting from the top.
//
function setBrowserYOffset ( yOffset )
{
	window.scrollTo ( 0, yOffset );
}