// ****************************
// * Screen functions library *
// ****************************

function get_screen_height() {
  var screen_height = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    // Non-IE, works well on FF3+, Chrome+, Opera
    screen_height = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    // IE 6+ "standards compliant mode"
    screen_height = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    // IE 4 compatible
    screen_height = document.body.clientHeight;
  }
  return screen_height;
}

function get_screen_width() {
  var screen_width = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    // Non-IE, works well on FF3+, Chrome+, Opera
    screen_width = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    // IE 6+ "standards compliant mode"
    screen_width = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    // IE 4 compatible
    screen_width = document.body.clientWidth;
  }
  return screen_width;
}

