function HelpCmd(){this.helpkey="help";this.run=function(c,b){service="help";if(c){c=c.toLowerCase();var a=functions[c];if(a){service+="/"+a.helpcmd}else{if(c=="more"){service+="/"+c}else{service+="/notfound"}}}serviceCall(service,{cmd:c},function(d){outprint(d)})}}function JsqCmd(){this.helpcmd="calc";this.validfuncs={abs:true,sin:true,asin:true,cos:true,acos:true,tan:true,atan:true,exp:true,log:true,pow:true,sqrt:true,PI:true,E:true};this.run=function(cmd){if(cmd){cmd=" "+cmd;var arr=cmd.match(/[A-Za-z]+\s*\(/g);if(arr&&arr.length>0){for(var i=0;i<arr.length;i++){var funname=arr[i].match(/[A-Za-z]+/)[0];if(!this.validfuncs[funname]){return"<?php echo SYS_11;?>"+funname}}}var expr=cmd.replace(/([A-Za-z]+)/g,"$$$1");try{return eval(expr)}catch(e){return cmd+"<?php echo SYS_12;?>"}}else{return this.help}}}var $PI=Math.PI;var $E=Math.E;function $abs(a){return Math.abs(a)}function $sin(a){return Math.sin(a)}function $cos(a){return Math.cos(a)}function $tan(a){return Math.tan(a)}function $asin(a){return Math.asin(a)}function $acos(a){return Math.acos(a)}function $atan(a){return Math.atan(a)}function $exp(a){return Math.exp(a)}function $log(a){return Math.log(a)}function $pow(a,b){return Math.pow(a,b)}function $sqrt(a){return Math.sqrt(a)}function ClearCmd(){this.helpcmd="cls";this.run=function(){cmdout=null;output.innerHTML="";bottom0.innerHTML=""}}function TinyCmd(){this.helpcmd="tiny";this.run=function(a){serviceCall("cmdsys/tiny2",{q:a},function(b){outprint(b)})}};