// utilities.js
var browser = navigator.appName;
var version = parseInt(navigator.appVersion);
var NS4 = ("Netscape" == browser && version >= 4);
var IE4 = ("Microsoft Internet Explorer" == browser && version >= 4);

function colorHi (id,color)
{
  if (!color) { color = '#00FF00' };
  if (NS4)
  {
    eval ('window.document.' + id + '.bgColor = \'' + color + '\'');          
  }
  else if (IE4)
  { 
    eval (id + '.style.background = \'' + color + '\'');
  } 
}

function colorLo (id)
{
  if (NS4)
  {
    eval('window.document.' + id + '.bgColor = null');
  }
  else if (IE4)
  {
    eval(id + '.style.background = \'\'');
  }
}

function out (id)
{
  eval('document.im' + id + '.src="Images/' + id + '.gif"');
}

function over (id,desc)
{
  eval('document.im' + id + '.src="Images/' + id + '-over.gif"');
}

function navsetx (link,dir,desc)
{
  str = "<TR><TD><a href=\"" + link + ".html\"  ";
  str += "ONMOUSEOVER=\"over('" + dir + "','')\" ";
  str += "ONMOUSEOUT=\"out('" + dir + "')\">";
  str += "<IMG SRC=\"Images/" + dir + ".gif\" NAME=\"im" + dir;
  str += "\" BORDER=0 width=29 height=15></a></TD>";
  str += "<TD><a href=\"" + link + ".html\"  ";
  str += "ONMOUSEOVER=\"over('" + dir + "','')\" ";
  str += "ONMOUSEOUT=\"out('" + dir + "')\">";
  str += desc + "</a></TD></TR>";
  document.writeln(str);
}

function windowh (image,desc,y_size)
{
  if (isNaN(y_size))
  {
    y_size = 517
  }
  y_size = y_size + 24
  msgWindow=window.open("","pic","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=750,height="+y_size);
  msgWindow.moveTo(10,0)
  msgWindow.document.write
    ("<HEAD><TITLE>"+desc+"</TITLE></HEAD><BODY BGCOLOR=#ffffff TOPMARGIN=0 LEFTMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0>")
  msgWindow.document.write
    ("<CENTER><IMG SRC="+image+">")
  msgWindow.document.write('<BR><A HREF="" STYLE="color:#009933;font-family:Arial;font-size:16pt;font-style:italic;text-decoration:none;background-color:#ccc" onClick="self.close()">Close window </A>')
  msgWindow.document.write('</CENTER></BODY>')
}

function windowv (image,desc,x_size,y_size)
{
  if (isNaN(x_size))
  {
    x_size = 420
  }
  if (isNaN(y_size))
  {
    y_size = 517
  }
  y_size = y_size + 24
  msgWindow=window.open("","pic","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+x_size+",height="+y_size);
  msgWindow.moveTo(50,0)
  msgWindow.document.write
    ("<HEAD><TITLE>"+desc+"</TITLE></HEAD><BODY BGCOLOR=#ffffff TOPMARGIN=0 LEFTMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0>")
  msgWindow.document.write
    ("<CENTER><IMG SRC="+image+">")
  msgWindow.document.write('<BR><A HREF="" STYLE="color:#009933;font-family:Arial;font-size:16pt;font-style:italic;text-decoration:none;background-color:#ccc" onClick="self.close()">Close window </A>')
  msgWindow.document.write('</CENTER></BODY>')
}

function windowa (image,desc,x_size,y_size,map)
{
  if (isNaN(y_size))
  {
    y_size = 517
  }
  y_size = y_size + 24
  msgWindow=window.open("","pic","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=750,height="+y_size);
  msgWindow.moveTo(10,0)
  msgWindow.document.write("<head><title>"+desc+"</title>")
  msgWindow.document.write('<script type="text/javascript" src="annimg.js"></script><link rel="stylesheet" href="annimg.css">')
  msgWindow.document.write("</head><body bgcolor=#ffffff topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>")
  msgWindow.document.write('<center><a href="'+map+'"><img src="'+image+'" class="annotated" ismap></a>')
  msgWindow.document.write('<br><a href="" style="color:#009933;font-family:Arial;font-size:16pt;font-style:italic;text-decoration:none;background-color:#ccc" onClick="self.close()">Close window </a>')
  msgWindow.document.write('</center></body>')
}
