function set_active(clicked, obj)
{
    var tab1 = document.getElementById('spec');
    var tab2 = document.getElementById('docs');
    var tab3 = document.getElementById('related');
    var tab4 = document.getElementById('accessories');

    tab1.style.display = 'none';
    tab2.style.display = 'none';
    tab3.style.display = 'none';
    tab4.style.display = 'none';

    var active = document.getElementById(obj);
    active.style.display = 'block';

    var tabs = document.getElementById("tabs");   
    tabs = tabs.getElementsByTagName("a");
    for (var i = 0; i < tabs.length; i++) tabs[i].className = 'tab';

    clicked.className = 'tab active';
}

function window_open(url, width, height)
{
  var windowWidth, windowHeight;

  if (self.innerHeight)
  {
      windowWidth = self.innerWidth;
      windowHeight = self.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientHeight)
  {
      windowWidth = document.documentElement.clientWidth;
      windowHeight = document.documentElement.clientHeight;
  }
  else if (document.body)
  {
      windowWidth = document.body.clientWidth;
      windowHeight = document.body.clientHeight;
  }

  xpos = (windowWidth - width) / 2;
  ypos = (windowHeight - height) / 2;

  options = "width=" + width + ",height=" + height + ",left=" + xpos + ",top=" + ypos + ",statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes";
  window.open(url, '', options);
}

function reset_all()
{
  document.getElementById('brand_all').checked = false;
}

function brands_change_all(all)
{
    frm = document.forms[2].elements;
    for (var i = 0; i < frm.length; i++)
    {
        if (all.checked == true)
           frm[i].checked = true;
        else
           frm[i].checked = false;
    }
}
