///////////////////////////////////
//        ajaximrpg 4.00         //
//    AJAX Instant Messenger     //
//      Copyright (c) 2010       //
//   Do not remove this notice   //
///////////////////////////////////

/**
 * A class to get the size of the browser client area.
 **/
var Browser = {
  /**
   * Get the width of the browser client area.
   *
   * @author Joshua Gross
   * @return Document Width
   **/
  width: function() {
    if (self.innerWidth) {
      return self.innerWidth;
    } else if (document.documentElement && document.documentElement.clientWidth) {
      return document.documentElement.clientWidth;
    } else if (document.body) {
      return document.body.clientWidth;
    }
    return 630;
  },

  /**
   * Get the height of the browser client area.
   *
   * @author Joshua Gross
   * @return Document Height
   **/
  height: function() {
    if (self.innerWidth) {
      return self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientWidth) {
      return document.documentElement.clientHeight;
    } else if (document.body) {
      return document.body.clientHeight;
    }
    return 470;
  }
};
