function Is() {
  var agent = navigator.userAgent.toLowerCase();
  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);
  this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
  this.ns2 = (this.ns && (this.major == 2));
  this.ns3 = (this.ns && (this.major == 3));
  this.ns4 = (this.ns && (this.major >= 4));
  this.ie   = (agent.indexOf("msie") != -1);
  this.ie3  = (this.ie && (this.major == 2));
  this.ie4  = (this.ie && (this.major >= 4));
  this.ie5  = (this.ie && (this.major == 4) && (agent.indexOf("msie 5") != -1) );
  this.op3 = (agent.indexOf("opera") != -1);

//remove
//alert("Major:" + this.major + ", Minor:" + this.minor);

  if (screen.width < 700) viewSize="3";
  else if (screen.width < 900) viewSize="4";
  else viewSize="6";

  if (this.ns4 || this.ns5)
    nsDHTML = true;
  else if (this.ie4 || this.ie5)
    ieDHTML = true;
};
nsDHTML = false;
ieDHTML = false;
var viewSize;
var is = new Is()

//statusMessage
statusmsg = new Array (
    "Enter Date of Birth, Gender, Health and Tobacco Use Information, then click the 'Go to Step' button.",
    "Select a Coverage Amount, then a Coverage Type, then click the 'Go to Step' button.",
    "Select a Joint Coverage type, then click the 'Go to Step' button.",
    "Choose the number of ranked results appearing on the report, then click the 'Go to Step' button.",
    "Choose the premium payment schedule, then click the 'Proceed to Survey' button",
    "Rank report",
    "Coverage and Premiums survey"
);

function statmsg(msg)
{
  window.status = "";
  window.status = statusmsg[msg];
};


if (nsDHTML)  {
  doc = "document";
  sty = "";
  htm = ".document"
  browserVersionText = "Netscape Navigator " + is.minor;
}
else if (is.ie4)  {
  doc = "document.all";
  sty = ".style";
  htm = ""

  if (screen.width < 700) viewSize="1";
  else if (screen.width < 900) viewSize="2";
  else if (screen.width < 1050) viewSize="3";
  else viewSize="4";
  browserVersionText = "Internet Explorer " + is.minor;
}
if (is.ie5)  {
  doc = "document.all";
  sty = ".style";
  htm = ""

  if (screen.width < 700) viewSize="1";
  else if (screen.width < 900) viewSize="2";
  else if (screen.width < 1050) viewSize="3";
  else viewSize="4";
  browserVersionText = "Internet Explorer 5";
}


function openerWin(url)
{
  window.open(url,'','dependent=yes,toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=400');
};

function closerWin()
{
  window.close();
};

