/**
 * Browser checking
 */
 function BrowserIdentification() {
  this.detectionString = navigator.userAgent.toLowerCase();
  this.operatingSystem;
  this.isSafari = false;
  this.isOmniWeb = false;
  this.isOpera = false;
  this.isWebTV = false;
  this.isIcab = false;
  this.isMSIE = false;
  this.isFirefox = false;
  this.isNetscape = false;
  this.isUnknown = false;
  
  if (this.detectionString.indexOf("safari") + 1) this.isSafari = true;
  else if (this.detectionString.indexOf("omniweb") + 1) this.isOmniWeb = true;
  else if (this.detectionString.indexOf("opera") + 1) this.isOpera = true;
  else if (this.detectionString.indexOf("webtv") + 1) this.isWebTv = true;
  else if (this.detectionString.indexOf("icab") + 1) this.isIcab = true;
  else if (this.detectionString.indexOf("msie") + 1) this.isMSIE = true;
  else if (this.detectionString.indexOf("firefox") + 1) this.isFirefox = true;
  else if (this.detectionString.indexOf("netscape") + 1) this.isNetscape = true;
  else this.isUnknown = true;
  
  if (this.detectionString.indexOf("linux") + 1) this.operatingSystem = "linux";
  else if (this.detectionString.indexOf("x11") + 1) this.operatingSystem = "unix";
  else if (this.detectionString.indexOf("mac") + 1) this.operatingSystem = "mac";
  else if (this.detectionString.indexOf("win") + 1) this.operatingSystem = "windows";
 }
 var browserId = new BrowserIdentification(); 