
function BrowserStats() {
  //var Repository = "C1256B42:005511E1";
  var userAgent = " " + navigator.userAgent.toLowerCase();
  // determine nn/ie, rounded version number and platform
  this.nn = userAgent.indexOf( "mozilla" ) > 0;
  // "compatible" versions of mozilla are not netscape
  if( userAgent.indexOf( "compatible" ) > 0 )
    this.nn = false;
  this.ie = userAgent.indexOf( "msie" ) > 0;
  this.version = navigator.appVersion;
  this.major = parseInt( this.version );
  this.mac = userAgent.indexOf( "mac" ) > 0;
  // ie 5 reports itself as 4
  if( this.ie ) {
    if( userAgent.indexOf( "msie 5" ) > 0 )
      this.major = 5;
  }
  return this;
}

var browser = new BrowserStats();

// font platform resize
var platformCSS;
if( browser.mac && browser.major < 5 ) {
  platformCSS = "http://www.dominosbiz.com/Biz-Public-EN/resources/file/eb3f7844f853c02/bigger.css";
}
if( !browser.mac && browser.ie ) {
  platformCSS = "http://www.dominosbiz.com/Biz-Public-EN/resources/file/eb3f7844f853c02/smaller.css";
}

if( platformCSS ){
  document.write( "<link rel='stylesheet' href='/stylesheetfiles/" + platformCSS + "'type='text/css'>" );
}

// generate random number within range passed in
function generateRandomNumber( argRange ) {
  return 1 + Math.round( Math.random() * ( argRange - 1 ) );
}

// popup window
function popWin( argURL, argWidth, argHeight, argScrollbars ) {
  var options = "";
  // make window scrollable?
  if( argScrollbars == "true" ) options += "scrollbars=yes,";
    else options +="scrollbars=no,";
  options += "width=" + argWidth + ",height=" + argHeight;
    if( window.screen ) {
      var xPos = ( screen.availWidth - argWidth ) / 2;
      var yPos = ( ( screen.availHeight - argHeight ) / 2 ) - 40;
      options += ",left=" + xPos + ",screenX=" + xPos;
      options += ",top=" + yPos + ",screenY=" + yPos;
    }
  window.open( argURL, "popWin", options ).focus();
  return true;
}

function BrowserTest() {
var b = navigator.appName;

if (b=="Netscape") this.b = "ns";
this.version = navigator.appVersion;
this.v = parseInt(this.version);
this.ns5 = (this.b=="ns" && this.v==5);
}