//GLOBAL VARIABLES

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

//GLOBAL FUNCTIONS

//Pick appropriate style sheet (due to larger IE font sizes)

function getStyleSheet() {
  if ((browserName == "Netscape") && (browserVer <= 4)) {
    document.write("<link rel=\"stylesheet\" href=\"border_files/nsstyles.css\" type=\"text/css\">");
  }
  else { 
    document.write("<link rel=\"stylesheet\" href=\"border_files/styles.css\" type=\"text/css\">");
  }
}

//Fix Netscape 4 bug which loses CSS info with window resize

function fixNetscapeCSS() {
  if (document.debug.fixNetscapeCSS.initWindowWidth != window.innerWidth ||  document.debug.fixNetscapeCSS.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function fixNetscapeCSS_Init() {
  // Set all resize events to be handled by the fixNetscapeCSS() function
  if ((browserName == 'Netscape') && (browserVer == 4)) {
    if (typeof document.debug == 'undefined'){
      document.debug = new Object;
    }
    if (typeof document.debug.scaleFont == 'undefined') {
      document.debug.fixNetscapeCSS = new Object;
      document.debug.fixNetscapeCSS.initWindowWidth = window.innerWidth;
      document.debug.fixNetscapeCSS.initWindowHeight = window.innerHeight;
    }
    window.onresize = fixNetscapeCSS;
  }
}



//INITIALIZATION

getStyleSheet();
fixNetscapeCSS_Init();
//if (top != self) top.location.href = location.href; // Bust out of frames
document.writeln(""); // Netscape's workaround for their resize bug


