 var optionData = [{"type": "Apple TV", "dataList":[{"name":"Apple TV 2G (4.1/8M89)", "value": "http://appldnld.apple.com/AppleTV/061-8940.20100926.Tvtnz/AppleTV2,1_4.1_8M89_Restore.ipsw"}, 
						   {"name":"Apple TV 2G (4.2.1/8C154)", "value": "http://appldnld.apple.com/AppleTV/061-9978.20101214.gmabr/AppleTV2,1_4.2.1_8C154_Restore.ipsw"}
						  ]
		  }, {"type": "iPad", "dataList":[{"name":"iPad (3.2.2/7B500)", "value": "http://appldnld.apple.com/iPad/061-8801.20100811.CvfR5/iPad1,1_3.2.2_7B500_Restore.ipsw"}, 
						   {"name":"iPad (3.2/7B367)", "value": "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPad/061-7987.20100403.mjiTr/iPad1,1_3.2_7B367_Restore.ipsw"}
						  ]
		  }];
	var jsonData = {
					"w10086s":"Apple TV 2G (4.1/8M89)", 
					"w3gs10088":"Apple TV 2G (4.2.1/8C154)", 
					"w4gs10078":"iPad (3.2.2/7B500)", 
					"w4gs10088":"iPad (3.2/7B367)"};
	var jsondata2 = {"name":"Apple TV 2G (4.1/8M89)", "value": "http://appldnld.apple.com/AppleTV/061-8940.20100926.Tvtnz/AppleTV2,1_4.1_8M89_Restore.ipsw"};
	
  var optionData2 = {"Apple TV 2G (4.1/8M89)": {"type":"Apple TV 2G (4.1/8M89)", "href": "http://appldnld.apple.com/AppleTV/061-8940.20100926.Tvtnz/AppleTV2,1_4.1_8M89_Restore.ipsw"}, 
					"Apple TV 2G (4.2.1/8C154)": {"type":"Apple TV 2G (4.1/8M89)", "href": "http://appldnld.apple.com/AppleTV/061-9978.20101214.gmabr/AppleTV2,1_4.2.1_8C154_Restore.ipsw"}};
/*	
	alert(optionData.length);
	alert(optionData[0].type);
	alert(optionData[0].dataList[0].name);
	alert(optionData[0].dataList[0].value);
	alert(optionData[1].type);
	alert(optionData[1].dataList[1].name);
	alert(optionData[1].dataList[1].value);
	var nvalue = jsonData.w10086s;
	alert(optionData2[nvalue].href);*/
	for(var i=0; i<optionData.length; i++)
	{
		var str = "&lt;OPTGROUP label=\""+ optionData[i].type + "\"&lt;";
		alert(str);
		document.write(str);
	}
	