var dictPath="dictionary/enczTAB.dic";var lineNo=0;var lineLength=30;var xCol=1;var scrollingOffset=0;var formatedDefinition=[];var resultsSize=0;var lineCount=9;var definition="";var threeButton=false;var keyMap=[["","CLR","BS"],["a","b","c"],["d","e","f"],["g","h","i"],["j","k","l"],["m","n","o"],["p","q","r"],["s","t","u"],["v","w","x"],["y","z"," "]];var dump=function(b){for(var a in b){this.bubble("tracelog",a+" => "+b);}};var dumpToString=function(b,h,e){var k=typeof b;if(k=="string"||k=="boolean"||k=="number"){return"'"+b+"'("+k+")";}if(typeof e=="undefined"){e=1;}if(k=="undefined"){return"undefined";}if(b===null){return"null";}if(k=="function"){return"a function";}if(b.constructor==Array){var m="Array("+b.length+")";if(e>0){m+=" dumping\n";for(var f=0,c=b.length;f<c;f++){m+=h+"["+f+"] => "+this.dumpToString(b[f],h+"\t",e-1)+"\n";}}if(m.charAt(m.length-1)=="\n"){m=m.substring(0,m.length-1);}return m;}if(k!="object"){return"unknown entitiy of type ("+(typeof b)+")";}if(e<1){return"an object";}if(typeof h=="undefined"){h="";}var j="dumping\n";var l=false;for(var a in b){l=true;try{var d=b[a];j+=h+a+" => "+this.dumpToString(d,h+"\t",e-1)+"\n";}catch(g){j+=h+a+" => failed to tostring: "+g+"\n";}}if(!l){return"an object with no properties";}if(j.charAt(j.length-1)=="\n"){j=j.substring(0,j.length-1);}return j;};var fileToString=function(b){var c;try{c=new Stream.File(b);return c.toString();}catch(a){}finally{try{c.close();}catch(d){}}return null;};target.getSoValue=function(b,a){this.bubble("tracelog","getSoValue");this.bubble("tracelog","obj"+b+" propName "+a);if(a===undefined){return FskCache.mediaMaster.getInstance.call(this,b);}else{return FskCache.mediaMaster.getInstance.call(b,a);}};var runCommand=function(a){};var runCommandResult=function(a){};target.exitApp=function(){kbook.autoRunRoot.exitIf(kbook.model);};target.clearInput=function(){this.inputLine.setValue("");};target.clearStatus=function(){this.statusLine.setValue("");};target.clearLines=function(){};target.showHourGlass=function(a){this.hourGlass.show(a);this.hourGlass.invalidate();if(a){}};target.changeSize=function(){};target.txtFormat=function(){var a=[];var h="";var f=0;var c=0;var d=0;var b=0;var e=true;var g="•";while(f<definition.length){b=definition.indexOf("\t",f);if(b==-1){h+=g+definition.slice(f,definition.length);break;}h+=g+definition.slice(f,b)+"\n";f=b+1;}this.textlines.setValue(h);return a;};target.doScroll=function(){};target.moveCursor=function(a){if(a=="left"){if(--xCol<0){xCol=2;}}if(a=="right"){if(++xCol>2){xCol=0;}}this.lineCursor.changeLayout(457+xCol*48,undefined,undefined,627,undefined,undefined);};target.arrowKey=function(a){if(a=="left"){if(threeButton){xCol=0;}else{this.findNeighbour(-1);}}if(a=="right"){if(threeButton){xCol=2;}else{this.findNeighbour(1);}}if(a=="up"){}if(a=="down"){}this.lineCursor.changeLayout(457+xCol*48,undefined,undefined,627,undefined,undefined);};target.pressDigit=function(d){var b=keyMap[d][xCol];var c=false;if(b===""){return;}if(b=="BS"){var a=this.inputLine.getValue();this.inputLine.setValue(a.slice(0,a.length-1));c=true;}if(b=="CLR"){c=true;this.clearInput();this.clearLines();}if(!c){this.inputLine.setValue(this.inputLine.getValue()+b);}};target.centerKey=function(){this.inputLine.setValue("old center");this.bubble("tracelog","m:doCenter");};