// JavaScript Document

var AlternatingTable = Class.create();
AlternatingTable.prototype = {
	
	initialize: function( tab , cla ){
		
		this.table = $(tab);
		this.classname = cla;
		this.makeStripes();
	
	},
	
	makeStripes: function() {
		
		var rows = this.table.getElementsByTagName('tr');
		var len = rows.length;
		for( var i = 0;  i < len; i++ )
		{
			if( i % 2 == 0 )
			{
				var elem = rows[i];
				Element.extend( elem );
				elem.addClassName( this.classname );
			}
		}
	}

}