function loadok(){
	/*if(channel_ok){*/
		morego = false;
		if(recCount==0){
			recCount=buffer.ItemsCount;
			showPages();
		}
		var i;
		var content="";
		content+="<table border=0 cellspacing=5 cellpadding=0>";
		for(i=0 ; i<buffer.items.length;i++){
			var item = buffer.items[i];
			var itemURL=item[buffer.items_URL];
			if (itemURL.indexOf("htm")!=-1 && itemURL.indexOf("cms/template")!=-1 && itemURL.indexOf("item_")!=-1){
			itemURL = itemURL +"&pt=1"
			}
       			content+="<tr bgcolor=#FFFFFF><td height=20 width=20 align=right bgcolor=#E8ECF1 nowrap><img src=/ciec/intranet/images/arrow_intranet.gif></td><td>";
			content+="&nbsp;<a href = '" + itemURL+ "' class=link3 target='_blank'><font color=#000000>" + item[items_TITLE] + "</font></a>";
	    		content+="</td></tr>";
        	}
    		content+="</table>";
        	document.getElementById("contentDiv").innerHTML=content;
        	if (buffer.items.length>1){
        		document.getElementById("html1").style.display="";	
        		document.getElementById("contentDiv").style.display="";	
        		//document.getElementById("pageList").style.display="";	
        		document.getElementById("html2").style.display="";	
        	}
        	if (buffer.items.length==0){
        		document.getElementById("html1").style.display="";	
        		document.getElementById("html2").style.display="";	
        	}
        	if (buffer.items.length==1){
        		try {
				var item = buffer.items[0];
				var itemURL=item[buffer.items_URL];
		        	document.getElementById("contentDiv1").innerHTML=itemURL;
        		}
        		catch(e){}
        	}
	/*}*/
}

//显示分页列表
function showPages(){
var pageContent="";
if((recCount%pageSize)>0)
	pageCount=parseInt(recCount/pageSize)+1;
else
	pageCount=recCount/pageSize;
for(var i=1;i<=pageCount;i++)
    pageContent+="[<span style=\"cursor:hand\" onclick=goPage("+i+")>"+i+"</span>] ";
document.getElementById("pageList").innerHTML=pageContent;
}

//显示指定的页面数据
function goPage(pCount){
    if(pCount<1||pCount>pageCount)
        return false;
    var curPage=(pCount-1)*pageSize+1
    buffer.location.href="/servlet/com.deepsoft.cms.CMSServlet?action=getPageItems&cid="+cid+"&start="+curPage+"&len="+pageSize;
}

//从地质栏中得到cid的值
function getId(urlStr){
return parseInt(urlStr.substr(urlStr.indexOf("cid=")+4,urlStr.length));
}

