function killErrors() { 
  return true; 
} 
window.onerror = killErrors;
/*
*wuxiao 20100106
*/
function getBrowserType() 
{ 
   var OsObject = ""; 
   if(navigator.userAgent.indexOf("MSIE")>=0) { 
        return "MSIE"; 
   } 
   if(isFirefox=navigator.userAgent.indexOf("Firefox")>=0){ 
        return "Firefox"; 
   } 
   if(isSafari=navigator.userAgent.indexOf("Safari")>=0) { 
        return "Safari"; 
   }  
   if(isCamino=navigator.userAgent.indexOf("Camino")>=0){ 
        return "Camino"; 
   } 
   if(isMozilla=navigator.userAgent.indexOf("Gecko/")>=0){ 
        return "Gecko"; 
   } 
} 
/*********************************************************************
                          1.字符串操作类函数
**********************************************************************/
// 返回字符的长度，一个中文算2个
String.prototype.ChineseLength=function()
{ 
    return this.replace(/[^\x00-\xff]/g,"**").length;
}
// 判断字符串是否以指定的字符串结束
String.prototype.EndsWith = function(str) 
{
    return this.substr(this.length - str.length) == str;
}
// 去掉字符左端的的空白字符
String.prototype.LeftTrim = function()
{
    return this.replace(/(^[\\s]*)/g, "");
}
// 去掉字符右端的空白字符
String.prototype.RightTrim = function()
{
    return this.replace(/([\\s]*$)/g, "");
}
// 判断字符串是否以指定的字符串开始
String.prototype.StartsWith = function(str) 
{
    return this.substr(0, str.length) == str;
}
// 去掉字符两端的空白字符
String.prototype.Trim = function()
{
    return this.replace(/(^\s*)|(\s*$)/g, "");
}
/*****************************************************************************
                                2.验证类函数
******************************************************************************/
//只能输入数字
function mustNumber(){
 if(event.keyCode){
    return event.keyCode>=48&&event.keyCode<=57;
 }
 else{ 
    return event.which>=48&&event.which<=57;
 }
}
function isUserName(name){
  return new RegExp("^[a-zA-Z][a-zA-Z0-9_]{4,15}$").test(name);//字母开头,允许数字字母下划线(5至16位)
}
//判断是否Email
function isEmail(email){
  return new RegExp("\\w+@\\w+\\.\\w").test(email);
}
//判断是否日期类型
function isDate(date){
  return new RegExp("\\d{4}\\-\\d{1,2}\\-\\d{1,2}").test(date);
}
/*****************************************************************************
                                3.HTML元素操作
******************************************************************************/
//动态创建Table
TableOperator=function(row,col,widthData,heightData,parentNode,headArray,idName){//行,列,宽,高,父节点,表头数组,节点ID名称
/*var myTable;
  var row;
  var col;
  var widthData;
  var heightData;
  var parentNode;
  var headArray;
  var idName;
  alert(this.idName);
  this.TableOperator=function(row,col,widthData,heightData,parentNode,headArray,idName){
    this.row=row;
    this.col=col;
    this.widthData=widthData;
    this.heightData=heightData;
    this.parentNode=parentNode;
    this.headArray=headArray;
    this.idName=idName;
  }*/
   var thHeight=30;
   var thBackground="#ccccff";
   var alignType="center";
   this.createTable=function(){
       if(this.thHeight!=undefined)
         thHeight=this.thHeight; 
       if(this.thBackground!=undefined)
         thBackground=this.thBackground;
       if(this.alignType!=undefined)
         alignType=this.alignType;
       var dataDisplayTable=document.createElement("table");
	   var dataTBody=document.createElement("tbody");
	   dataDisplayTable.align=alignType;
	   dataDisplayTable.id=idName;
	   dataDisplayTable.border=1;
	   dataDisplayTable.width=widthData;
	   dataDisplayTable.height=heightData;
	   dataDisplayTable.cellPadding=3;
	   dataDisplayTable.cellSpacing=0;
	   var headTR=document.createElement("tr");
	   headTR.height=thHeight;
	   headTR.style.backgroundColor=thBackground;
	   for(var i=0;i<col;i++){
	     var headTD=document.createElement("td");
	     //headTD.appendChild(document.createTextNode(headArray[i]));
	     headTD.innerHTML=headArray[i];
	     headTR.appendChild(headTD);
	   }
	   dataTBody.appendChild(headTR);
	   for(var i=0;i<row;i++){
	     var mytr=document.createElement("tr");
	     for(var j=0;j<col;j++){
	       var mytd=document.createElement("td");
	       //mytd.appendChild(document.createTextNode(i+"行"+j+"列"));
	       mytd.id=idName+i+j
	       //mytd.innerHTML="ddd";
	       //mytd.style.backgroundColor="red";
	       mytr.appendChild(mytd);
	     }
	     dataTBody.appendChild(mytr);
	   }
	   dataDisplayTable.appendChild(dataTBody);
	   parentNode.appendChild(dataDisplayTable);
   }
   this.removeTable=function(){
      if(dataDisplayTable!=undefined)
        document.body.removeChild(dataDisplayTable);
      dataDisplayTable=undefined;
   }
}
//动态创建DIV
DivOperator=function(){
  var myDiv;
  var id="defaultDiv";
  var width=100;
  var height=100;
  var border="3px groove #7B7B7B";
  var bgcolor="#D8D8EB";
  var index=10001;
  var content="";
  //var cursor="move";
  var top;
  var left;
  this.setDefLocation=function(){
	  if(window.navigator.userAgent.indexOf("MSIE")>=1){
		 top=document.body.offsetHeight/2-height/2;
		 left=document.body.offsetWidth/2-width/2;
	  }else if(window.navigator.userAgent.indexOf("Firefox")>=1){
		 top=document.body.offsetHeight/2+height;
		 left=document.body.offsetWidth/2-width/2;
	  }
  }
  this.createDiv=function(){
      if(myDiv!=undefined){
         return;//避免重复创建
      }
      if(this.id!=undefined)
        id=this.id; 
      if(this.width!=undefined)
        width=this.width; 
      if(this.height!=undefined)
        height=this.height; 
      if(this.border!=undefined)
        border=this.border; 
      if(this.bgcolor!=undefined)
        bgcolor=this.bgcolor;
      if(this.index!=undefined)
        index=this.index; 
      if(this.content!=undefined)
        content=this.content; 
      if(this.cursor!=undefined)
        cursor=this.cursor; 
      if(this.top!=undefined)
        top=this.top; 
      if(this.left!=undefined)
        left=this.left; 
      myDiv=document.createElement("div");
	  myDiv.setAttribute("id",id);
	  myDiv.style.position="absolute";
	  myDiv.style.border=border;
	  myDiv.style.top=top;
	  myDiv.style.left=left;
	  myDiv.style.background=bgcolor;
	  //myDiv.style.cursor=cursor;
	  myDiv.style.width=width+"px";
	  myDiv.style.height=height+"px";
	  myDiv.style.zIndex=index;
	  myDiv.innerHTML=content;
      document.body.appendChild(myDiv);
      myDiv.onmousedown=function(){
        //myDiv.style.left=event.clientX-parseInt(myDiv.style.left);
        //myDiv.style.top=event.clientY-parseInt(myDiv.style.top);
      }
      //myDiv.onmouseup=function(){
       //myDiv.style.left="650px";
      //}
  }
  this.removeDiv=function(){
      if(myDiv!=undefined)
        document.body.removeChild(myDiv);
      myDiv=undefined;
  }
}
/*******************************************************************
                          4.Ajax操作相关与xml
*******************************************************************/
load_XML_String=function(xmlStr,async_type){
   var xmlDoc;
    if(window.ActiveXObject)
    {
        xmlDoc=new ActiveXObject('Microsoft.XMLDOM');
        xmlDoc.async=async_type;//true为异步,false为同步
        //xmlDoc.load(xmlFile);
    }
    else if(document.implementation&&document.implementation.createDocument)
    {
        xmlDoc=document.implementation.createDocument('','',null);
        xmlDoc.async=async_type;//true为异步,false为同步
        //xmlDoc.load(xmlFile);
        XMLDocument.prototype.selectSingleNode = Element.prototype.selectSingleNode = function (xpath){   
            var  x = this .selectNodes(xpath)   
            if ( ! x || x.length < 1 ) return   null ;  //alert(xmlDoc); 
            return  x[ 0 ];   
        }   
        XMLDocument.prototype.selectNodes = Element.prototype.selectNodes = function (xpath){   
            var  xpe  =   new  XPathEvaluator();   
            var  nsResolver  =  xpe.createNSResolver( this .ownerDocument  ==   null   ?   
                this .documentElement :  this .ownerDocument.documentElement);   
            var  result  =  xpe.evaluate(xpath,  this , nsResolver,  0 ,  null );   
            var  found  =  [];   
            var  res;   
            while  (res  =  result.iterateNext())   
               found.push(res);   
            return  found;   
       }
    }
	try{
	  xmlDoc.loadXML(xmlStr);
	}catch(e){
	  var oParser=new DOMParser();
	  xmlDoc=oParser.parseFromString(xmlStr,"text/xml");
	}
	return xmlDoc;
}
load_XML=function(xmlFile,async_type)
{
    var xmlDoc;
    if(window.ActiveXObject)
    {
        xmlDoc=new ActiveXObject('Microsoft.XMLDOM');
        xmlDoc.async=async_type;//true为异步,false为同步
        xmlDoc.load(xmlFile);
    }
    else if(document.implementation&&document.implementation.createDocument)
    {
        xmlDoc=document.implementation.createDocument('','',null);
        xmlDoc.async=async_type;//true为异步,false为同步
        xmlDoc.load(xmlFile);
        XMLDocument.prototype.selectSingleNode = Element.prototype.selectSingleNode = function (xpath){   
            var  x = this .selectNodes(xpath)   
            if ( ! x || x.length < 1 ) return   null ;  //alert(xmlDoc); 
            return  x[ 0 ];   
        }   
        XMLDocument.prototype.selectNodes = Element.prototype.selectNodes = function (xpath){   
            var  xpe  =   new  XPathEvaluator();   
            var  nsResolver  =  xpe.createNSResolver( this .ownerDocument  ==   null   ?   
                this .documentElement :  this .ownerDocument.documentElement);   
            var  result  =  xpe.evaluate(xpath,  this , nsResolver,  0 ,  null );   
            var  found  =  [];   
            var  res;   
            while  (res  =  result.iterateNext())   
               found.push(res);   
            return  found;   
       }
       /*if( document.implementation.hasFeature("XPath", "3.0") )
		{
		// prototying the XMLDocument
		XMLDocument.prototype.selectNodes = function(cXPathString, xNode)
		{
		if( !xNode ) { xNode = this; } 
		var oNSResolver = this.createNSResolver(this.documentElement)
		var aItems = this.evaluate(cXPathString, xNode, oNSResolver, 
		XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
		var aResult = [];
		for( var i = 0; i < aItems.snapshotLength; i++)
		{
		aResult[i] = aItems.snapshotItem(i);
		}
		return aResult;
		}
		
		// prototying the Element
		Element.prototype.selectNodes = function(cXPathString)
		{
		if(this.ownerDocument.selectNodes)
		{
		   return this.ownerDocument.selectNodes(cXPathString, this);
		}
		else{throw "For XML Elements Only";}
		}
		}
		
		// check for XPath implementation
		if( document.implementation.hasFeature("XPath", "3.0") )
		{
		// prototying the XMLDocument
		XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)
		{
		if( !xNode ) { xNode = this; } 
		var xItems = this.selectNodes(cXPathString, xNode);
		if( xItems.length > 0 )
		{
		return xItems[0];
		}
		else
		{
		return null;
		}
		}
		
		// prototying the Element
		Element.prototype.selectSingleNode = function(cXPathString)
		{ 
		if(this.ownerDocument.selectSingleNode)
		{
		return this.ownerDocument.selectSingleNode(cXPathString, this);
		}
		else{throw "For XML Elements Only";}
		}
		}*/
    }
    else
    {
        return null;
    }
    return xmlDoc;
}
AjaxOperator=function(){
  var xmlHttp;
  var callback;
  var urlString="";
  var syn=true;
  var returnType=1;//1:返回文本,!1:返回XML
  if(window.ActiveXObject){
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }else if(window.XMLHttpRequest)  
  {
      xmlHttp=new XMLHttpRequest();
  }
  this.useGet=function(back){
    if(this.urlString!=undefined){
      urlString=this.urlString;
    }
    if(this.syn!=undefined){
      syn=this.syn;
    }
    if(this.returnType!=undefined){
      returnType=this.returnType;
    }
    callback=back;
    xmlHttp.onreadystatechange=execute;
    xmlHttp.open("get",urlString,syn);
    xmlHttp.send(null);
  }
  this.usePost=function(back){
    var param="";
    if(this.urlString!=undefined){
      urlString=this.urlString;
    }
    if(this.param!=undefined){
      param=this.param;
    }
    if(this.syn!=undefined){
      syn=this.syn;
    }
    if(this.returnType!=undefined){
      returnType=this.returnType;
    }
    callback=back;
    xmlHttp.open("post",urlString,syn);
    xmlHttp.onreadystatechange=execute;
    xmlHttp.setRequestHeader("Content-Length",param.length);
    xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
    xmlHttp.send(param);
  }
  function execute(){
    if(xmlHttp.readyState==4)  
    {
       if(xmlHttp.status==200) 
       {
          if(returnType==1){
            callback(xmlHttp.responseText);//调用回调函数
          }
          else{
            callback(xmlHttp.responseXML);//调用回调函数
          }
       }
       else{
          //alert(xmlHttp.status+":"+xmlHttp.statusText);
          //top.location.reload();
          if(xmlHttp.status==12029&&xmlHttp.statusText=="Unknown"){
            alert("连接服务器失败(Link error...)");
          }else{
            alert(xmlHttp.status+":"+xmlHttp.statusText+":"+"操作失败,请重试(sorry,please try again...)");
          }
       }
    }
  }
}
function car(name,title){
  this.name=name;
  this.title=title;
}
/*****************************************************
                    5.其它封装
******************************************************/
function $()
{ 
  var elements=new Array(); 
  for(var i=0;i<arguments.length;i++)
  { 
     var element=arguments[i]; 
     if(typeof element=='string') 
	   element=document.getElementById(element); 
     if(arguments.length==1) 
	   return element; 
     elements.push(element); 
   }
   return elements; 
}
function test(){
  var test=new car("dddd","xxxx");
  alert(JSON.stringify(test));
}
//日期格式化操作
Date.prototype.format = function(format)
{
	var o={
	"M+" : this.getMonth()+1, //month
	"d+" : this.getDate(), //day
	"h+" : this.getHours(), //hour
	"m+" : this.getMinutes(), //minute
	"s+" : this.getSeconds(), //second
	"q+" : Math.floor((this.getMonth()+3)/3), //quarter
	"S" : this.getMilliseconds() //millisecond
	}
	if(/(y+)/.test(format))
	  format=format.replace(RegExp.$1,(this.getFullYear()+"").substr(4 - RegExp.$1.length));
	for(var k in o)
	 if(new RegExp("("+ k +")").test(format))
	  format = format.replace(RegExp.$1,RegExp.$1.length==1 ? o[k] :("00"+ o[k]).substr((""+ o[k]).length));
	return format;
}
function getLocTime(nS) {
    return new Date(parseInt(nS) * 1000).toLocaleDateString().replace(/年|月/g, "-").replace(/日/g, "");
}
/*****项目相关性操作*****/
Parameter=function(){
	var timeout;      //超时时间
	var page;         //当前页数
	var currentTotal; //当前页总记录数
	var totalPage;    //总的页码
	var eachPageCount;//每页显示记录数
	var execute_init="init()";
	var execute_display="displayContent()";
	var totalRecords=0;
	this.getTotalPage=function(){
	    this.totalPage=1;
		if(this.totalRecords%this.eachPageCount==0){
		    this.totalPage=parseInt(this.totalRecords/this.eachPageCount);	
		}
		else{
			this.totalPage=parseInt(this.totalRecords/this.eachPageCount)+1;
		}
		if(this.totalPage<=0)
			this.totalPage=1;
		return this.totalPage;
	}
	this.isSelectAll=function(allCheckbox,checkbox)
	{  //this.test();
	   //alert(this.page);
	   if(this.currentTotal!=undefined)
        currentTotal=this.currentTotal; 
	   if($(allCheckbox).checked)
	   {
	     for(var i=0;i<currentTotal;i++){
	       $(checkbox+i).checked=true;
	     }
	   }
	   else
	   {
	     for(var i=0;i<currentTotal;i++){
	       $(checkbox+i).checked=false;
	     }
	   }
	}
	this.test=function(){
	  alert("test Function");
	}
	/*********标准按钮形式分页(begin)************/
	this.standarButton=function(disID,objname){
  	  var styleCustomize="style='width:60px;height:20px;border:1px solid #989898;margin-left:0px;'";
	  var text="";
	  text+="<table border='0' cellPadding='5' cellSpacing='1' align='center' style='font-size:12px;'>";
	  text+="<tr>";
	  text+="<td><input type='button' id='firstPage' value='首  页' onclick='"+objname+".firstPage()' "+styleCustomize+"></td>";
	  text+="<td><input type='button' id='previousPage' value='上一页' onclick='"+objname+".previousPage()' "+styleCustomize+"></td>";
	  text+="<td><input type='button' id='nextPage' value='下一页' onclick='"+objname+".nextPage()' "+styleCustomize+"></td>";
	  text+="<td><input type='button' id='lastPage' value='末  页' onclick='"+objname+".lastPage()' "+styleCustomize+"></td>";
	  text+="<td>共<span id='currentPage'></span>页&nbsp;&nbsp;第<input type='text' id='inputPage' onKeyPress='return mustNumber()' style='height:18px;width:18px;border:1px solid #989898;'>页</td>";
	  text+="<td><input type='button' value='提交' onclick='"+objname+".absolutePage()' "+styleCustomize+"></td>";
	  text+="</tr>";
	  text+="</table>";
	  $(disID).innerHTML=text;
	  this.buttonStyle();
	}
	this.standarButton_plus=function(disID,objname){//增加由用户控制每页显示几条,但由于要多查一次数据,所以性能略低
	  var text="";
	  var styleCustomize="style='width:60px;height:20px;border:1px solid #989898;margin-left:1px;font-size:12px;'";
	  text+="<table border='0' cellPadding='5' cellSpacing='1' align='center' style='font-size:12px;'>";
	  text+="<tr>";
	  text+="<td><input type='button' id='firstPage' value='首  页' onclick='"+objname+".firstPage()' "+styleCustomize+"></td>";
	  text+="<td><input type='button' id='previousPage' value='上一页' onclick='"+objname+".previousPage()' "+styleCustomize+"></td>";
	  text+="<td><input type='button' id='nextPage' value='下一页' onclick='"+objname+".nextPage()' "+styleCustomize+"></td>";
	  text+="<td><input type='button' id='lastPage' value='末  页' onclick='"+objname+".lastPage()' "+styleCustomize+"></td>";
	  text+="<td>共<span id='currentPage'></span>页&nbsp;&nbsp;第<input type='text' id='inputPage' onKeyPress='return mustNumber()' style='height:18px;width:18px;border:1px solid #989898;'>页</td>";
	  text+="<td>每页<input type='text' value='' id='eachPageCount' onKeyPress='return mustNumber()' style='height:18px;width:18px;border:1px solid #989898;'>条</td>";
	  text+="<td><input type='button' value='提交' onclick='"+objname+".absolutePage()' "+styleCustomize+"></td>";
	  text+="</tr>";
	  text+="</table>";
	  $(disID).innerHTML=text;
	  this.buttonStyle();
	}
	this.buttonStyle=function()
	{
	   $("currentPage").innerHTML=this.totalPage;
	   $("inputPage").value=this.page;
	   if($("eachPageCount")!=null) $("eachPageCount").value=this.eachPageCount;
	   if(this.page<=1)
	     $("previousPage").disabled=true;
	   else
	     $("previousPage").disabled=false;
	   if(this.page>=this.totalPage)
	     $("nextPage").disabled=true;
	   else
	     $("nextPage").disabled=false;
	 }
	 this.firstPage=function()
	 {
	   this.page=1;
	   if($("eachPageCount")!=null){
 	     this.eachPageCount=parseInt($("eachPageCount").value);
 	     //init();
 	     eval(this.execute_init);
	   }else{
	     //displayContent();
	     eval(this.execute_display);
	   }
	   this.buttonStyle();
	 }
	 this.previousPage=function()
	 {
	   this.page=this.page-1;
	   if($("eachPageCount")!=null){
	     this.eachPageCount=parseInt($("eachPageCount").value);
	     //init();
	     eval(this.execute_init);
	   }else{
	     //displayContent();
	     eval(this.execute_display);
	   }
	   this.buttonStyle();
	 }
	 this.nextPage=function()
	 {
	   this.page=parseInt(this.page+1);
	   if($("eachPageCount")!=null){
 	     this.eachPageCount=parseInt($("eachPageCount").value);
 	     //init();
 	     eval(this.execute_init);
	   }else{
	     //displayContent();
	     eval(this.execute_display);
	   }
	   this.buttonStyle();
	 }
	 this.lastPage=function()
	 {
	   this.page=this.totalPage;
	   if($("eachPageCount")!=null){
	     this.eachPageCount=parseInt($("eachPageCount").value);
	     //init();
	     eval(this.execute_init);
	   }else{
	     //displayContent();
	     eval(this.execute_display);
	   }
	   this.buttonStyle();
	 }
	 this.absolutePage=function()
	 {
	   if(parseInt($("inputPage").value))
	   {
	     this.page=parseInt($("inputPage").value);
	   }
	   else
	   {
	     this.page=1;
	   }
	   if($("eachPageCount")!=null){
		   if(parseInt($("eachPageCount").value))
		   {
		     this.eachPageCount=parseInt($("eachPageCount").value);
		     //init();
		     eval(this.execute_init);
		   }
		   else
		   {
		     this.eachPageCount=10;
		   }
	   }else{
	     if(this.totalPage<this.page){
	        this.page=this.totalPage;
	     }
	     //displayContent();
	     eval(this.execute_display);
	   }
	   this.buttonStyle();
	 }
	 /*********标准按钮形式分页(end)************/
	 ////////////////////////////////////////
	 /*********数字按钮形式分页(begin)**********/
	 this.setPage=function(disPage){
	   this.page=disPage;
	   //displayContent();
	   eval(this.execute_display);
	 }
	 this.digital=function(disID,objname,limit){
		  if(limit<5){
				limit=5;
		  }
		  var styleCustomize="style='margin-left:2px;height:20px;border:1px solid #989898;vertical-align:middle;'";
		  var text="<div style='text-align:center;'>";
		  text+="<input type='button' value='首页' id='digital_firstPageButton' onclick='"+objname+".setPage(1)' "+styleCustomize+">";
		  if(this.page-parseInt(limit/2)>0&&this.page+parseInt(limit/2)<=this.totalPage){
				for(var i=this.page-parseInt(limit/2);i<=this.page+parseInt(limit/2);i++){
					text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+styleCustomize+">";
				}
			}else if(this.page-parseInt(limit/2)<=0){
				if(this.totalPage>=limit){
					for(var i=1;i<=limit;i++){
						text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+styleCustomize+">";
					}
				}else{
					for(var i=1;i<=this.totalPage;i++){
						text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+styleCustomize+">";
					}
				}
			}else if(this.page+parseInt(limit/2)>this.totalPage){
				if(this.totalPage-limit+1<=0){
					for(var i=1;i<=this.totalPage;i++){
						text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+styleCustomize+">";
					}
				}else{
					for(var i=this.totalPage-limit+1;i<=this.totalPage;i++){
						text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+styleCustomize+">";
					}
				}
			}
		  text+="<input type='button' value='尾页' id='digital_lastPageButton' onclick='"+objname+".setPage("+this.totalPage+")' "+styleCustomize+">";
		  text+="<span style='margin-left:10px;'>当前页/总页数:<strong>"+this.page+"</strong>/"+this.totalPage+"</span>";
		  text+="</div>";
		  $(disID).innerHTML=text;
		  $("digital_firstPageButton").style.width="35px";
		  $("digital_lastPageButton").style.width="35px";
	 }
	 this.digital_style_self=function(disID,objname,limit,style_click,style_nomal,name_f,name_e,name_c,name_t){
		  if(limit<5){
				limit=5;
		  }
		  //var text="<div style='text-align:center;'>";
		  var text="<span>";
		  text+="<input type='button' value='"+name_f+"' id='digital_firstPageButton' onclick='"+objname+".setPage(1)' "+style_nomal+">";
		  if(this.page-parseInt(limit/2)>0&&this.page+parseInt(limit/2)<=this.totalPage){
				for(var i=this.page-parseInt(limit/2);i<=this.page+parseInt(limit/2);i++){
				   if(this.page==i){
				     text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_click+">";
				   }else{
					 text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_nomal+">";
				   }
				}
			}else if(this.page-parseInt(limit/2)<=0){
				if(this.totalPage>=limit){
					for(var i=1;i<=limit;i++){
					   if(this.page==i){
				          text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_click+">";
				       }else{
					      text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_nomal+">";
				       }
					}
				}else{
					for(var i=1;i<=this.totalPage;i++){
					   if(this.page==i){
				          text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_click+">";
				       }else{
					      text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_nomal+">";
				       }
					   
					}
				}
			}else if(this.page+parseInt(limit/2)>this.totalPage){
				if(this.totalPage-limit+1<=0){
					for(var i=1;i<=this.totalPage;i++){
					   if(this.page==i){
				          text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_click+">";
				       }else{
					      text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_nomal+">";
				       }
						
					}
				}else{
					for(var i=this.totalPage-limit+1;i<=this.totalPage;i++){
					   if(this.page==i){
				          text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_click+">";
				       }else{
					      text+="<input type='button' value=' "+i+" ' onclick='"+objname+".setPage("+i+")' "+style_nomal+">";
				       }
						
					}
				}
			}
		  text+="<input type='button' value='"+name_e+"' id='digital_lastPageButton' onclick='"+objname+".setPage("+this.totalPage+")' "+style_nomal+">";
		  text+="<span style='margin-left:10px;'>"+name_c+"<b>/</b>"+name_t+":"+this.page+"<b>/</b>"+this.totalPage+"</span>";
		  //text+="</div>";
		  text+="</span>";
		  $(disID).innerHTML=text;
		  $("digital_firstPageButton").style.width="35px";
		  $("digital_lastPageButton").style.width="35px";
	 }
	 /***********数字按钮形式分页(end)**********/
}





