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 OpenImage(name)
{
 window.open("../Graphics/"+name);
}

function sw(id, p)
{
 tab = document.all['t'+id];
 img = document.all['i'+id];

 if (tab)
 {
//  if (!tab.style)
//      tab = p;

  if (tab.style.display == "none")
  {
   tab.style.display = "block";
   img.src = minus.src;
  }
  else
  {
   tab.style.display = "none";
   img.src = plus.src;
  }
 }
}

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 (!tooltip) tooltip="Ôîòî";
 var img = "<img src='" + link + "' 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(link, "", rsz);
 }
 else
 {
  var nw = window.open("about:blank", "", rsz);
  nw.document.write(title);
  nw.focus();
 }
}

