// News Tab Box II - © 2010 Artio (http://www.artio.pl/)
// Author LC
function tabMouseOver(control, isHuman) {
  for (var i = 0; i < rotateTabs.length; ++i) {
  var tmp = document.getElementById(rotateTabs[i]);
    var content = document.getElementById(rotateTabs[i] + 'Content');
    if (control == tmp) {
    if (isHuman) tabHasMouse = true;
        tmp.className = "current";
        content.style.display = "block";
} else {
  tmp.className = "inactive";
  content.style.display = "none";
       }
  }
}
function tabMouseOut() {
tabHasMouse = false;
}

// Rotate To Next Tab II - © 2010 Artio (http://www.artio.pl/)
// Author LC
var rotateTabs = new Array('tab0', 'tab1', 'tab2', 'tab3');
var tabHasMouse = false;
  function RotateToNextTab() {
  var activeIndex = -1;
  for (var i = 0; i < rotateTabs.length && activeIndex == -1; ++i)
  if (document.getElementById(rotateTabs[i]).className == 'current')
      activeIndex = i;
  var nextIndex = (activeIndex + 1) % rotateTabs.length;
      tabMouseOver(document.getElementById(rotateTabs[nextIndex]), false);
      }
function PerformRotate(isFirstTime) {
  if (!isFirstTime && !tabHasMouse)
      RotateToNextTab();
      setTimeout("PerformRotate(false)", 5000); // 10000ms = 10s
}

// toggle
var state = 'none';

function showhide(layer_ref) {

if (state == 'block') {
state = 'none';
}
else {
state = 'block';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].display = state;
}
if (document.getElementById && !document.all) {
maxwell_smart = document.getElementById(layer_ref);
maxwell_smart.style.display = state;
}
}
