/**

 *Browser.js

 *@author David Louie www.dlouie.com || www.windmillsf.com

 *@date Oct 2,2002

 *@version 1

 *@note  class properties hold boolean values for various browser and platform stuff

 */

function Browser(){

 this.ie = document.all ? 1 : 0;

 this.ns4 = document.layers ? 1 : 0;

 this.dom = document.getElementById ? 1 : 0;

 this.mac = navigator.platform == "MacPPC";

 this.mo5 = document.getElementById && !document.all ? 1 : 0;

 this.width = 0;

 this.setStyle();

}

/**

 *called from onload event, sets width instance var

 */

Browser.prototype.setWidth = function(){

  this.width = this.ns4 ? window.innerWidth : this.ie ? document.body.clientWidth : window.innerWidth;

} 

/**

 *called from constructor sets a link to the style sheet to link to

 *NOTE: change to str_style to a paramater to further abstract

 */

Browser.prototype.setStyle = function()

{ 

  var str_styles = null;

  if(this.ns4 && this.mac) str_styles = "styles/extMAC.css";

  else if(this.ns4 && !this.mac) str_styles =  "styles/extWIN_NS4.css";

  else str_styles = "styles/extWIN.css";

  document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="' + str_styles + '">');

  //alert(str_styles);

}
