// JavaScript Document
//xiashanet.com
//格式化表格
//2008 7 20
//Create by BBN 
//qipbbn@gmail.com
//version 1.01
//based on Prototype 1.6
var Xtable = Class.create({
						  initialize:function(tablecontainer){
							  
							  this._container =  $(tablecontainer);
							  this._tables =this._container.select("table");
							  this.styleTables()},
						  styleTables:function(){
							  for(var i= 0 ; i< this._tables.length; i++){
								this.styleTable(this._tables[i]);  
							  }},
						  styleTable:function(table){
							  var trs = table.select("tbody")[0].select("tr");
							  var on=true;
							  trs.each(function(tr){if(on){tr.addClassName("on");on = false;}else{tr.addClassName("off");on=true}})},
						   reStyle:function(){
							   this._tables = this._container.select("table");
							   this.styleTables()}
	             });
