﻿// JScript File

//------------------------ Change row color on deleting ----------------------------//
//declare global variables 
var rowsSelected = 0;  
//change the background color of a row when selected and 
//also count how many rows are selected 
function colorRow(srcElement) {  
    var cb = event.srcElement;  
     var curElement = cb;  
     while (curElement && !(curElement.tagName == "TR")) {  
         curElement = curElement.parentElement;  
     }  
     if (!(curElement == cb) && (cb.name != "cbxSelectAll")) {  
         if (cb.checked) {  
             curElement.style.backgroundColor = "black";  
             rowsSelected = rowsSelected + 1;  
         }  
         else {  
             curElement.style.backgroundColor = "#3C3330";  
             rowsSelected = rowsSelected - 1;  
         }  
     }  
 }  
