/* * File: KeyTable.min.js * Version: 1.1.6 * Author: Allan Jardine (www.sprymedia.co.uk) * * Copyright 2009-2011 Allan Jardine, all rights reserved. * * This source file is free software, under either the GPL v2 license or a * BSD (3 point) style license, as supplied with this software. * * This source file is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. */ function KeyTable(q){this.block=false;this.event={remove:{}};this.fnGetCurrentPosition=function(){return[c,a] };this.fnGetCurrentData=function(){return m.innerHTML};this.fnGetCurrentTD=function(){return m };this.fnSetPosition=function(H,I){if(typeof H=="object"&&H.nodeName){b(H)}else{b(E(H,I)) }};var f=null;var m=null;var c=null;var a=null;var G=null;var i="focus";var w=false; var r={action:[],esc:[],focus:[],blur:[]};var e=null;var n;var s;var C=false;function B(H){return function(I,L,K){if((I===null||typeof I=="number")&&(L===null||typeof L=="number")&&typeof K=="function"){x(H,I,L,K) }else{if(typeof I=="object"&&typeof L=="function"){var J=j(I);x(H,J[0],J[1],L)}else{alert("Unhandable event type was added: x"+I+" y:"+L+" z:"+K) }}}}function d(H){return function(I,L,K){if((I===null||typeof arguments[0]=="number")&&(L===null||typeof arguments[1]=="number")){if(typeof arguments[2]=="function"){F(H,I,L,K) }else{F(H,I,L)}}else{if(typeof arguments[0]=="object"){var J=j(I);if(typeof arguments[1]=="function"){F(H,J[0],J[1],L) }else{F(H,J[0],J[1])}}else{alert("Unhandable event type was removed: x"+I+" y:"+L+" z:"+K) }}}}for(var o in r){if(o){this.event[o]=B(o);this.event.remove[o]=d(o)}}function x(K,H,J,I){r[K].push({x:H,y:J,fn:I}) }function F(N,I,M,K){var L=0;for(var J=0,H=r[N].length;J=J.fnDisplayEnd()){if(J._iDisplayLength>=0){if(J._iDisplayStart+J._iDisplayLength=0?J._iDisplayStart-J._iDisplayLength:0; if(J._iDisplayStart<0){J._iDisplayStart=0}e.oApi._fnCalculateEnd(J)}e.oApi._fnDraw(J); w=Q}var N=j(M);m=M;c=N[0];a=N[1];var R,T,L,O,H,I,S;if(U){R=document.documentElement.clientHeight; T=document.documentElement.clientWidth;L=document.body.scrollTop||document.documentElement.scrollTop; O=document.body.scrollLeft||document.documentElement.scrollLeft;H=M.offsetHeight; I=M.offsetWidth;S=y(M);if(S[1]+H>L+R){z(S[1]+H-R)}else{if(S[1]O+T){t(S[0]+I-T) }else{if(S[0]R+L){K.scrollTop=(M.offsetTop+H)-R}else{if(M.offsetTopT+O){K.scrollLeft=(M.offsetLeft+I)-T}else{if(M.offsetLeft0){I=c-1;O=a}else{if(a>0){I=L-1;O=a-1}else{if(J==-1&&n){C=true; s.focus();setTimeout(function(){C=false},0);w=false;u();return true}else{return false }}}break;case 38:if(a>0){I=c;O=a-1}else{return false}break;case 9:case 39:if(ctd:eq("+H+")",f)[0]}}function j(I){if(e){var H=e.fnSettings(); return[jQuery("td",I.parentNode).index(I),jQuery("tr",I.parentNode.parentNode).index(I.parentNode)+H._iDisplayStart] }else{return[jQuery("td",I.parentNode).index(I),jQuery("tr",I.parentNode.parentNode).index(I.parentNode)] }}function z(H){document.documentElement.scrollTop=H;document.body.scrollTop=H}function t(H){document.documentElement.scrollLeft=H; document.body.scrollLeft=H}function y(J){var I=0;var H=0;if(J.offsetParent){I=J.offsetLeft; H=J.offsetTop;J=J.offsetParent;while(J){I+=J.offsetLeft;H+=J.offsetTop;J=J.offsetParent }}return[I,H]}function g(O){var M=e.fnSettings();for(var K=0,H=M.aiDisplay.length; K