 /* 
  There are multiple ways of calling this script, the most common would be in the body onload.
  	onload="stripeTable('tBody1','altrowcoloropt1',true)"  < < The last argument controls wether the script retains pre-set classes.
	Another way:
	window.onload=function(){stripeTable('tBody1','altrowcoloropt1',true)}
 */
 function stripeTable(id,myclass,saveclass){ 
	var o, rows; 
	if ( document.getElementById && (o = document.getElementById(id)) && (rows = o.rows)){ 
		k = rows.length;
		if(arguments[2]){
			//RETAINS ANY PRESET CLASSES ON ROWS
			while(k--){
				if(!rows[k].className)		
					rows[k].className = !(k&1) ? '' : myclass;
			}
		}
		else
		{
		//REWRITES ALL CLASSES
		while(k--)
			rows[k].className = !(k&1) ? '' : myclass; 
		}
	} 
 } 
