var context_userAgent;
var context_browserName;
var context_appVersion;
var context_screenWidth;
var context_screenHeight;

var context_availWidth;
var context_availHeight;
var context_windowWidth;
var context_windowHeight;
var context_bodyWidth;

function GetContext() {
  context_userAgent = navigator.userAgent;
  context_browserName = navigator.appName;
  context_appVersion = navigator.appVersion.substring(0,4);
  context_screenWidth = screen.width; // get full screen width
  context_screenHeight = screen.height; // get full screen height
}

function GetSize() {
  context_availWidth = screen.availWidth; // get available screen width
  context_availHeight = screen.availHeight; // get available screen height

  context_windowWidth = window.innerWidth;
  context_windowHeight = window.innerHeight;
  if (typeof context_windowWidth !== "number") {
    if (document.compatMode === "CSS1Compat") {
      context_windowWidth = document.documentElement.clientWidth;
      context_windowHeight = document.documentElement.clientHeight;
    } else {
      context_windowWidth = document.body.clientWidth;
      context_windowHeight = document.body.clientHeight;
    }
  }
  context_bodyWidth = Math.min(context_windowWidth, 700) - 20; //reduce width by l&r padding
}


window.onload = function() {
	GetContext();
	GetSize();
};


