function enAb(theObject) {
theObject.disabled = false;
if (theObject.nodeName == 'INPUT' && theObject.type == 'text' || theObject.nodeName == 'SELECT') theObject.style.backgroundColor = '#fff';
}

function disAb(theObject) {
theObject.disabled = true;
if (theObject.nodeName == 'INPUT' && theObject.type == 'text' || theObject.nodeName == 'SELECT') theObject.style.backgroundColor = '#ddd';
}

function itemIndex(r) {
for (var i = 0; i < r.length; i++) { if (r[i].checked == true) {return i} }
return -1;
}

function reqEnAb(obj) {
  if (obj) obj.className = 'required';
}

function reqDisAb(obj) {
  if (obj) obj.className = null;
}
 
function rotateNews() {
  var obj = T_gobj('titulni_novinky');
  if (obj) {
    var el = null;
    var items = new Array();
    for (var i = 0; i <= obj.childNodes.length; i++) {
      el = obj.childNodes[i];
      if (el && el.nodeName.toLowerCase() == 'li') items[items.length] = i;
    }

    if (items.length < 3) return;
    var i = 1;
    while (i < items.length) {
      el = obj.childNodes[items[i]];
      if (el.style.display != 'none') {
        el.style.display = 'none';
        i++;
        if (i == items.length) i = 1;
        obj.childNodes[items[i]].style.display = 'inline';
        break;
      }
      i++;
    }
  }
}

function headline(x) { setInterval("rotateNews()",x) }
