
function ucap_pageinfo(id){
	this.docObj = null;
	this.nowObj = id;
	this.m_objSrcContent = null;
	this.m_arSingleRec = null;
	this.hiddenObj = null;
	this.hiddenObjArr = new Array();
	this.m_nPageSize   = 5; 
	this.m_nRecSize   = 1; 
	this.m_arNodes = null;
	this.m_nRecCount   = 0;
	this.m_nPageCount = 0;
	this.showHistory = false;
	this.CP = document.getElementById("CP"+this.nowObj);
	this.m_bFirst    = true;
	this.m_arOutLine = new Array();
	this.lenfilter = true;
	
	function setObj(){
		this.m_objSrcContent = document.all("OutlineContent"+this.nowObj);
		if(this.m_objSrcContent == null){
			alert( "没有定义Outline区域！分页代码发生异常！\n请检查模板的HTML标签已添加 xmlns:x" );
			return false;
		}
		this.m_arSingleRec = this.m_objSrcContent.all("ColumnContent"+this.nowObj);
		if(this.m_arSingleRec == null){
			alert( "没有定义Column区域！分页代码发生异常！\n请检查模板的HTML标签已添加 xmlns:x" );
			return false;
		}
		if(this.m_arSingleRec.children){
			if(this.m_arSingleRec.children.length>0){
				if(typeof(this.m_arSingleRec.children[0])){
				  this.hiddenObj = this.m_arSingleRec.children[0];
				}
			}
		}else if(this.m_arSingleRec.length){
			for(var x=0;x<this.m_arSingleRec.length;x++){
				this.hiddenObjArr[this.hiddenObjArr.length] = this.m_arSingleRec[x].children[0]; 
			}
		}
		if(this.m_objSrcContent.PageSize && !isNaN(this.m_objSrcContent.PageSize)){
			this.m_nPageSize = parseInt(this.m_objSrcContent.PageSize);
		}
		if(this.m_arSingleRec != null && this.m_arSingleRec.length) {this.m_nRecSize = this.m_arSingleRec.length;}
		if(!this.showHistory){
			if(!this.docObj){
				this.docObj = document.getElementById("DocumentsDataSrc"+this.nowObj);
			}
			this.m_arNodes = this.docObj.getElementsByTagName("INFO");
		}	
		this.m_nRecCount   = this.m_arNodes.length;
		this.m_nPageCount = 0;
		if(this.m_nRecCount%this.m_nPageSize>0)
		{
			this.m_nPageCount = (this.m_nRecCount - (this.m_nRecCount%this.m_nPageSize))/this.m_nPageSize +1;
		}else{
			this.m_nPageCount = this.m_nRecCount/this.m_nPageSize;
		}

		this.CP = document.getElementById("CP"+this.nowObj);
	}
	function _showPageLineNum(){
		if(!this.docObj){
			this.docObj = document.getElementById("DocumentsDataSrc"+this.nowObj);
		}
		//var recsnode = docObj.XMLDocument.selectNodes("//RECS");
		var recsnode = this.docObj.getElementsByTagName("RECS");
		var infocount = recsnode[0].getAttribute("totalRecs");
		var infocountObj = document.getElementById("infocount"+this.nowObj);
		if(infocountObj) infocountObj.innerText = infocount;
		var recordcountObj = document.getElementById("recordcount"+this.nowObj);
		if(recordcountObj) recordcountObj.innerText = this.m_nRecCount;
		var totalpageObj = document.getElementById("totalpage"+this.nowObj);
		if(totalpageObj) totalpageObj.innerText = this.CP.value+"/"+this.m_nPageCount;
	}
	function _getCurrPage(_currentPage){
		var cPage =1;
		if( _currentPage<=0 || _currentPage=="")
			cPage =1;
		else if(_currentPage>this.m_nPageCount)
			cPage = this.m_nPageCount;
		else
			cPage = _currentPage;

		return cPage;
	}
	function _toPage(_pageNo){
		if(this.m_nRecCount <= 0) return false;
		this.removeAllOldNodes();
		this.m_bFirst = true;
		var cP = this.getCurrPage(_pageNo);
		var startPos = cP*this.m_nPageSize - this.m_nPageSize;
		var endPos = 0;
		if(cP*this.m_nPageSize>this.m_nRecCount)
			endPos=this.m_nRecCount;
		else
			endPos = cP*this.m_nPageSize;

		var nOutlineCount = 0;
		if(this.hiddenObj!=null){
		   this.hiddenObj.style.display="";
		}
		if(this.hiddenObjArr!=null){
			for(var x=0;x<this.hiddenObjArr.length;x++){
				this.hiddenObjArr[x].style.display="";
			}
		}
		for(var i=startPos; i<endPos; i++){
			var nTemp = this.createItemHTML(i, endPos, nOutlineCount);
			if(nTemp <= 0) break;
			i = i + nTemp;
			i--;
			nOutlineCount++;
		}
		if(this.hiddenObj!=null){
			  this.hiddenObj.style.display="none";
		}
		if(this.hiddenObjArr!=null){
			for(var x=0;x<this.hiddenObjArr.length;x++){
				this.hiddenObjArr[x].style.display="none";
			}
		}
		for( ;!this.m_bFirst && nOutlineCount<this.m_nPageSize; nOutlineCount++)
		{
			if(this.m_arOutLine.length <= nOutlineCount) break;
			//m_arOutLine[nOutlineCount].style.display = "none";
		}
		if(this.CP!=null){ this.CP.value = cP;}
		this.showPageLineNum();
		this.m_bFirst  = false;
		
		var innoarray = document.all.inno;
		if( innoarray!=null && innoarray.length>0){
			for(var i=0;i< innoarray.length-1; i++){
				innoarray[i].innerText = startPos + i+1 ;
			}
		}
		tspace();
	}
	function _removeAllOldNodes(){
		var arTemp = document.all("OutlineClone"+this.nowObj);
		if(!arTemp) return false;
		if(arTemp.length){
			for(var i=arTemp.length-1; i>=0; i--){
				if(arTemp[i].children[0].children[0] && arTemp[i].children[0].children[0].tagName=="LI"){
					arTemp[i].children[0].children[0].removeNode(true);
				}
				arTemp[i].removeNode(true);
			}
		}else{
			arTemp.removeNode(true);
		}
		return true;
	}
	function _createItemHTML(_nCurrIndex, _nEndIndex, _nOutlineIndex){
		if(this.m_arNodes.length < _nCurrIndex) return 0;

		var objContent = null;
		if(this.m_bFirst){
			objContent = this.m_objSrcContent.cloneNode(true);
			objContent.id = "OutlineClone"+this.nowObj;
			this.m_arOutLine[this.m_arOutLine.length] = objContent;
		}else{
			if(_nOutlineIndex >= this.m_arOutLine.length)
			{
				objContent = this.m_objSrcContent.cloneNode(true);
				objContent.id = "OutlineClone"+this.nowObj;
				this.m_arOutLine[this.m_arOutLine.length] = objContent;
				this.m_bFirst = true;
			}else
				objContent = this.m_arOutLine[_nOutlineIndex];
		}
		objContent.style.display = "";
		var arSingleRec = objContent.all("ColumnContent"+this.nowObj);
		if(arSingleRec==null) {arSingleRec = objContent;}
		var recCount = 1;
		if(arSingleRec.length) recCount = arSingleRec.length;
		var i = 0;

		for(i=0; i<recCount; i++){
			if(this.m_arNodes.length <= (_nCurrIndex+i) || _nCurrIndex+i >= _nEndIndex) break;
			var xmlNode = this.m_arNodes[_nCurrIndex+i];
			var objSingleRec = null;
			if(recCount>1) objSingleRec = arSingleRec[i];
			else objSingleRec = arSingleRec;
			var arAllField = objSingleRec.all;

			//alert(arAllField.length);    
			objSingleRec.style.display = "";
			var today = new Date();
			var pdateNode = xmlNode.selectSingleNode("PublishedTime");
			var showIMG = false;
			var infoday ;
			if(pdateNode) {
				var tmpDtext=pdateNode.text;
				infoday = new Date(Date.parse(tmpDtext.replace(/-/g,"/")));
			}
			if (infoday){
				if((today.getYear()-infoday.getYear()==0) && (today.getMonth()-infoday.getMonth()==0) && (today.getDate()-infoday.getDate()==0)){
					showIMG = true;
				}
			}
			for(var j=0; j<arAllField.length; j++){
				var sFieldName = arAllField[j].FieldName;
				var sTagName = arAllField[j].tagName;
				var shortTitleLength = 1000;
				//alert("sFieldName:"+sFieldName+"\n"+"sTagName:"+sTagName);  
				if(arAllField[j].ShortLen) shortTitleLength = arAllField[j].ShortLen; 
				
				if(sTagName=="A" && (
					arAllField[j].href=="about:blank<x:INFOURL></x:INFOURL>"
					|| arAllField[j].href=="about:<x:INFOURL></x:INFOURL>"
					|| arAllField[j].href.indexOf("%3Cx:INFOURL%3E%3C/x:INFOURL%3E") != -1 ) ) {
	            	sFieldName = "InfoURL";
	            }
				if(sFieldName){
					var sValue = "";


					var xmlNodeTemp = xmlNode.selectSingleNode(sFieldName);
					if(xmlNodeTemp) sValue = xmlNodeTemp.text;
					/*if(sTagName=="INFOEXPIMG" && xmlNodeTemp.childNodes(0)) {
						sValue = xmlNodeTemp.childNodes(0).xml;   
					}else if(xmlNodeTemp.childNodes.item(0)){
						sValue = xmlNodeTemp.childNodes.item(0).xml;       
					   }
					}*/
					var reg=new RegExp("&gt;","g"); 
					sValue = sValue.replace(reg,">");
					reg=new RegExp("&lt;","g");
					sValue = sValue.replace(reg,"<");

					  // alert(sValue);  
					switch(sTagName){


					case "A":
						if(sFieldName=="InfoURL"){
						  var tmpValue = sValue.toLowerCase();
						  if((tmpValue.indexOf("http://")>-1) || (tmpValue.indexOf("/")==0)){
							arAllField[j].href = sValue;
						  }else{
							arAllField[j].href = "/publicfiles/business/htmlfiles/"+sValue;
						  }
						}
						break;
					case "INFOTITLE":
						arAllField[j].innerHTML = sValue;
						//update by liuxs 2009/07/25
						arAllField[j].title = sValue; 
						sValue = arAllField[j].innerText;
						if(arAllField[j].ShortLen && sValue.length>shortTitleLength){
							this.lenfilter = true;
							var tempstr = "";
							this.abstractTitle(arAllField[j].childNodes,tempstr,shortTitleLength);
						}
						break;
					case "INFOSUBTITLE":
						arAllField[j].innerHTML = sValue;
						arAllField[j].title = sValue;
						
						
						var tmpStr = sValue.toLowerCase();
						if( tmpStr.indexOf("<img") != -1  
						|| (tmpStr.indexOf(".gif")>0 || tmpStr.indexOf(".jpg")>0 || tmpStr.indexOf(".png")>0 || tmpStr.indexOf(".bmp")>0)){
							//arAllField[j].innerHTML = sValue;
							var tempObj = arAllField[j].getElementsByTagName("IMG");
							if(tempObj.length > 0){
								tmpStr = tempObj[0].src;
							}
							sValue = "<img src='" + tmpStr + "' class='piclist1'>";
							arAllField[j].innerHTML = sValue;
							//alert(sValue);
						}else{
						sValue = arAllField[j].innerText;
						if(arAllField[j].ShortLen && sValue.length>shortTitleLength){
							this.lenfilter = true;
							var tempstr = "";
							this.abstractTitle(arAllField[j].childNodes,tempstr,shortTitleLength);
						}
						//update end;2009/07/25						
										
						}
						break;
					case "SUBPIC":
						arAllField[j].innerHTML = sValue;
						arAllField[j].title = sValue;
						
						var tmpStr = sValue.toLowerCase();
						if( tmpStr.indexOf("<img") != -1  
						|| (tmpStr.indexOf(".gif")>0 || tmpStr.indexOf(".jpg")>0 || tmpStr.indexOf(".png")>0 || tmpStr.indexOf(".bmp")>0)){
							//arAllField[j].innerHTML = sValue;
							var tempObj = arAllField[j].getElementsByTagName("IMG");
							if(tempObj.length > 0){
								tmpStr = tempObj[0].src;
							}
							sValue = "<img src='" + tmpStr + "' class='piclist1'>";
							arAllField[j].innerHTML = sValue;
							//alert(sValue);
						}else{
						sValue = arAllField[j].innerText;
						if(arAllField[j].ShortLen && sValue.length>shortTitleLength){
							this.lenfilter = true;
							var tempstr = "";
							this.abstractTitle(arAllField[j].childNodes,tempstr,shortTitleLength);
						}
						//update end;2009/07/25						
										
						}
						break;
					case "INFOWRITER":
						arAllField[j].innerText = sValue;
						break;
					case "INFOSOURCE":
						arAllField[j].innerText = sValue;
						break;
					case "INFOMNUMBER":
						arAllField[j].innerText = sValue;
						break;
					case "INFODATE":
						arAllField[j].innerText = sValue;
						break;
					case "INFOEXPIMG":
						sValue = sValue.replace("&gt;",">");
						sValue = sValue.replace("&lt;","<");
						arAllField[j].innerHTML = sValue;
						break;	
						
					case "INFO_ABSTRACT":    
						arAllField[j].innerText = sValue;
						break; 
		
				case "INFO_EXPSTR2":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR3":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR4":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR5":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR6":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR7":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR8":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR9":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR10":    
					arAllField[j].innerText = sValue;      
					break; 
				case "INFO_EXPSTR11":    
					arAllField[j].innerText = sValue;      
					break; 
				case "INFO_EXPSTR12":    
					arAllField[j].innerText = sValue;      
					break; 
				case "INFO_EXPSTR13":    
					arAllField[j].innerText = sValue;      
					break; 
				case "INFO_EXPSTR14":    
					arAllField[j].innerText = sValue;      
					break; 
				case "ZWGKFILECODE":    
					arAllField[j].innerText = sValue;      
					break; 
			    case "ZWGKOPENDATE":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGKADDFILE":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGKBUMEN":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGKSUOYINHAO":   
					arAllField[j].innerText = sValue;
					break; 

				case "ZWGKFILECODE":    
					arAllField[j].innerText = sValue;      
					break; 
			    case "ZWGKOPENDATE":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGKADDFILE":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGKBUMEN":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGKSUOYINHAO":   
					arAllField[j].innerText = sValue;
					break; 
						
				case "INFO_EXPSTR15":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR16":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR17":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR18":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR19":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGKOPENTYPE":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGKOPENSHIXIAN":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGKOPENSCOPE":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR20":    
					arAllField[j].innerText = sValue;      
					break; 
			
				case "INFO_EXPSTR21":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR22":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR23":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR24":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR25":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR26":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR27":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR28":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR29":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR30":    
					arAllField[j].innerText = sValue;      
					break; 
				case "INFO_EXPSTR31":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR32":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR33":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR34":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR35":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR36":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR37":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR38":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR39":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR40":    
					arAllField[j].innerText = sValue;      
					break; 
				case "INFO_EXPSTR41":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_EXPSTR42":    
					arAllField[j].innerText = sValue;      
					break;   
					
				case "INFCATEID":      
					arAllField[j].innerText = sValue;      
					break; 	
								case "INFO_ExpStr1":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpSt2":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr3":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr4":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr5":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr6":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr7":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr8":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr9":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGK_EXPSTR10":    
					arAllField[j].innerText = sValue;      
					break; 
			   
			    case "ZWGK_EXPSTR11":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGK_EXPSTR12":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGK_EXPSTR13":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGK_EXPSTR14":   
				  //alert(sValue);	 
				   arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr15":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr16":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGK_EXPSTR17":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGK_EXPSTR18":    
					arAllField[j].innerText = sValue;
					break; 
				case "ZWGK_EXPSTR19":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr20":    
					arAllField[j].innerText = sValue;      
					break; 
			
				case "INFO_ExpStr21":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpSt22":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr23":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr24":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr25":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr26":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr27":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr28":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr29":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr30":    
					arAllField[j].innerText = sValue;      
					break; 
				case "INFO_ExpStr31":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpSt32":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr33":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr34":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr35":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr36":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr37":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr38":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr39":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr40":    
					arAllField[j].innerText = sValue;      
					break; 
				case "INFO_ExpStr41":    
					arAllField[j].innerText = sValue;
					break; 
				case "INFO_ExpStr42":    
					arAllField[j].innerText = sValue;      
					break;   				 					
				default:
					//arAllField[j].innerText = sValue;
					break;
					}
				}
			} 
		}
		for(; arSingleRec.length && i<arSingleRec.length; i++) arSingleRec[i].style.display = "none";
		if(this.m_bFirst)this.m_objSrcContent.insertAdjacentElement("beforeBegin", objContent);
		return i;
	}
	function _abstractTitle(objs,str,len){
		for(var i=0; i<objs.length; i += 1) {
			if( objs.item(i).nodeType == 3 ){
				var start = str.length;
				str += objs.item(i).nodeValue;
				if( this.lenfilter && str.length>len ){
					objs.item(i).nodeValue = str.substring(start,len)+"..";
					this.lenfilter = false;
				}else if( !this.lenfilter ){
					objs.item(i).nodeValue = "";
				}
			}else if( objs.item(i).nodeType == 1 ){
				str = this.abstractTitle( objs.item(i).childNodes,str,len );
			}
		}
		return str;
	}
	this.abstractTitle = _abstractTitle;
	this.setObj = setObj;
	this.showPageLineNum = _showPageLineNum;
	this.toPage = _toPage;
	this.removeAllOldNodes = _removeAllOldNodes;
	this.getCurrPage = _getCurrPage;
	this.createItemHTML = _createItemHTML;
}

function initPage(id,docObj){
	var obj = _getPagefromArr(id);
	if (!( obj != null && typeof(obj)!="undefined" && obj !="undefined"  )){
		obj = new ucap_pageinfo(id);
		if( docObj ){
			obj.docObj = docObj;
		}
		ucap_pageinfo_list_arr.push( obj );
	}else if( docObj ){
		obj.docObj = docObj;
	}
	obj.setObj();
	obj.toPage(1);
	obj.m_bFirst  = false;
}

function _getPagefromArr(id){
	for( var i=0,k=ucap_pageinfo_list_arr.length;i<k;i++ ){
		if( ucap_pageinfo_list_arr[i] != null && ucap_pageinfo_list_arr[i].nowObj == id ){
			return ucap_pageinfo_list_arr[i];
		}
	}
	return null;
}
function goto(objid){
	var obj = _getPagefromArr(objid);
	if ( obj != null && typeof(obj)!="undefined" && obj !="undefined"  ){
		var cpvObj = document.getElementById("CPV"+objid);
		if(cpvObj){
			obj.toPage(cpvObj.value);
			cpvObj.value = obj.CP.value;
		}
	}
}
function toPage(objid,pageid){
	if( typeof(pageid) == "undefined" ){return;}
	var obj = _getPagefromArr(objid);
	if ( obj != null && typeof(obj)!="undefined" && obj !="undefined"  ){
		obj.toPage(pageid);
	}
}

function toPrePage(objid){
	var obj = _getPagefromArr(objid);
	if ( obj != null && typeof(obj)!="undefined" && obj !="undefined"  ){
		var k = parseInt(obj.CP.value);
		if( !isNaN( k ) ){
			obj.toPage( k-1 );
		}
	}
}
function toNextPage(objid){
	var obj = _getPagefromArr(objid);
	if ( obj != null && typeof(obj)!="undefined" && obj !="undefined"  ){
		var k = parseInt(obj.CP.value);
		if( !isNaN( k ) ){
			obj.toPage( k+1 );
		}
	}
	
}
function toLastPage(objid){
	var obj = _getPagefromArr(objid);
	if ( obj != null && typeof(obj)!="undefined" && obj !="undefined"  ){
		obj.toPage( obj.m_nPageCount );		
	}
}

function tspace(){
	var d=document.all['dspace'];
	var rc=100;
	if (d!=null&&d.length!=null){
		for (var t=1;t<=d.length&&t<rc;t++){
			var x=5;
			var o=d[t-1];
			if (t%x==0){
				o.style.display='block';
			}
		}
	}
}

