﻿// JScript File

function TableRowColorHoverInit(){
    var elem = "tr";
    var el = document.getElementsByTagName(elem);
    for(var i=0; i<el.length; i++){
        if(el[i].childNodes[0]) {
            if(el[i].childNodes[0].tagName != "th" && el[i].parentNode.parentNode.className.indexOf("TableStyle") != -1){
                if (el[i].className=="") {
                    if(i%2 == 1){
                        el[i].className = "on";
                        el[i].onmouseout  = function(){this.className = "on";}                    
                    } else {
                        el[i].className = "off";
                        el[i].onmouseout  = function(){this.className = "off";}
                    }                
                    el[i].onmouseover = function(){this.className = "hover";}
                }
            }
        }
    }//end of for loop    
}// end of function

function DataGridRowColorHoverInit(){

  var elem = "TR";
  if(document.getElementsByTagName){
   var el = document.getElementsByTagName(elem);
    for(var i=3; i<el.length; i++){
        if (el[i].childNodes[0]){
      if(el[i].childNodes[0].tagName != "TH"
      && el[i].parentNode.parentNode.className.indexOf("DataGridStyle") != -1){
     if(i%2 == 1){
      el[i].className = "on";
      el[i].onmouseout  = function(){
	     this.className = "on";
      }
    } else {
      el[i].className = "off";
      el[i].onmouseout  = function(){
	     this.className = "off";
      }
    }
      el[i].onmouseover = function(){
	     this.className = "hover";
      }
      }
   }
  }
 }
}
