var Vard = '';

function Rodyti()
{
   if (Vard != '')
     { document.getElementById(Vard).innerHTML = window.frames['Temp'].document.body.innerHTML; }
}

function Keisti(Vardas)
{

  var obj  = document.getElementById(Vardas); 
  var obj2 = document.getElementById(Vardas.substring(3));


  if (obj.style.display == 'none') 
    { 

     if (Vardas.indexOf('SubGI_') == 0)
       {  Vard = 'sp'+Vardas;
          if (Vardas.indexOf('psi') > 0) {  Vardas = Vardas.substring(0, Vardas.indexOf('psi'));  }
          document.getElementById('Temp').src = Kelias + Vardas + '.html';
       }

      obj.style.display = ''; 
      obj2.style.fontWeight = 'bold';
    } 
  else 
    { obj.style.display = 'none'; 
      obj2.style.fontWeight = 'normal';
    } 
}

function Pele()
{
  if (document.body.style.cursor == 'pointer')  
    { document.body.style.cursor = 'auto';  }
  else
    { document.body.style.cursor = 'pointer';  }
}

function Atversti()
{
  var param = unescape(document.location.search).substring(1);

  if (param.length != 0) {
    
    var obj = document.getElementById(param);
    var obj2 = document.getElementById(param+'_X');
    var kiti = obj2.innerHTML.split(';')

    Keisti(param);
    Keisti(kiti[1]);
    Keisti(kiti[0]);
  }
}

