/*
   Označevanje trenutne vrstice
*/

function setCellStyle(pArray, theAction)
{
  var nCount = pArray.length;
  for (c = 0; c < nCount; c++)
  {
    if (theAction == 'over')
    {
      pArray[c].className  = pArray[c].className + 'Over';
    }
    else
      if (theAction == 'out')
      {
        var str = pArray[c].className;
        var pos = str.indexOf("Over");
        if (pos>=0)
        {
          var nLength = str.length;
          str = str.substr(0, nLength - 4);
          pArray[c].className  = str;
        }
      }
  }
}

function selectRow(theRow, theAction)
{
  var theCells = null;
  var theHead = null;

  if (typeof(document.getElementsByTagName) != 'undefined')
  {
      theCells = theRow.getElementsByTagName('td');
      theHead = theRow.getElementsByTagName('th');
  }
  else
    if (typeof(theRow.cells) != 'undefined')
    {
      theCells = theRow.cells;
    }
    else
    {
      return false;
    }

  setCellStyle(theHead, theAction);
  setCellStyle(theCells, theAction);

  return true;
}


/*
  Potrjevanje brisanja trenutne vrstice
*/
function confirmLink(pLink, sMessage, sParam)
{
  var bConfirmed = confirm(sMessage);
  if (bConfirmed)
  {
    pLink.href += sParam;
  }
  return bConfirmed;
}