/*global JsonML, Example */

/* namespace window.Example */
if ("undefined" === typeof window.Example) {
	window.Example = {};
}

Example.memberRow = JsonML.BST(
[
	"tr",
	{
		"class": "Member",
		"style": 
			function() {
				return  "background-color:" + ((this.index%2)?"silver":"white") + ";" ;
			},
		"onclick": 
			function() {
				return  "window.open('http://en.wikipedia.org/wiki/" + this.data.wiki + "');" ;
			}
	},
	" ",
	[
		"td",
		{
			"class": "NameCol FirstNameCol"
		},
		function() {
				return  this.data.firstName ;
			}
	],
	" ",
	[
		"td",
		{
			"class": "NameCol"
		},
		function() {
				return  this.data.lastName ;
			}
	],
	" ",
	[
		"td",
		{
			"class": "DateCol"
		},
		function() {
				return  this.data.start ;
			}
	],
	" ",
	[
		"td",
		{
			"class": "DateCol"
		},
		function() {
				return  this.data.end || "Present" ;
			}
	],
	" ",
	[
		"td",
		{
			"class": "TextCol"
		},
		function() {
				return  (this.data.type && this.data.type.join(", ")) || "unknown" ;
			}
	],
	" "
]);
