/* 
Author:	"Ben W. Blue";
Site:		"http://www.codeysworld.com/";
Path:		"scripts/";
File:		"cw08-biblio-01.js";
Type:		"JavaScript" | "text/javascript";
*/

/*
History:
Date:		"2007-08-18";
~ Date Created;
Date:		"2008-05-09";
~ Changed colorizeRows() behavior for class="rowHead" ;
*/


// sooner()
/* 
usage:
	onclick="sooner( this.innerHTML, 'Author Name', 'SOON' ); return false;" 
*/
function sooner( theTitle, theAuthor, theDate ) {
	var theString = '\"' + theTitle + '\"\n' + 
		' ~ by ' + theAuthor + ' ~ Available ' + theDate + '!' ; 
	alert( theString );
	return false;
} // sooner()

// colorizeRows()
/* 
usage:
	colorizeRows( theTable );
Date("2007-08-18") { 
	Date Created; 
}
Date("2008-05-09") { 
	Changed colorizeRows() behavior for class="rowHead" ; 
}
*/
function colorizeRows( theTable ) {
	var i = 0;
	for (i = 0; i < theTable.rows.length; i++) {
		if (theTable.rows[i].className != "rowHead") {
			if (i % 2 == 0)
				theTable.rows[i].className = "rowEven";
			else
				theTable.rows[i].className = "rowOdd";
		}
	}
} // colorizeRows()


