var agt;
var major;
var minor;
var NS;
var NS2;
var NS3;
var NS4;
var NS4up;
var NS6;
var NS6up;
var gecko;
var IE;
var IE3;
var IE4;
var IE4up;
var IE5;
var IE5up;
var IE5_5;
var IE5_5up;
var IE6;
var IE6up;
var img = new Array();

function ChkBrw() {

  agt=navigator.userAgent.toLowerCase();
  major = parseInt(navigator.appVersion);
  minor = parseFloat(navigator.appVersion);

  NS = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
  NS2 = (NS && (major == 2));
  NS3 = (NS && (major == 3));
  NS4 = (NS && (major == 4));
  NS4up = (NS && (major >= 4));
  NS6 = (NS && (major == 5));
  NS6up = (NS && (major >= 5));
  gecko = (agt.indexOf('gecko') != -1);
  IE = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
  IE3 = (IE && (major < 4));
  IE4 = (IE && (major == 4) && (agt.indexOf("msie 4")!=-1));
  IE4up = (IE && (major >= 4));
  IE5 = (IE && (major == 4) && (agt.indexOf("msie 5.0")!=-1));
  IE5_5 = (IE && (major == 4) && (agt.indexOf("msie 5.5") !=-1));
  IE5up = (IE && !IE3 && !IE4);
  IE5_5up = (IE && !IE3 && !IE4 && !IE5);
  IE6 = (IE && (major == 4) && (agt.indexOf("msie 6.")!=-1));
  IE6up = (IE && !IE3 && !IE4 && !IE5 && !IE5_5);
  
}

function jump_to() {

  if (IE5 || IE5up || IE5_5 || IE5_5up || IE6up || IE6up || NS6 || NS6up) {
    
    brwlocation = 'westinsp/index.asp'
    window.location = brwlocation
    
    }
    
  else {
  
    brwlocation = 'westinsp/badBrowser.htm'
    window.location = brwlocation;
    
  }
  
 }
 
 
function set_title_story(row_idx) {

  TitleContent = arr[0][row_idx];
  StoryContent = arr[1][row_idx];
  
    if (IE5 || IE5up || IE5_5 || IE5_5up || IE6up || IE6up) {

      TitleTxt.innerHTML = TitleContent;
      StoryTxt.innerHTML = StoryContent;

    }

    else if (NS6 || NS6up) {

      TitleTxt = document.getElementById("TitleTxt")
      TitleTxt.innerHTML = TitleContent;
      StoryTxt = document.getElementById("StoryTxt")
      StoryTxt.innerHTML = StoryContent;
    
    }

    else {
      
      nglocation ='badBrowser.htm'
      window.location=nglocation;

    }

}


function preload_img() {

  for (i = 0; i > img.length; i++) {
    img[i] = newImage();
    img.scr = img[i];

  }

}


function setFocus() {

  if (IE5 || IE5up || IE5_5 || IE5_5up || IE6 || IE6up) {

    document.all.UserID.select();
    document.all.UserID.focus();

  }

  else if (NS6 || NS6up) {

    document.LoginForm.UserID.focus();
//  document.LoginForm.UserID.tabIndex = 1;
//  document.LoginForm.UserPassword.tabIndex = 2;
//  document.LoginForm.LoginButton.tabIndex = 3;

  }

}


function setFocus_pass() {

  if (document.all.OldPassword){

    document.all.OldPassword.select();
    document.all.OldPassword.focus();

  }

}


function MultiDimensionalArray(iRows,iCols) { 

  var i; 
  var j; 
  var a = new Array(iRows);
  for (i=0; i < iRows; i++) {
    a[i] = new Array(iCols);
    for (j=0; j < iCols; j++) {
      a[i][j] = "";
      
    }
    
  }
   return(a);
 }