﻿/// <reference name="MicrosoftAjax.js"/>

function GridView_OnMouseOver(row) {
    row.className += " hover";
}
function GridView_OnMouseOut(row) {
    row.className = row.className.replace(" hover", "");
}

function GridView_OnClick(row) {
    var clearHighLigh = false;

    if (row.className.indexOf("highLight") > 0) clearHighLigh = true;
    
    var tbody = row.parentNode;
    var grid = tbody.parentNode;

    GridView_ClearSelectedRow(tbody);

    if (clearHighLigh) return;
    
    row.className += " highLight";
}

function GridView_ClearSelectedRow(tbody) {
    for (var rowIndex = 0; rowIndex < tbody.rows.length; rowIndex++) {
        var row = tbody.rows[rowIndex];

        row.className = row.className.replace(" highLight", "");
    }
}
