function tabShow(obj)
{
  if(obj==undefined)
    return; // if no accordion on this page
  var li = $(obj).up('li');
  li.addClassName('active');
  $(obj).down('img').hide();
  var img = li.down('img');
  for(var i=1; img!=undefined; i++)
  {
    if(img.alt)
      img.src = 'ajax/minithumb.php?id=' + img.alt;
    img = li.down('img', i);
  }
}
function tabHide(obj)
{
  if(obj==undefined)
    return; // if no accordion on this page
  $(obj).up('li').removeClassName('active');
  $(obj).down('img').show();
}
function initTabs()
{
  $$('.model a').each(function(obj)
  {
    obj.onclick = function(){return false};
  });
  $$('.refs ul').each(function(obj)
  {
    obj.show();
  });
  var accordionClicks = document.getElementsByClassName('model');
  var accordionContents = document.getElementsByClassName('refs');
  var accordion = new fx.Accordion(accordionClicks, accordionContents, {onActive: tabShow, onBackground: tabHide});
}
//Detect IE5.5+
version=0
if(navigator.appVersion.indexOf("MSIE")!=-1)
{
  temp=navigator.appVersion.split("MSIE")
  version=parseFloat(temp[1])
}
//if((version<4)||(version>=7))
Event.observe(window, 'load', initTabs);
if(version==6)
  Event.observe(window, 'load', function(){
    window.setInterval('repos()', 500);
});
function repos()
{
  $('mainfooter').style.bottom = '1px';
  $('mainfooter').style.bottom = '0';
}