	function getFirstNews() {
		var url = CONTEXT_PATH + "getXML?object=DocInfo&action=getImageList&alias=sylm_ztbd&rows=1";
		
		var ajaxObj = new Ajax.Request(
			url,
			{
				method : 'get',
				onComplete : function(resp) {
					//获取XML数据
					var data = resp.responseXML;
		
					//获取链接结点数组
					var docs = data.getElementsByTagName("row");

					//循环显示每条记录
					if(docs.length > 0) {
						var _id 		= getValue(docs[0],"id");
						var title 		= getValue(docs[0],"title");
						var subtitle 	= getValue(docs[0],"subtitle");
						var mainpic		= getValue(docs[0],"mainpic");
						
						if(title.length > 22) title = title.substring(0, 22) + "...";
						
						subtitle = subtitle.replaceAll("\n", "<br>");
					
						mainpic = CONTEXT_PATH + "plugin/eWebEditor/UploadFiles/" + mainpic;
						
						var url = CONTEXT_PATH + 'portal/common/NewsDetail.jsp?ID=' + _id;
						
						if($("first_title")) 		$("first_title").innerHTML 		= title;
						if($("first_subtitle")) 	$("first_subtitle").innerHTML 	= subtitle;
						if($("first_img")) 			$("first_img").src 				= mainpic;
						if($("first_link_img")) 	$("first_link_img").href 		= url;
						if($("first_link_title")) 	$("first_link_title").href 		= url;
					}
					
				}
			}
		);
	}


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;
}


function renderPageLinkList(resp, containerID) {

		//获取XML数据
		var data = resp.responseXML;
		
		//获取链接结点数组
		var docs = data.getElementsByTagName("row");
		
		//呈现文字链接的容器
		var container = $(containerID);
		
		var buf = new Array();
		
		var option = new Option("     选择进入相关内容", "");
			container.options[container.options.length] = option;
		
		//循环显示每条记录
		for(var i=0 ; i<docs.length ; i++) {
			
		    var id 				= getValue(docs[i],"id");
			var title 			= getValue(docs[i],"title");
			
			var option = new Option(title, "../../portal/common/NewsDetail.jsp?ID=" + id + "||_blank");
			container.options[container.options.length] = option;
	
		}

}

function renderSubBranchList(resp, containerID) {

		//获取XML数据
		var data = resp.responseXML;
		
		//获取链接结点数组
		var docs = data.getElementsByTagName("row");
		
		//呈现文字链接的容器
		var container = $(containerID);
		
		var buf = new Array();
		
		buf.push("<table width='100%'  border='0' cellspacing='0' cellpadding='0'>");
		
		//循环显示每条记录
		for(var i=0 ; i<docs.length ; i++) {
			
		    var id 				= getValue(docs[i],"id");
			var title 			= getValue(docs[i],"title");
			
			if ((i % 3) == 0) {
            buf.push("<tr>");
			}
			
			buf.push("<td height='30'><table width='95%'  border='0' align='center' cellpadding='4' cellspacing='1' bgcolor='#000000'><tr><td bgcolor='#FFFFFF' align='center'><a href='../../portal/common/NewsDetail.jsp?ID=" + id + "' target='_blank'>" + title+ "</a></td></tr></table></td>");
			
			if ((i % 3) == 2) {
            buf.push("</tr>");
			}
	
		}
		
		buf.push("</table>");
		
		container.innerHTML = buf.join("");

}



