/*
This file is part of pDAF.
Copyright (c) 2005-2008 by Gregorcic & Helger IT systems OEG.
All rights reserved.
http://www.phloc.com
 */


// constructor
//========================================================
function pDAFGridClass() 
//========================================================
{
}

//========================================================
pDAFGridClass.prototype = 
//========================================================
{
  //------------------------------------------------------
  updateRows : function (sGridID)
  //------------------------------------------------------
  {
    var aGrid = jphloc.ge(sGridID);
    var aRows = jphloc.getChildrenByTagName(aGrid, "div", true);
    var bOdd = true;
    for (var i = 0; i < aRows.length; i++)
    {
      var aRow = aRows[i];
      if (jphloc.hasClass(aRow, "pdaf_grid_body"))
      {
        if (bOdd)
        {
          jphloc.addClass(aRow, "odd");
          jphloc.removeClass(aRow, "even");
        }
        else
        {
          jphloc.addClass(aRow, "even");
          jphloc.removeClass(aRow, "odd");          
        }
        bOdd = !bOdd;
      }
    }    
  }
}

var pDAFGrid = window.pDAFGrid = new pDAFGridClass();