var currentRows = new Array();

/**
 * This public function handles the DataGridX mouse over.
 */
function dataGridXOnMouseOver(row, dataGridId) {
  try {
    row.style.cursor = "pointer";
  } catch (e) {
    row.style.cursor = "hand";
  }
  if (currentRows[dataGridId] != row) {
    row.className = row.className + 'Over';
  }
}
/**
 * This public function handles the DataGridX mouse out.
 */
function dataGridXOnMouseOut(row, dataGridId) {
  if (currentRows[dataGridId] != row) {
    var pos = row.className.indexOf('Over');
    if (pos > 0)
      row.className = row.className.substring(0, pos);
  }
}
/**
 * This public function handles the DataGridX button mouse over.
 */
function dataGridXButtonOnMouseOver(button) {
  try {
    button.style.cursor = "pointer";
  } catch (e) {
    button.style.cursor = "hand";
  }
}
/**
 * This public function handles the DataGridX mouse click.
 */
function dataGridXOnMouseClick(row, index, dataGridId) {
  var hdnIndex = document.getElementById('hdnIndex' + dataGridId);
  if (hdnIndex != null) {
    hdnIndex.value = index;
  }
  if (currentRows[dataGridId] != row) {
    if (currentRows[dataGridId] != null) {
      var tempRow = currentRows[dataGridId];
      var pos = tempRow.className.indexOf('OverClick');
      if (pos > 0) {
        tempRow.className = tempRow.className.substring(0, pos);
      }
    }
    currentRows[dataGridId] = row;
    row.className = row.className + 'Click';
  }
}