	/**** browser version filters ****/
var isIE = (navigator.appName == "Microsoft Internet Explorer");
var isIEWin = (isIE && navigator.userAgent.indexOf("Win") != -1);
var isIEMac = (isIE && navigator.userAgent.indexOf("Mac") != -1);


// data source
var a = ["1.4", "2.0", "2.8", "4.0", "5.6", "8.0", "11.0", "16.0", "22.0"];
var b = [
	["50","50",0], 			// 0
	["100","100",2], 		// 1
	["1740L","25",3], 		// 2
	["1740L","29",3], 		// 3
	["1740L","40",3], 		// 4
	["24105L","24",3], 		// 5
	["24105L","28",3], 		// 6
	["24105L","50",3], 		// 7
	["24105L","70",3], 		// 8
	["24105L","105",3], 		// 9
	["28070L","28",2], 		//10
	["28070L","50",2], 		//11
	["28070L","70",2], 		//12
	["28135IS","28",3], 		//13
	["28135IS","50",4], 		//14
	["28135IS","70",4], 		//15
	["28135IS","100",4], 		//16
	["28135IS","135",4], 		//17
	["1740L","17",3], 		//18
	["2470L","24",2], 		//19
	["2470L","28",2], 		//20
	["2470L","48",2], 		//21
	["2470L","70",2], 		//22
	["24200","24",3], 		//23
	["24200","47",4], 		//24
	["24200","70",4], 		//25
	["24200","105",4], 		//26
	["24200","200",4], 		//27
	["5018","50",1], 		//28
	["85","85",1], 			//29
	["70300DO","160",4] 		//30
];



/**** table creation and deletion functions ****/

// Approach #4
// Assemble entire table element as HTML string
// Assign string to innerHTML of a div element acting as table wrapper

function makeTableApproach4() {
    
    if (document.body.innerHTML) {
        

	// start
	
	// table rendering
	var output = "<table id='myTable2'><tbody id='myTbody2'>";
	
	var y_start = 0;
	// formato nome file: FOLDER/b[y][0]-b[y][1]._a[x].jpg
	for(j in y){
		
		if(y_start == 0) {
				output +="<tr bgcolor='#eeeeee'><td></td>";
				for ( k in x) {
					
					output +="<td bgcolor='#eeeeee'>&nbsp;"+a[x[k]]+"&nbsp</td>";
					
				}	
				output +="</tr>";
			}
		y_start++;
			
		output +="<tr>";
		var x_start = 0;
		for ( k in x) {
			
			if(x_start == 0) {
				output +="<td bgcolor='#eeeeee'>&nbsp;"+b[y[j]][0]+"@"+b[y[j]][1]+"&nbsp</td>";
			}
			x_start++;
			//if (k >= b[y[j]][2]) {
				output +="<td><img src='" +folder+ "/" +b[y[j]][0]+ "-" +b[y[j]][1] + "._" +a[x[k]] + ".jpg'></td>";
			//} else {
			//	output +="<td><center>N/A</center></td>";
			//}
		}
		output +="</tr>";
	}
	output +="</tbody></table>";	
	
	// stop
	
	
        document.getElementById("tableWrap2").innerHTML = output;
    } else {
        alert("This test not supported in the current browser.");
    }
}

