var isNet = false;
var linkOrg = -1;
var nsLinks;
var v6;
var enums = 0;
var urls = new Array();
var descs = new Array();
var isLoaded = false;

function moveSee()
{
   if (!isLoaded)
     return;

    if (navigator.appName != "Microsoft Internet Explorer")
      return;

   var y = document.body.clientHeight - 250;

   var linkWindow = document.all('linkFrame');
   if (v6 && linkOrg == -1)
   {
     var higt = linkWindow.document.body.scrollHeight + 20; //Allow v-scrollbar
     linkWindow = document.all('linkFrame');   //Decrease link view hight if mother too small
     if (higt < 400)
       linkWindow.style.posHeight = higt;

     if (linkOrg == -1)
     {
//        linkOrg = linkWindow.style.posHeight;
        linkOrg = higt;
     }
   }

   linkWindow = document.all('linkFrame');   //Decrease link view hight if mother too small
//   if (linkWindow.style.posHeight > y)
   if (document.all('linkFrame').document.body.scrollHeight > y)
   {
     if (y < 150)
       y = 150;

     if (document.all('linkFrame').document.body.scrollHeight > y && y <= 400)
       linkWindow.style.posHeight = y;
   } else if (y < 200 && linkOrg > y)
       linkWindow.style.posHeight = y;

  ir = document.body.scrollTop + document.body.offsetHeight - document.all.linkTable.clientHeight - 2;
  if (document.all.linkTable.clientHeight == 0)
    ir = ir - linkWindow.style.posHeight - 26;

  document.all.linkTable.style.top = ir - 15;
  is = 0;
  it = document.all.mainItem.clientHeight + document.all.mainHead.clientHeight;
  if (isNet) //Only NET
    it = it + 5;

  if (document.body.offsetHeight > it + 4)
  {
    is = document.body.offsetHeight - it - 4;
    document.all.linkTable.style.top = ir - is;
  }

  if (isNet) //Only NET
    if (document.body.scrollTop + document.body.offsetHeight > document.body.scrollHeight - 89 && it > document.body.offsetHeight)
    {
      document.all.linkTable.style.top = document.body.scrollHeight - document.all.linkTable.clientHeight - 89 - is;
    }
}

function openIt()
{
  nsLinks = null;
  if (navigator.appName == "Microsoft Internet Explorer")
  {
     v6 = (navigator.appVersion.indexOf("MSIE 6") > 0);
     if (document.all('val'))
       isNet = true;

     var linkWindow = document.all('linkFrame');
     if (!v6)
     {
       var higt = linkWindow.document.body.scrollHeight + 20; //Allow v-scrollbar
       linkWindow = document.all('linkFrame')
       if (higt < 400)
        linkWindow.style.posHeight = higt;

       linkOrg = linkWindow.style.posHeight;
     }

     document.all.linkTable.style.display = '';
     isLoaded = true;
     moveSee();
  }
}

