﻿///////////////////////////////////////////////////////////////////////////
//Javascript functions that are used only on the home page, default.aspx
///////////////////////////////////////////////////////////////////////////

//Change background color of selected rows when mouse passes over table
function MakeGray1()
{
  //previousColor = window.event.srcElement.style.color;
  //window.event.srcElement.style.backgroundColor = "#f5f5f5";
  var ThisObject = document.getElementById('tblTutorial');
  var numcells=1;
  
  for (i=1; i<ThisObject.rows.length; i++)
  {          
    numcells= ThisObject.rows(i).cells.length;
   
    for (j=0; j<ThisObject.rows(i).cells.length; j++)
    {
        ThisObject.rows(i).cells(j).bgColor="#f5f5f5";
    }           
  } 
}

//Change background color of selected rows when mouse passes over table
function MakeGray2()
{
  //previousColor = window.event.srcElement.style.color;
  //window.event.srcElement.style.backgroundColor = "#f5f5f5";
  var ThisObject = document.getElementById('tblCalc');
  var numcells=1;
  
  for (i=1; i< ThisObject.rows.length; i++)
  {          
    numcells= ThisObject.rows(i).cells.length;
    
    for (j=0; j< ThisObject.rows(i).cells.length; j++)
    {
        ThisObject.rows(i).cells(j).bgColor="#f5f5f5";
    }           
  }
}

//Change background color of selected rows when mouse passes over table
function MakeGray3()
{
  //previousColor = window.event.srcElement.style.color;
  //window.event.srcElement.style.backgroundColor = "#f5f5f5";
  var ThisObject = document.getElementById('tblCase');
  var numcells=1;
   
  for (i=1; i< ThisObject.rows.length; i++)
  {          
    numcells= ThisObject.rows(i).cells.length;
   
    for (j=0; j< ThisObject.rows(i).cells.length; j++)
    {
        ThisObject.rows(i).cells(j).bgColor="#f5f5f5";
    }           
  }
}

//Restore text color when mouse moves away
function RestoreColor1()
{
  var ThisObject = document.getElementById('tblTutorial');
  var numcells=1;
  
  for (i=1; i< ThisObject.rows.length; i++)
  {          
    numcells= ThisObject.rows(i).cells.length;           
    for (j=0; j< ThisObject.rows(i).cells.length; j++)
    {
        ThisObject.rows(i).cells(j).bgColor="#ffffff";
    }           
  }
}	

 //Restore text color when mouse moves away
function RestoreColor2()
{
  var ThisObject = document.getElementById('tblCalc');
  var numcells=1;
  
  for (i=1; i< ThisObject.rows.length; i++)
  {          
    numcells= ThisObject.rows(i).cells.length;           
    for (j=0; j< ThisObject.rows(i).cells.length; j++)
    {
        ThisObject.rows(i).cells(j).bgColor="#ffffff";
    }           
  }
}	

 //Restore text color when mouse moves away
function RestoreColor3()
{
  var ThisObject = document.getElementById('tblCase');
  var numcells=1;
  
  for (i=1; i< ThisObject.rows.length; i++)
  {          
    numcells= ThisObject.rows(i).cells.length;           
    for (j=0; j< ThisObject.rows(i).cells.length; j++)
    {
        ThisObject.rows(i).cells(j).bgColor="#ffffff";
    }           
  }
}
