
function se(num_array, str_array){

//	Parameter
//	num_array: expected to be a list of numbers, 
//			First number should be decoded to IFE, power, seat type, ...etc
//			Second number is expected to be NEGATIVE attributes. Additional attributes should be in similar pairs
//			Third number is expected to be positive attributes, 
//			Each element in the num_array is a 32 bit integer, therefore can uniquely identify 32 distinct comments
//
//	str_array: expected to be a list of strings. The first one should be the seat number(s) to be displayed
//			Second one should be additional positive attributes to be displayed, 
//			Third one should be additional negative attributes to be displayed.

	var
		s, v1, v2, v3, v4, i = 0, x = 0, y= 0,
		top_section = "",
		p_comment = "",
		n_comment = "",
		return_comment = "",
		ife = new Array(16),
		seat_type = new Array(8),
		power_type = new Array(8),
		p = new Array(32),
		n = new Array(32);

	s = num_array[0];
	//	alert(s);
	v1 = s % 16;
	//	alert(v1);
	v2 = s >>> 4;
	v2 = v2 % 256;
	//	alert(v2);
	v3 = s >>> 12;
	v3 = v3 % 16;
	//	alert(v3);
	v4 = s >>> 16
	v4 = v4 % 16;
	//	alert(v4);

	// 	IFE
	ife[0] = "None";
	ife[1] = "AVOD";
	ife[2] = "Audio only";
	ife[3] = "Over-head monitor";
	ife[4] = "Projection screen";
	ife[5] = "Satellite radio";
	ife[6] = "Live TV";
	ife[7] = "non-AVOD personal screen";
	ife[8] = "Hand-held video player";
	ife[9] = "unknown";
	//	Seat type
	seat_type[0] = "Individual suite";
	seat_type[1] = "Full-flat sleeper";
	seat_type[2] = "Slanted flat seat";
	seat_type[3] = "Recliner";
	seat_type[4] = "Non-reclining seat";
	seat_type[5] = "Standard seat";
	//	Power
	power_type[0] = "None";
	power_type[1] = "emPower";
	power_type[2] = "110V universal";
	power_type[3] = "Shared 110V universal";
	power_type[4] = "15V DC Cigarette Lighter";
	power_type[5] = "DC power ports";
	power_type[6] = "Shared emPower";
	power_type[7] = "Shared 15V DC Cigarette Lighter";
	power_type[8] = "Shared DC power ports";  
	power_type[9] = "unknown";  

	top_section = "<div id=\"hover-header\"><table width=\"100%\" border=0 cellpadding=\"0\" cellspacing=\"0\" style=\"z-index: 2;\"><tr><td class=\"hover-head\" >Seat:</td><td class=\"hover-data\" >" 
			+ str_array[0] + "</td><td class=\"hover-head\" >Type:</td><td class=\"hover-data\">"
			+ seat_type[v3] + "</td></tr><tr><td class=\"hover-head\" >Power:</td><td class=\"hover-data\" >"
			+ power_type[v4] +  "</td><td class=\"hover-head\" >IFE:</td><td class=\"hover-data\" >"
			+ ife[v2] + "</td></tr></table></div><div id=\"hover-list\"><ul>";
			

	p[0] ="This is an average seat in this cabin";
	p[1] ="No adjacent middle seat";
	p[2] ="Increased legroom";
	p[3] ="No seat behind this seat";
	p[4] ="Layout allows easy aisle access for row mates";
	p[5] ="Additional space/Increased privacy";
	p[6] ="Wider than the average seat in this cabin";
	p[7] ="Additional storage";
	p[8] ="Bulkhead/Seat in front doesn't recline";
	p[9] ="Easy aisle access";

		
	n[0] ="Reduced storage space";
	n[1] ="Heavy traffic area";
	n[2] ="Close to restrooms";
	n[3] ="Obstructed window view";
	n[4] ="No window view";
	n[5] ="Non-moveable armrest";
	n[6] ="Restricted legroom";
	n[7] ="Requires an additional fee to book";
	n[8] ="Seat subject to increased contact from aisle traffic";
	n[9] ="Narrower than average seat in this cabin";
	n[10] ="No air vent";
	n[11] ="Restricted recline";
	n[12] ="No recline";
	n[13] ="Reduced privacy";
	n[14] ="Seat is rear facing";


	y = num_array[1];	
	for (i=0; i < 32; i++)
		{
			if ( (y % 2) == 1)
				{
					n_comment = n_comment + "<li class=\"negative\"><b> - </b>" + n[i] + "</li>";
				}
			y = y >>> 1;
		}

	if (num_array[3]) {
	y = num_array[3];	
	for (i=32; i < 64; i++)
		{
			if ( (y % 2) == 1)
				{
					n_comment = n_comment + "<li class=\"negative\"><b> - </b>" + n[i] + "</li>";
				}
			y = y >>> 1;
		}
	}

	if (num_array[5]) {
	y = num_array[5];	
	for (i=64; i < 96; i++)
		{
			if ( (y % 2) == 1)
				{
					n_comment = n_comment + "<li class=\"negative\"><b> - </b>" + n[i] + "</li>";
				}
			y = y >>> 1;
		}
	}

	x = num_array[2];	
	for (i=0; i < 32; i++)
		{
			if ( (x % 2) == 1)
				{
					p_comment = p_comment + "<li class=\"positive\"><b> + </b>" + p[i] + "</li>";
				}
			x = x >>> 1;
		}
	if (num_array[4]) {
	x = num_array[4];	
	for (i=32; i < 64; i++)
		{
			if ( (x % 2) == 1)
				{
					p_comment = p_comment + "<li class=\"positive\"><b> + </b>" + p[i] + "</li>";
				}
			x = x >>> 1;
		}
	}

	return_comment = top_section;
	if (str_array[1]) 
		{
			return_comment = return_comment + str_array[1]; 
		}
	return_comment = return_comment + p_comment;
	if (str_array[2]) 
		{
			return_comment = return_comment + "</ul><ul>" + str_array[2]; 
		}
	return_comment = return_comment + n_comment + "</ul></div>";

	return (return_comment);
}
