function hide_id(nodeId)
{
    var node = document.getElementById(nodeId);
    if (node)
    {
        node.className=node.className.replace('showed', '');
        node.className += ' hidden';
    }
}

function show_id(nodeId)
{
    var node = document.getElementById(nodeId);
    if (node)
    {
        node.className=node.className.replace('hidden', '');
        node.className += ' showed';
    }
}

function toggle_id(nodeId)
{
    var node = document.getElementById(nodeId);
    if (node)
    {
        if (node.className.indexOf('hidden') != -1)
            node.className=node.className.replace('hidden', 'showed')
        else if (node.className.indexOf('showed') != -1)
            node.className=node.className.replace('showed', 'hidden')
        else node.className += ' showed';
     }
}

function setPrintCSS(isPrint) {
// By Akella cssing.org.ua
  if (document.getElementsByTagName)
      x = document.getElementsByTagName('link');
  else
  {
      return;
  }
  for (var i=0;i<x.length;i++) {
      if(x[i].title == 'printview'){x[i].disabled = !isPrint;}
      if(x[i].title == 'screenview'){x[i].disabled = isPrint;}
  }
}

/* *********************************
        ON LOAD
********************************* */
window.onload = function(){
  if(document.getElementById('searchField')){
   document.getElementById('searchField').onblur=function(){if(this.value!=''){this.style.backgroundPosition='0 -30px';} else {this.style.backgroundPosition='0 0';}};
   document.getElementById('searchField').onfocus=function(){this.style.backgroundPosition='0 -30px';};
};
}