

function renderShortDocList(resp, containerID, newsUrlBase, uploadPathBase, themePathBase)  {
	
		//获取XML数据
		var data = resp.responseXML;
		
		//获取链接结点数组
		var docs = data.getElementsByTagName("row");
		
		//用于呈现图片链接的容器
		var container = $(containerID);
		if(!container) return;
		
		//创建表格，以一行一列的形式显示图片链接
		var table = c$("table");
		table.setAttribute("class","sy_docList_Class");
		table.setAttribute("cellspacing","0");
		table.setAttribute("cellpadding","0");
		table.setAttribute("width","100%");
		
		//alert(docs.length);
		//循环显示每条记录
		for(var i=0 ; i<docs.length ; i++) {
			
			var id 				= getValue(docs[i],"id");
			var fullTitle 		= getValue(docs[i],"title");
			var title 			= getValue(docs[i],"title");
			var contentType		= getValue(docs[i],"contenttype");
			var createdDate		= getValue(docs[i],"createddate");	
			var author			= getValue(docs[i],"author");
			var hits			= getValue(docs[i],"hits");
			var linkalt			= "【标题】" + fullTitle + "\n"
								+ "【作者】" + author + "\n"
								+ "【日期】" + createdDate + "\n"
								+ "【点击数】" + hits + "\n";
			
			if(this.length >0 && title.length > this.length) title = title.substring(0,this.length) + "...";

			createdDate = createdDate.substring(0,10);
			
			var url ;
			contentType = parseInt(contentType);
			
			switch(contentType) {
				case 1:
					url = newsUrlBase + id;
					break;
				case 2:
					var contentURL = getValue(docs[i],"contenturl");
					url = CONTEXT_PATH + "portal/common/getFile.jsp?ID=" + id + "&file=" + contentURL;
					break;
				case 3:
					var contentURL = getValue(docs[i],"contenturl");
					url = CONTEXT_PATH + "portal/common/getFile.jsp?ID=" + id + "&file=" + uploadPathBase + contentURL;
					break;
			}
			
			var tr = c$("tr");
			var td1 = c$("td");
			var td2 = c$("td");
			var img = c$("img");
			
			var a = c$("a");
			
			img.setAttribute("src", IMAGE_PATH + this.preimage);
			img.setAttribute("alt", fullTitle);
			img.setAttribute("align", "absmiddle");
			img.setAttribute("width", "16");
			img.setAttribute("height", "16");
			img.setAttribute("border", "0");
			
			var newimg = c$("img");
			newimg.setAttribute("src", IMAGE_PATH + "new.gif");
			newimg.setAttribute("align", "absmiddle");
			newimg.setAttribute("border", "0");
			
			a.setAttribute("class","logoLinks_LinkClass");
			a.setAttribute("href",url);
			a.setAttribute("target","_blank");
			a.setAttribute("title",linkalt);
			//a.appendChild(img);
			a.appendChild(document.createTextNode(title));
			//if(i<3) a.appendChild(newimg);
			//td1.setAttribute("height","18");
			td1.setAttribute("align", "left");
			td1.setAttribute("class", "docList_title");
			td1.appendChild(a);
			
			td2.setAttribute("align","right");
			td2.appendChild(t$("(" + createdDate + ")"));
			td2.setAttribute("class", "docList_date");
			
			tr.appendChild(td1);
			tr.appendChild(td2);
			
			table.appendChild(tr);
		}
		container.innerHTML = "";
		container.appendChild(table);
		container.innerHTML = container.innerHTML;
}


function renderProductList(resp, containerID, newsUrlBase, uploadPathBase, themePathBase)  {
	
		//获取XML数据
		var data = resp.responseXML;
		
		//获取链接结点数组
		var docs = data.getElementsByTagName("row");
		
		//用于呈现图片链接的容器
		var container = $(containerID);
		if(!container) return;
		
		//创建表格，以一行一列的形式显示图片链接
		var table = c$("table");
		table.setAttribute("class","sy_docList_Class");
		table.setAttribute("cellspacing","0");
		table.setAttribute("cellpadding","0");
		table.setAttribute("width","100%");
		
		//alert(docs.length);
		//循环显示每条记录
		for(var i=0 ; i<docs.length ; i++) {
			
			var id 				= getValue(docs[i],"id");
			var fullTitle 		= getValue(docs[i],"title");
			var title 			= getValue(docs[i],"title");
			var contentType		= getValue(docs[i],"contenttype");
			var createdDate		= getValue(docs[i],"createddate");	
			var author			= getValue(docs[i],"author");
			var hits			= getValue(docs[i],"hits");
			var linkalt			= "【标题】" + fullTitle + "\n"
								+ "【作者】" + author + "\n"
								+ "【日期】" + createdDate + "\n"
								+ "【点击数】" + hits + "\n";
			
			if(this.length >0 && title.length > this.length) title = title.substring(0,this.length) + "...";

			createdDate = createdDate.substring(0,10);
			
			var url ;
			contentType = parseInt(contentType);
			
			switch(contentType) {
				case 1:
					url = newsUrlBase + id;
					break;
				case 2:
					var contentURL = getValue(docs[i],"contenturl");
					url = CONTEXT_PATH + "portal/common/getFile.jsp?ID=" + id + "&file=" + contentURL;
					break;
				case 3:
					var contentURL = getValue(docs[i],"contenturl");
					url = CONTEXT_PATH + "portal/common/getFile.jsp?ID=" + id + "&file=" + uploadPathBase + contentURL;
					break;
			}
			
			var tr = c$("tr");
			var td1 = c$("td");
			var td2 = c$("td");
			var img = c$("img");
			
			var a = c$("a");
			
			img.setAttribute("src",IMAGE_PATH + this.preimage);
			img.setAttribute("alt",fullTitle);
			img.setAttribute("align","absmiddle");
			img.setAttribute("width","16");
			img.setAttribute("height","16");
			img.setAttribute("border","0");
			
			var newimg = c$("img");
			newimg.setAttribute("src",IMAGE_PATH + "new.gif");
			newimg.setAttribute("align","absmiddle");
			newimg.setAttribute("border","0");
			
			a.setAttribute("class","logoLinks_LinkClass");
			a.setAttribute("href",url);
			a.setAttribute("target","_blank");
			a.setAttribute("title",linkalt);
			//a.appendChild(img);
			a.appendChild(document.createTextNode(title));
			//if(i<3) a.appendChild(newimg);
			//td1.setAttribute("height","18");
			td1.setAttribute("align", "left");
			td1.setAttribute("class", "productList_title");
			td1.appendChild(a);
			
			td2.setAttribute("align","right");
			td2.appendChild(t$("(" + createdDate + ")"));
			td2.setAttribute("class", "productList_date");
			
			tr.appendChild(td1);
			//tr.appendChild(td2);
			
			table.appendChild(tr);
		}
		container.innerHTML = "";
		container.appendChild(table);
		container.innerHTML = container.innerHTML;
}

