function hasClass(obj) {
   var result = false;
   if (obj.getAttributeNode("class") != null) {
       result = obj.getAttributeNode("class").value;
   }
   return result;
}   
  
function getElementbyClass(classname)
{
   partscollect=new Array()
   var inc=0
   var alltags=document.all? document.all : document.getElementsByTagName("*")
   for (i=0; i<alltags.length; i++) {
     if (alltags[i].className==classname)
       partscollect[inc++]=alltags[i];
   }
}

function  stripeByClass(clase) 
{
    var even = false;
    // if arguments are provided to specify the colours
    // of the even & odd rows, then use the them;
    // otherwise use the following defaults:
    var evenClass = arguments[1] ? arguments[1] : "even_row";
    var oddClass = arguments[2] ? arguments[2] : "odd_row";
  
    // obtain a reference to the desired table
    // if no such table exists, abort

    var tables = document.getElementsByTagName("table");
    for (var t = 0; t < tables.length; t++) {
		
    var table = tables[t];
	
	if (table.className==clase)
	{  
    // by definition, tables can have more than one tbody
    // element, so we'll have to get the list of child
    // &lt;tbody&gt;s 
    var tbodies = table.getElementsByTagName("tbody");

    // and iterate through them...
    for (var h = 0; h < tbodies.length; h++) {
    
     // find all the &lt;tr&gt; elements... 
      var trs = tbodies[h].getElementsByTagName("tr");
      
      // ... and iterate through them
      for (var i = 0; i < trs.length; i++) {

        // avoid rows that have a class attribute
        // or backgroundColor style
        if (! hasClass(trs[i]) && ! trs[i].style.backgroundColor) {
		  trs[i].className= even ? evenClass : oddClass;
        }
        // flip from odd to even, or vice-versa
        even =  ! even;
      }
    }
	}
  }
}
