<!--
var detect=navigator.userAgent.toLowerCase();
isie=false;isns=false;isop=false;isw3c=false;
if (checkIt ('opera'))
  isop=true;
else if (checkIt ('msie'))
  isie=true;
else if (document.getElementById)
  isw3c=true;
else if (!checkIt ('compatible'))
  isns=true;

function checkIt (string)
{
return detect.indexOf (string)+1;
}

function AddBookmark ()
{
window.external.addFavorite ("http://10.100.105.85/petrol/", "Petrol Plus: on-line сервис клиентских отчетов");
}

function getObj (name)
{
return document.getElementById(name);
}

function menuOn (name, subname)
{
obj=getObj (name);
if (!isns)
  {
   obj.style.background='#aCc0dF';

   obj=getObj (name+'sub');
   if (obj)
     obj.style.visibility='visible';

   if (subname!=0)
     {
      obj=getObj (subname);
      if (obj)
        obj.style.background='#aCc0dF';
     }
  }

return true;
}

function menuOff (name, subname)
{
obj=getObj (name);
if (!isns)
  {
   obj.style.background='#ECECEC';

   obj=getObj (name+'sub');
   if (obj)
     obj.style.visibility='hidden';

   if (subname!=0)
     {
      obj=getObj (subname);
      if (obj)
        obj.style.background='#ECECEC';
     }
  }

return true;
}

function ViewImage(ifile, ix, iy, ititle)
{ 
 var win;
 var sWidth;
 var sHeight;
 var NS=(document.layers) ? 1:0;

 win=window.open ("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no,scrollbars=yes,resizable=yes,screenX=10,screenY=0");
 win.document.open  ();
 win.document.write ("<html><head>");
 win.document.write ('<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">');
 win.document.write ("<title>"+ititle+"</title>");
 win.document.write ("</head><body>");
 win.document.write ('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
 win.document.write ("<img src="+ifile+"></div></body></html>");
 win.document.close ();
}

function ShrinkBoardHeader(elem)
{
var state;

state=document.getElementById(elem).style.display;
if (state=="none")
  {
   document.getElementById(elem+"_img").src="images/new/minus.gif";
   document.getElementById(elem).style.display="";
  }
else
  {
   document.getElementById(elem+"_img").src="images/new/plus.gif";
   document.getElementById(elem).style.display="none";
  }
}

//-->
