opera = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;
dom = (document.getElementById)? true : false;

ie4 = (document.all && !dom)? true : false;
nn4 = (document.layers)? true : false;

plus = new Image();
plus.src = "../images/plus.gif"

minus = new Image();
minus.src = "../images/minus.gif"

function ow(link, tooltip, bSize, bResize, bFullScreen, 
             w, h, bPos, bCenter, bMiddle, x, y, wndname, 
             bScroll, bMenu, bPrint,
             NodeId, NodeType, Ext) 
{
 if (bCenter) x = (screen.width-w)/2;
 if (bMiddle) y = (screen.height-h)/2;

 var rsz = eval("'width=" + w + ", height=" + h + ", top=" + y + ", left=" + x + "'");

 if (NodeType == 11)
 {
  if (!tooltip) tooltip="Ôîòî";
  var img = "<img src='../Graphics/" + NodeId + "." + Ext + "' width='" + w + "' height='" + h + "' alt=''>";
  var title = "<html><head><title>" +tooltip+ "</title></head><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><p align=center>" + img + "</p></body></html>";

  if (opera)
  {
   window.open("../Graphics/" + NodeId + "." + Ext, "", rsz);
  }
  else
  {
   var nw = window.open("about:blank", "", rsz);
   nw.document.write(title);
   nw.focus();
  }
 }
 else
 {
  link += "&w=1";
  var nw = window.open(link, "", rsz);
 }
}

function OpenImage(index, w, h, name, t, l) 
{
if (!t) t = (screen.height-h)/2;
if (!l) l = (screen.width-w)/2;
var rsz = eval("'width=" + w + ", height=" + h + ", top=" + t + ", left=" + l + "'");

var img = "<img src='../Graphics/" + index + "' width='" + w + "' height='" + h + "' alt=''>";
var title = "<html><head><title>Ôîòî</title></head><body topmargin=0 leftmargin=0><p align=center>" + img + "</p></body></html>";
var nw = window.open("about:blank", "", rsz);
nw.document.write(title);
nw.focus();
}

function sw(id)
{
 tab = document.all['t'+id];
 img = document.all['i'+id];

 if (tab)
 {
  if (tab.style.display == "none")
  {
   tab.style.display = "block";
   img.src = minus.src;
  }
  else
  {
   tab.style.display = "none";
   img.src = plus.src;
  }
 }
}
;
