function ProductSectorLatestNews_Register(id, tagId, lang){
	new Ajax.Request("/service/ProductSectorLatestNews.html?id=" + tagId + "&lang=" + lang, { method: "get", 
		onSuccess: function(response){
			try{
				var news = response.responseText.evalJSON(true);
				var html = "<ul>";
				for(var i = 0; i < news.length; i++){
					var newsType = news[i].type == "1" ? "DailyHeadline" : "BusinessResources"; 
					html += "<li><div class=\"newsDate\">" + news[i].date.escapeHTML() + "</div><a href=\"/"+lang+"/" + newsType + "/" + news[i].id + "/" + news[i].Alias + ".html\">" + news[i].title.escapeHTML() + "</a></li>";
				}
				html += "</ul>";
				$(id).innerHTML = html;
			}catch(e){ 
				//alert(e); 
			}
		}
	});
}

function ThumbnailProductSectorLatestNews_Register(id, tagId, lang){
	new Ajax.Request("/service/TrendFashionProductSectorLatestNews.html?id=" + tagId + "&lang=" + lang, { method: "get", 
		onSuccess: function(response){
			try{
				var news = response.responseText.evalJSON(true);
				var html = "<ul><li><table width=\"100%\">";
				for(var i = 0; i < news.length; i++){
					html += "<tr><td class=\"pic\">";
					if(news[i].thumbNail != ""){
						html += "<a href=\"/"+lang+"/Trend/" + news[i].id + "/" + news[i].Alias + ".html\">" + "<img src=\"" + news[i].thumbNail.escapeHTML() + "\" border=\"0\" /></a>";
					}
					html += "</td><td class=\"title\"><div class=\"newsDate\">" + news[i].date.escapeHTML() + "</div><a href=\"/"+lang+"/Trend/" + news[i].id + "/" + news[i].Alias + ".html\">" + news[i].title.escapeHTML() + "</a></td></tr>";
					html += "<tr><td height=\"10\" colspan=\"2\"></td></tr>";
				}
				html += "</table></li></ul>";
				$(id).innerHTML = html;
			}catch(e){ 
			//	alert(e); 
			}
		}
	});
}
