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);

  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()

if (is.ns4)
{
  doc = "document";
  sty = "";
  htm = ".document"
}
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";
}
//alert(screen.width);
//alert(viewSize);

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();
};

