
//通用选择删除条目（反选-全选）-------------
function CheckAll(form)
{for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}}

//打开页面--------------------------------
function openwin(url,name,iWidth,iHeight)
 {
  var url;                            //转向网页的地址;
  var name;                           //网页名称，可为空;
  var iWidth;                         //弹出窗口的宽度;
  var iHeight;                        //弹出窗口的高度;
  var iTop = (window.screen.availHeight-30-iHeight)/2;       //获得窗口的垂直位置;
  var iLeft = (window.screen.availWidth-10-iWidth)/2;           //获得窗口的水平位置;
  window.open(url,name,'height='+iHeight+',innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=yes,resizeable=no,location=no,status=no');
 }
 
function trim(str){return str.replace(/(^\s*)|(\s*$)/g, "");} //删除左右两端的空格
function ltrim(str){return str.replace(/(^\s*)/g,"");} //删除左边的空格
function rtrim(str){return str.replace(/(\s*$)/g,"");} //删除右边的空格
function $Obj(objname){return document.getElementById(objname);}

//鼠标移动动作--------------------------------
function trOver(trObj){trObj.style.backgroundColor="#ffff88";}
function trOut(trObj){trObj.style.backgroundColor="#ffffff";}

function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";}
function $(s){return document.getElementById(s);}

//创建编辑器--------------------------------
KindEditor.ready(function(K) {
	var editor = K.create('textarea[name="ItemNote"]', {
		uploadJson : '../inc/upload_json.asp',
		fileManagerJson : '../inc/file_manager_json.asp',
		allowFileManager : true
	});
});
