function by(d,h){function l(){ag(document,"keydown",G);ag(j,"blur",z);ag(document,"keypress",H)}function z(c){az(document,"keydown",G);az(j,"blur",z);az(document,"keypress",H);q()}function I(c){if(b.am.length>0)var e=m[s].ar().ai(),n=m[s].ar().length;else{e=j.value.ai();n=j.value.length}var v="",A=c.search(b.aG?new RegExp("^"+e,"i"):new RegExp(e,"i"));for(e=0;e<A;e++)v+=c.substr(e,1);v+="<font style='"+b.bg+"'>";for(e=A;e<n+A;e++)v+=c.substr(e,1);v+="</font>";for(e=n+A;e<c.length;e++)v+=c.substr(e,
1);return v}function V(){if(document.getElementById("tat_table")){r=false;document.body.removeChild(document.getElementById("tat_table"))}if(B==0)r=false;else{a=document.createElement("table");a.cellSpacing="1px";a.cellPadding="2px";a.style.position="absolute";a.style.zIndex=b.aT;a.style.border=b.aK;a.style.width=b.aS;a.style.top=eval(aQ(j)+j.offsetHeight)+"px";a.style.left=aP(j)+"px";a.style.backgroundColor=b.H;a.id="tat_table";document.body.appendChild(a);var c;c=true;var e=1;if(b.aa){a.onmouseout=
K;a.onmouseover=L}var n=0;for(c=0;c<b.L.length;c++){if(w[c]){n++;F=a.insertRow(-1);F.style.backgroundColor=b.H;F.id="tat_tr"+e;f=F.insertCell(-1);f.style.color=b.ah;f.style.fontFamily=b.aH;f.style.fontSize=b.ao;f.innerHTML=I(b.L[c]);f.id="tat_td"+e;f.setAttribute("pos",e);if(b.aa){f.style.cursor="pointer";f.onclick=M;f.onmouseover=N}e++}if(e-1==b.bf&&e<y){F=a.insertRow(-1);F.style.backgroundColor=b.H;f=F.insertCell(-1);f.style.color=b.ah;f.style.fontFamily="arial narrow";f.style.fontSize=b.ao;f.align=
"center";ay(f,"\\/");if(b.aa){f.style.cursor="pointer";f.onclick=O}break}}t=1;u=e-1;r=true}}function P(){document.body.removeChild(document.getElementById("tat_table"));a=document.createElement("table");a.cellSpacing="1px";a.cellPadding="2px";a.style.position="absolute";a.style.zIndex=b.aT;a.style.border=b.aK;a.style.width=b.aS;a.style.top=eval(aQ(j)+j.offsetHeight)+"px";a.style.left=aP(j)+"px";a.style.backgroundColor=b.H;a.id="tat_table";if(b.aa){a.onmouseout=K;a.onmouseover=L}document.body.appendChild(a);
var c;c=true;var e=1;if(t>1){F=a.insertRow(-1);F.style.backgroundColor=b.H;f=F.insertCell(-1);f.style.color=b.ah;f.style.fontFamily="arial narrow";f.style.fontSize=b.ao;f.align="center";ay(f,"/\\");if(b.aa){f.style.cursor="pointer";f.onclick=W}}for(c=0;c<b.L.length;c++){if(w[c]){if(e>=t&&e<=u){F=a.insertRow(-1);F.style.backgroundColor=b.H;F.id="tat_tr"+e;f=F.insertCell(-1);f.style.color=b.ah;f.style.fontFamily=b.aH;f.style.fontSize=b.ao;f.innerHTML=I(b.L[c]);f.id="tat_td"+e;f.setAttribute("pos",e);
if(b.aa){f.style.cursor="pointer";f.onclick=M;f.onmouseover=N}}e++}if(e>u)break}if(e-1<y){F=a.insertRow(-1);F.style.backgroundColor=b.H;f=F.insertCell(-1);f.style.color=b.ah;f.style.fontFamily="arial narrow";f.style.fontSize=b.ao;f.align="center";ay(f,"\\/");if(b.aa){f.style.cursor="pointer";f.onclick=O}}}function X(){if(r){if(g==null||g==0)g=1;if(g!=1){document.getElementById("tat_tr"+g).style.backgroundColor=b.H;g--;g<t&&C();document.getElementById("tat_tr"+g).style.backgroundColor=b.an;k&&clearTimeout(k);
if(b.G>0)k=setTimeout(function(){p=0;q()},b.G)}}}function Y(){if(r)if(g!=y){if(g>0)document.getElementById("tat_tr"+g).style.backgroundColor=b.H;g++;g>u&&D();document.getElementById("tat_tr"+g).style.backgroundColor=b.an;k&&clearTimeout(k);if(b.G>0)k=setTimeout(function(){p=0;q()},b.G)}}function D(){t++;u++;P()}function C(){t--;u--;P()}function O(){document.getElementById("tat_tr"+g).style.backgroundColor=b.H;g++;D();document.getElementById("tat_tr"+g).style.backgroundColor=b.an;j.focus();p=0;k&&
clearTimeout(k);if(b.G>0)k=setTimeout(function(){p=0;q()},b.G)}function W(c){c||(c=event);if(c.stopPropagation)c.stopPropagation();else c.cancelBubble=true;document.getElementById("tat_tr"+g).style.backgroundColor=b.H;g--;C();document.getElementById("tat_tr"+g).style.backgroundColor=b.an;j.focus();p=0;k&&clearTimeout(k);if(b.G>0)k=setTimeout(function(){p=0;q()},b.G)}function M(c){if(r){p=0;g=this.getAttribute("pos");R()}}function L(){p=1}function K(){p=0;k&&clearTimeout(k);if(b.G>0)k=setTimeout(function(){p=
0;q()},b.G)}function N(){p=1;if(g==null||g==0)g=1;document.getElementById("tat_tr"+g).style.backgroundColor=b.H;for(g=this.getAttribute("pos");g<t;)C();for(;g>u;)D();document.getElementById("tat_tr"+g).style.backgroundColor=b.an;k&&clearTimeout(k);if(b.G>0)k=setTimeout(function(){p=0;q()},b.G)}function Z(c){if(b.am.length>0){U="";for(i=J=0;i<m.length;i++){if(s==i){aZ=aX="";aV=false;for(o=0;o<m[i].length;++o){if(m[i].charAt(o)!=" "){aV=true;break}aZ+=" "}for(o=m[i].length-1;o>=0;--o){if(m[i].charAt(o)!=
" ")break;aX+=" "}U+=aZ;U+=c;J=U.length;if(aV)U+=aX}else U+=m[i];if(i!=m.length-1)U+=S[i]}j.value=U;bd(j,J)}else j.value=c;p=0;q()}function R(){if(r){r=false;for(var c="",e=0,n=0;n<=b.L.length;n++){w[n]&&e++;if(e==g){c=b.L[n];break}}Z(c);J=aA(j);$()}}function $(){document.getElementById(b.aJ)!=null&&document.getElementById(b.aJ).submit()}function q(){if(p==0){r=0;document.getElementById("tat_table")&&document.body.removeChild(document.getElementById("tat_table"));k&&clearTimeout(k)}}function H(c){x&&
bh(c);return!x}function G(c){c||(c=event);a=c.keyCode;bu=aA(j);x=0;switch(a){case 38:X();x=1;return false;case 40:Y();x=1;return false;case 13:case 9:if(r&&g>0){x=1;R();return false}else return true;default:setTimeout(function(){aa(a)},50);break}}function aa(c){if(!(c==38||c==40||c==13)){if(r){var e=0,n=0;for(c=0;c<=b.L.length;c++){w[c]&&n++;if(n==g){e=c;break}}E=e}else E=-1;if(j.value==""){p=0;q()}else{if(b.am.length>0){bu=aA(j);aR=be(j);aq="";for(c=0;c<b.am.length;c++)aq+=b.am[c];aq=aq.ai();aU=
new RegExp("(["+aq+"])");n=0;m=[];m[0]="";c=0;for(o=j.value.length;c<j.value.length;c++,o--)if(j.value.substr(c,o).search(aU)==0){bn=j.value.substr(c,o).match(aU);S[n]=bn[1];n++;m[n]=""}else m[n]+=j.value.charAt(c);e=0;s=-1;for(c=0;c<m.length;c++){if(aR>=e&&aR<=e+m[c].length)s=c;e+=m[c].length+1}c=m[s].ar();e=m[s].ai().ar()}else{c=j.value;e=j.value.ai()}if(c.length==0){p=0;q()}if(c.length<b.bc)return this;e=b.aG?new RegExp("^"+e,"i"):new RegExp(e,"i");y=0;T=false;for(c=B=0;c<b.L.length;c++){w[c]=
false;if(e.test(b.L[c])){y++;w[c]=true;B++;if(E==c)T=true}}k&&clearTimeout(k);if(b.G>0)k=setTimeout(function(){p=0;q()},b.G);V()}}}this.G=-1;this.bf=10;this.aG=false;this.aa=true;this.am=new Array(";",",");this.bc=1;this.aJ="searchSite";this.H="#FFFFFF";this.ah="#000000";this.aK="1px solid #000000";this.an="#FFE597";this.aH="Arial,Helvetica,sans-serif";this.ao="10px";this.bg='text-decoration:underline;font-weight="bold"';this.aS="200px";this.aT="30";var m=[],s=0,S=[],r=false,g=0,y=0,j=null,t=0,u=
0,w=[],E=0,k,T=false,ba="",p=1,B=0,x=false;this.L=[];this.L=h;var b=this;j=d;ag(j,"focus",l);return this}function ag(d,h,l){if(d.attachEvent)d.attachEvent("on"+h,l);else if(d.addEventListener)d.addEventListener(h,l,true);else d["on"+h]=l}function az(d,h,l){if(d.detachEvent)d.detachEvent("on"+h,l);else if(d.removeEventListener)d.removeEventListener(h,l,true);else d["on"+h]=null}
function bh(d){if(d.stopPropagation){d.stopPropagation();d.preventDefault()}else if(typeof d.cancelBubble!="undefined"){d.cancelBubble=true;d.returnValue=false}return false}function bB(d){return window.event?window.event.srcElement:d.currentTarget}function bC(d){return window.event?window.event.srcElement:d.target}function bx(d){typeof d.onselectstart!="undefined"&&ag(d,"selectstart",function(){return false})}
function be(d){if(typeof d.selectionEnd!="undefined")return d.selectionEnd;else if(document.selection&&document.selection.createRange){var h=document.selection.createRange();try{var l=h.duplicate();l.moveToElementText(d)}catch(z){l=d.createTextRange()}l.setEndPoint("EndToEnd",h);h=l.text.length;if(h>d.value.length)return-1;return h}}
function aA(d){if(typeof d.selectionStart!="undefined")return d.selectionStart;else if(document.selection&&document.selection.createRange){var h=document.selection.createRange();try{var l=h.duplicate();l.moveToElementText(d)}catch(z){l=d.createTextRange()}l.setEndPoint("EndToStart",h);h=l.text.length;if(h>d.value.length)return-1;return h}}
function bd(d,h){d.focus();if(d.setSelectionRange)d.setSelectionRange(h,h);else if(d.createTextRange){Q=d.createTextRange();Q.moveStart("character",h);Q.collapse();Q.select()}}function bA(d,h,l){d.focus();if(d.setSelectionRange)d.setSelectionRange(h,l);else if(d.createTextRange){Q=d.createTextRange();Q.moveStart("character",h);Q.moveEnd("character",l);Q.select()}}String.prototype.ai=function(){return this.replace(/(["\\\.\|\[\]\^\*\+\?\$\(\)])/g,"\\$1")};
String.prototype.ar=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")};function aQ(d){for(al=0;d;){al+=d.offsetTop;d=d.offsetParent}return al}function aP(d){for(al=0;d;){al+=d.offsetLeft;d=d.offsetParent}return al}function bD(d){return typeof d=="number"&&isFinite(d)}function ay(d,h){for(;bq=d.childNodes[0];)d.removeChild(bq);d.appendChild(document.createTextNode(h))};

