var image = new Image();

function Go(a, imgfile, img_height)
{
 if (a < 2)
  document.getElementById('loadimg').innerHTML = '<strong>Загрузка...</strong>';
 image.src = imgfile;
 if (a == 1)
 {
  document.getElementById('vertical_slide').innerHTML="<img src='"+imgfile+"' />";
  document.getElementById('vertical_slide').style.height = img_height+'px';
  //document.getElementById('vertical_slide').style.width = img_width+'px';
  document.getElementById('loadimg').innerHTML = '';
 }
 if (a == 2)
  return;
 t = 0;
 var myVerticalSlide = new Fx.Slide('vertical_slide');
 myVerticalSlide.toggle();
 myVerticalSlide.addEvent('complete', function() {
  if (t == 0)
  {

   window.setTimeout("Go("+(a+1)+",'"+imgfile+"',"+img_height+");", 1000);
   t = 1;
  }
 });
}

function ShowAll()
{
 for (i = 0; i <= totallines_portfolios_from_acat; i++)
  document.getElementById('portf_line_'+i).style.display = 'block';
 document.getElementById('portf_all').innerHTML = '<span>Все</span> |';
 document.getElementById('portf_8').innerHTML = ' <a href="#topothers" OnClick="Show8();">8</a> |';
 document.getElementById('portf_16').innerHTML = ' <a href="#topothers" OnClick="Show16();">16</a> | ';
 document.getElementById('portf_32').innerHTML = ' <a href="#topothers" OnClick="Show32();">32</a> |';
}
/*
function Show8()
{
 for (i = 0; i <= totallines_portfolios_from_acat; i++)
  document.getElementById('portf_line_'+i).style.display = 'block';
 for (i = 0; i <= totallines_portfolios_from_acat; i++)
  if (i > 1)
   document.getElementById('portf_line_'+i).style.display = 'none';
 document.getElementById('portf_all').innerHTML = ' <a href="#topothers" OnClick="ShowAll();">Все</a> |';
 document.getElementById('portf_8').innerHTML = ' <span>8</span> | ';
 document.getElementById('portf_16').innerHTML = ' <a href="#topothers" OnClick="Show16();">16</a> |';
 document.getElementById('portf_32').innerHTML = ' <a href="#topothers" OnClick="Show32();">32</a> |';
}

function Show16()
{
 for (i = 0; i <= totallines_portfolios_from_acat; i++)
  document.getElementById('portf_line_'+i).style.display = 'block';
 for (i = 0; i <= totallines_portfolios_from_acat; i++)
  if (i > 3)
   document.getElementById('portf_line_'+i).style.display = 'none';
 document.getElementById('portf_all').innerHTML = ' <a href="#topothers" OnClick="ShowAll();">Все</a> |';
 document.getElementById('portf_8').innerHTML = ' <a href="#topothers" OnClick="Show8();">8</a> |';
 document.getElementById('portf_16').innerHTML = ' <span>16</span> | ';
 document.getElementById('portf_32').innerHTML = ' <a href="#topothers" OnClick="Show32();">32</a> |';
}

function Show32()
{
 for (i = 0; i <= totallines_portfolios_from_acat; i++)
  document.getElementById('portf_line_'+i).style.display = 'block';
 for (i = 0; i <= totallines_portfolios_from_acat; i++)
  if (i > 7)
   document.getElementById('portf_line_'+i).style.display = 'none';
 document.getElementById('portf_all').innerHTML = ' <a href="#topothers" OnClick="ShowAll();">Все</a> |';
 document.getElementById('portf_8').innerHTML = ' <a href="#topothers" OnClick="Show8();">8</a> |';
 document.getElementById('portf_16').innerHTML = ' <a href="#topothers" OnClick="Show16();">16</a> |';
 document.getElementById('portf_32').innerHTML = ' <span>32</span> |';
}*/