  // this function is need to work around 
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  }   

 function stripe() {

  
    var tables = document.getElementsByTagName("table");
	for (var j = 0; j < tables.length ; j++)
	{
		classname = hasClass(tables[j]);
		if (classname && classname == "zebra")
		{
			// element, so we'll have to get the list of child
			// &lt;tbody&gt;s 
		    var even = false;

			var trs = tables[j].getElementsByTagName("tr");

			for (var i = 0; i < trs.length ; i++)
			{
				if (!hasClass(trs[i]))
				{
					trs[i].className = even ? "even" : "odd";
				}
				even = ! even;
			}
		}
	}
    
  }