IE6 = navigator.userAgent.search("MSIE 6") > -1 ? true : false;

function attachMenuDrop() {
  if (IE6 == true) $('li.has-sub').hover(function() {menuDrop(this,1)}, function() {menuDrop(this)});
}

function menuDrop(li,v) {
  if (v==1) {
    li.className += ' hov';
  } else {
    li.className = li.className.replace(/\b ?hov\b/, '');
  }
}

function showTab(t) {
  var id = t.id.replace(/tab(.*)/, "$1");
  for(var i=0; i < 10; i++){
    var th = document.getElementById('tab'+i);
    if (th && i != id) {
      document.getElementById('tabcont'+i).style.display = 'none';
      th.className = '';
    }
  }
  document.getElementById('tab' + id).className = 'cur';
  document.getElementById('tabcont' + id).style.display = 'block';
}

function togglePlusMinus(t) {
  var label = document.getElementById(t + 'label');
  var action = label.className;
  if (action == 'minusplus') {
    document.getElementById(t+'cont').style.display = 'none';
    label.className = 'plusminus';
  } else {
    document.getElementById(t+'cont').style.display = '';
    label.className = 'minusplus';
  }
}

function doEq2Items() {
  var inArray = document.getElementsByTagName('a');
  for(var i=0; i < inArray.length; i++){
    if (inArray[i].className.match(/eq2hover/) && inArray[i].href.match(/eq2item\=/)) {
      var ia = inArray[i];
      ia.onmousemove = showTmp;
      ia.onmouseout = clearTmp;
      ia.onmouseover = eq2ShowIf;
    }
  }
}

function eq2ShowIf() {
  var href = this.toString();
  var id = href.match(/eq2item\=(\d+)/);
  if (id[1]) {
    clearTmp();
    Ajakz.target = 'tmpItemFrm';
    Ajakz.onload = Ajakz.loadTarget;
    Ajakz.Run('/cluster/eq2item.pl?ajax=1;eq2item=' + id[1]);
    showTmp();
  }
}
//addEvent(window,'load',doEq2Items);
