<!--
/*****
*
*    jso7F_Browser constructor
*
*****/
function jso7F_Browser(){
	// initialize properties
	this.BrowserType;
	this.display = {width:0, height:0};
	this.init();
}

/*****
*
*    jso7F_Browser init
*
*****/
jso7F_Browser.prototype.init = function () {
	if( typeof( window.innerWidth ) == 'number' ) {
		this.BrowserType = 'Non-IE';
		this.display.width = window.innerWidth;
		this.display.height = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		this.BrowserType = 'IE6+ standards compliant mode';
		this.display.width = document.documentElement.clientWidth;
		this.display.height = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		this.BrowserType = 'IE4 compatible';
		this.display.width = document.body.clientWidth;
		this.display.height = document.body.clientHeight;
	}
}

/*****
*
*    jso7F_Browser DisplayWidth
*
*****/
jso7F_Browser.prototype.DisplayWidth = function () {
		return this.display.width;
}

/*****
*
*    jso7F_Browser DisplayWidth
*
*****/
jso7F_Browser.prototype.DisplayHeight = function () {
		return this.display.height;
}

/*****
*
*    jso7F_Browser GetTopLeft
*
*****/
jso7F_Browser.prototype.GetTopLeft = function (elm){
	
	var x, y = 0;
	
	//set x to elm’s offsetLeft
	x = elm.offsetLeft;
	
	//set y to elm’s offsetTop
	y = elm.offsetTop;
	
	//set elm to its offsetParent
	elm = elm.offsetParent;
	
	//use while loop to check if elm is null
	// if not then add current elm’s offsetLeft to x
	//offsetTop to y and set elm to its offsetParent
	
	while(elm != null){
	
		x = parseInt(x) + parseInt(elm.offsetLeft);
		y = parseInt(y) + parseInt(elm.offsetTop);
		elm = elm.offsetParent;
	 }
	
	//here is interesting thing
	//it return Object with two properties
	//Top and Left
	
	return {Top:y, Left: x};
	
}
//-->
