﻿var curColor = null;     
var curRow = null;   

function RowClicked(anchTag)
{
    if (curRow != null) 
    {
        curColor = "Yellow";
        curRow.style.backgroundColor = curColor;
    }        
    window.location = anchTag.href;            
}        

function RowChecked(cb)
{ 
    if (cb != null) 
    {
        cb.checked = !cb.checked;
    }            
}        

function OnMouseOverStyle(row) 
{
    curRow = row;
    curColor = row.style.backgroundColor;
    row.style.backgroundColor = "#ffffcc";
    row.style.cursor = "default";
}

function OnMouseOutStyle(row) 
{            
    curRow = null;
    row.style.backgroundColor = curColor;
    row.style.cursor = "";
}

function selectAll(sel) {
    var theForm = document.forms['aspnetForm'];
    if (!theForm)
        theForm = document.aspnetForm;
    if (theForm.cb != null && theForm.cb.length > 0) {
        for (ct = 0; ct < theForm.cb.length; ct++) {
            if (sel == 1)
                theForm.cb[ct].checked = true;
            else if (sel == 0)
                theForm.cb[ct].checked = !theForm.cb[ct].checked;
            else
                theForm.cb[ct].checked = false;
        }
    }
}    