
var baseUtil=new Object;baseUtil={Array:{in_array:function(arr,el){var iRtn=false;if(arr instanceof Array){for(var i in arr){if(arr[i]==el){iRtn=true;break;}}}
return iRtn;},trim:function(arr){if(arr instanceof Array){if(window.jQuery){jQuery.each(arr,function(){});}else{}}},array_filter:function(arr){var arrayTemp=[];if(arr instanceof Array){for(var i=0,len=arr.length;i<len;i++){if(null!=arr[i]&&""!=arr[i]){arrayTemp.push(arr[i]);}}
return arrayTemp;}else{if(arr instanceof Object){for(var i in arr){if(null!=arr[i]&&""!=arr[i]){arrayTemp[i]=arr[i];}}}}}},String:{trim:function(str){if(window.jQuery){str=jQuery.trim(str);}else{str=str.replace(/^\s*|\s*$/,"");}
return str;},is_string:function(str){var iRtn=false;if(typeof str=="string"||str instanceof String){iRtn=true;}
return iRtn;},ucfirst:function(str,flag){flag=flag||"true";if(typeof str=="string"&&str!=null&&str!=''){var prefix=str.substr(0,1);if(flag=="true"){prefix=prefix.toUpperCase();}else{prefix=prefix.toLowerCase();}
return prefix+str.substr(1);}else{return false;}},stringLimit:function(str,length,followedSign){if(baseUtil.empty(str)||!length){return false;}}},Number:{is_numeric:function(num){var iRtn=false;if(typeof num=="number"){iRtn=true;}
return iRtn;}},Date:{},Object:{"is_function":function(oFunc){if(window.jQuery){return jQuery.isFunction(oFunc)}else{if(oFunc instanceof Function){return true;}else{return false;}}}},Debug:{},empty:function(value){var isEmpty=true;if(typeof value=="string"||value instanceof Array){if(value.length){isEmpty=false;}}else{for(var i in value){if(null!=value[i]&&""!=value[i]){isEmpty=false;break;}}}
return isEmpty;},innerSize:function(){var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=='number'){myWidth=window.innerWidth;myHeight=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=document.body.clientWidth||0;myHeight=document.body.clientHeight||0;}
return[myWidth,myHeight];},getQueryValue:function(panStr){var sorStr=document.location.search;panStr2=panStr.toLowerCase()+"=";var vStr="";if(sorStr==null||sorStr==""||panStr==null||panStr==""){return vStr;}
sorStr2=sorStr.toLowerCase();panStr+="=";var itmp=sorStr2.indexOf(panStr2);if(itmp<0){return vStr;}
sorStr=sorStr.substr(itmp+panStr.length);itmp=sorStr.indexOf("&");if(itmp<0){return sorStr;}else{sorStr=sorStr.substr(0,itmp);return sorStr;}},selectboxs:function(){var msg='';if(!window.jQuery){msg+='--------------------------------------------------------\n';msg+=' please check if include the jQuery lib! \n';msg+='--------------------------------------------------------\n';alert(msg);return false;}
if(!jQuery("#selectboxs").length||!jQuery("#selectAll").length){msg+='-----------------------------------------------------------------------------------------------------\n';msg+=' please set the TABLE id to "selectboxs" or set the SELECT ALL to "selectAll"\n';msg+='-----------------------------------------------------------------------------------------------------\n';alert(msg);return false;}
var self=this;self._selectAllCheckbox();self._selectSingleCheckbox();return true;},_selectAllCheckbox:function(){if(jQuery("table#selectboxs").length&&jQuery("#selectAll").length){var chk=jQuery("table#selectboxs").find("input[@type=checkbox]");var trs=jQuery("table#selectboxs > tbody > tr").filter(function(){return jQuery(this).find("input[@type=checkbox]").length>0;});jQuery("#selectAll").toggle(function(){chk.attr("checked","checked");trs.removeClass().addClass("be-choose");},function(){chk.removeAttr("checked");trs.removeClass("be-choose");});}},_selectSingleCheckbox:function(){if(jQuery("table#selectboxs").length){jQuery("table#selectboxs > tbody > tr").filter(function(){return jQuery(this).find("input[@type=checkbox]").length>0;}).click(function(){jQuery(this).removeAttr().toggleClass("be-choose");var chk=jQuery(this).find("input[@type=checkbox]");if(jQuery(this).attr("class")=="be-choose"){chk.attr("checked","checked");}else{chk.removeAttr("checked");}});}},processSend:function(formAction,name,value,info,url,formName,method,target){formName=formName||"form1";formAction=formAction||"";method=method||"post";target=target||"";url=url||"";var form=document.forms[formName];if(""==url&&(typeof currentProcessUrl!="undefined"&&""!=currentProcessUrl)){url=currentProcessUrl;}
if("undefined"!=url&&""!=url){form.action=url;}
form.method=method;if(""!=target){form.target=target;}
form.elements["formAction"].value=formAction;if(value){if(form.elements[name]&&(form.elements[name].type=="input"||form.elements[name].type=="hidden")){form.elements[name].value=value;}}else{for(var i=0,j=0;i<form.elements.length;i++)
if(form.elements[i].type=="checkbox"&&form.elements[i].checked&&(form.elements[i].name==name+"[]"||form.elements[i].name==name))j++;if(!j){alert("您还没有选择项目！");return false;}}
if(info&&!confirm(info)){return false;}
form.submit();return false;},requestJs:function(url,option){if(!option)return;if(option.onLoading)option.onLoading(true);var script=document.createElement('script');script.charset='utf-8';script.src=url;script[document.all?"onreadystatechange":"onload"]=function(){if(!document.all||script.readyState=='loaded'||script.readyState=='complete'){if(option.onLoading)option.onLoading(false);if(option.onComplete)option.onComplete();}};var jsParent=document.body||document.getElementsByTagName('head')[0];jsParent.appendChild(script);},__destruct:function(){}};var ef_jsData={};