function by(g,bl){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 C=new Array();var V=0;var aN=new Array();var I=false;var k=0;var aj=0;var v=null;var R=0;var T=0;var ac=new Array();var aw=0;var B;var aO=false;var bz="";var D=1;var as=0;var af=false;this.L=new Array();this.L=bl;var d=this;v=g;ag(v,"focus",bm);function bm(){ag(document,"keydown",aI);ag(v,"blur",aM);ag(document,"keypress",aL)}function aM(A){if(!A){A=event}az(document,"keydown",aI);az(v,"blur",aM);az(document,"keypress",aL);K()}function aE(n){if(d.am.length>0){var P=C[V].ar().ai();var at=C[V].ar().length}else{var P=v.value.ai();var at=v.value.length}var ae="";var i;if(d.aG){var ak=new RegExp("^"+P,"i")}else{var ak=new RegExp(P,"i")}var p=n.search(ak);for(i=0;i<p;i++){ae+=n.substr(i,1)}ae+="<font style='"+(d.bg)+"'>";for(i=p;i<at+p;i++){ae+=n.substr(i,1)}ae+="</font>";for(i=at+p;i<n.length;i++){ae+=n.substr(i,1)}return ae}function bw(){if(document.getElementById("tat_table")){I=false;document.body.removeChild(document.getElementById("tat_table"))}if(as==0){I=false;return }a=document.createElement("table");a.cellSpacing="1px";a.cellPadding="2px";a.style.position="absolute";a.style.zIndex=d.aT;a.style.border=d.aK;a.style.width=d.aS;a.style.top=eval(aQ(v)+v.offsetHeight)+"px";a.style.left=aP(v)+"px";a.style.backgroundColor=d.H;a.id="tat_table";document.body.appendChild(a);var i;var first=true;var o=1;if(d.aa){a.onmouseout=bb;a.onmouseover=aY}var bt=0;for(i=0;i<d.L.length;i++){if(ac[i]){bt++;F=a.insertRow(-1);F.style.backgroundColor=d.H;F.id="tat_tr"+(o);f=F.insertCell(-1);f.style.color=d.ah;f.style.fontFamily=d.aH;f.style.fontSize=d.ao;f.innerHTML=aE(d.L[i]);f.id="tat_td"+(o);f.setAttribute("pos",o);if(d.aa){f.style.cursor="pointer";f.onclick=aF;f.onmouseover=aW}o++}if(o-1==d.bf&&o<aj){F=a.insertRow(-1);F.style.backgroundColor=d.H;f=F.insertCell(-1);f.style.color=d.ah;f.style.fontFamily="arial narrow";f.style.fontSize=d.ao;f.align="center";ay(f,"\\/");if(d.aa){f.style.cursor="pointer";f.onclick=aC}break}}R=1;T=o-1;I=true}function ba(){document.body.removeChild(document.getElementById("tat_table"));a=document.createElement("table");a.cellSpacing="1px";a.cellPadding="2px";a.style.position="absolute";a.style.zIndex=d.aT;a.style.border=d.aK;a.style.width=d.aS;a.style.top=eval(aQ(v)+v.offsetHeight)+"px";a.style.left=aP(v)+"px";a.style.backgroundColor=d.H;a.id="tat_table";if(d.aa){a.onmouseout=bb;a.onmouseover=aY}document.body.appendChild(a);var i;var first=true;var o=1;if(R>1){F=a.insertRow(-1);F.style.backgroundColor=d.H;f=F.insertCell(-1);f.style.color=d.ah;f.style.fontFamily="arial narrow";f.style.fontSize=d.ao;f.align="center";ay(f,"/\\");if(d.aa){f.style.cursor="pointer";f.onclick=bi}}for(i=0;i<d.L.length;i++){if(ac[i]){if(o>=R&&o<=T){F=a.insertRow(-1);F.style.backgroundColor=d.H;F.id="tat_tr"+(o);f=F.insertCell(-1);f.style.color=d.ah;f.style.fontFamily=d.aH;f.style.fontSize=d.ao;f.innerHTML=aE(d.L[i]);f.id="tat_td"+(o);f.setAttribute("pos",o);if(d.aa){f.style.cursor="pointer";f.onclick=aF;f.onmouseover=aW}o++}else{o++}}if(o>T){break}}if(o-1<aj){F=a.insertRow(-1);F.style.backgroundColor=d.H;f=F.insertCell(-1);f.style.color=d.ah;f.style.fontFamily="arial narrow";f.style.fontSize=d.ao;f.align="center";ay(f,"\\/");if(d.aa){f.style.cursor="pointer";f.onclick=aC}}}function bk(){if(!I){return }if(k==null||k==0){k=1}if(k==1){return }document.getElementById("tat_tr"+k).style.backgroundColor=d.H;k--;if(k<R){aB()}document.getElementById("tat_tr"+k).style.backgroundColor=d.an;if(B){clearTimeout(B)}if(d.G>0){B=setTimeout(function(){D=0;K()},d.G)}}function bv(){if(!I){return }if(k==aj){return }if(k>0){document.getElementById("tat_tr"+k).style.backgroundColor=d.H}k++;if(k>T){ax()}document.getElementById("tat_tr"+k).style.backgroundColor=d.an;if(B){clearTimeout(B)}if(d.G>0){B=setTimeout(function(){D=0;K()},d.G)}}function ax(){R++;T++;ba()}function aB(){R--;T--;ba()}function aC(){document.getElementById("tat_tr"+k).style.backgroundColor=d.H;k++;ax();document.getElementById("tat_tr"+k).style.backgroundColor=d.an;v.focus();D=0;if(B){clearTimeout(B)}if(d.G>0){B=setTimeout(function(){D=0;K()},d.G)}}function bi(A){if(!A){A=event}if(A.stopPropagation){A.stopPropagation()}else{A.cancelBubble=true}document.getElementById("tat_tr"+k).style.backgroundColor=d.H;k--;aB();document.getElementById("tat_tr"+k).style.backgroundColor=d.an;v.focus();D=0;if(B){clearTimeout(B)}if(d.G>0){B=setTimeout(function(){D=0;K()},d.G)}}function aF(A){if(!A){A=event}if(!I){return }D=0;k=this.getAttribute("pos");aD()}function aY(){D=1}function bb(){D=0;if(B){clearTimeout(B)}if(d.G>0){B=setTimeout(function(){D=0;K()},d.G)}}function aW(){D=1;if(k==null||k==0){k=1}document.getElementById("tat_tr"+k).style.backgroundColor=d.H;k=this.getAttribute("pos");while(k<R){aB()}while(k>T){ax()}document.getElementById("tat_tr"+k).style.backgroundColor=d.an;if(B){clearTimeout(B)}if(d.G>0){B=setTimeout(function(){D=0;K()},d.G)}}function bj(a){if(d.am.length>0){U="";J=0;for(i=0;i<C.length;i++){if(V==i){aZ=aX="";aV=false;for(o=0;o<C[i].length;++o){if(C[i].charAt(o)!=" "){aV=true;break}aZ+=" "}for(o=C[i].length-1;o>=0;--o){if(C[i].charAt(o)!=" "){break}aX+=" "}U+=aZ;U+=a;J=U.length;if(aV){U+=aX}}else{U+=C[i]}if(i!=C.length-1){U+=aN[i]}}v.value=U;bd(v,J)}else{v.value=a}D=0;K()}function aD(){if(!I){return }I=false;var word="";var f=0;for(var i=0;i<=d.L.length;i++){if(ac[i]){f++}if(f==k){word=d.L[i];break}}bj(word);J=aA(v);bp()}function bp(){if(document.getElementById(d.aJ)!=null){var bs=document.getElementById(d.aJ);bs.submit()}}function K(){if(D==0){I=0;if(document.getElementById("tat_table")){document.body.removeChild(document.getElementById("tat_table"))}if(B){clearTimeout(B)}}}function aL(e){if(af){bh(e)}return !af}function aI(A){if(!A){A=event}a=A.keyCode;bu=aA(v);af=0;switch(a){case 38:bk();af=1;return false;break;case 40:bv();af=1;return false;break;case 13:case 9:if(I&&k>0){af=1;aD();return false}else{return true}break;default:setTimeout(function(){bo(a)},50);break}}function bo(av){if(av==38||av==40||av==13){return }var i;if(I){var word=0;var f=0;for(var i=0;i<=d.L.length;i++){if(ac[i]){f++}if(f==k){word=i;break}}aw=word}else{aw=-1}if(v.value==""){D=0;K();return }if(d.am.length>0){bu=aA(v);aR=be(v);aq="";for(i=0;i<d.am.length;i++){aq+=d.am[i]}aq=aq.ai();aU=new RegExp("(["+aq+"])");f=0;C=new Array();C[0]="";for(i=0,o=v.value.length;i<v.value.length;i++,o--){if(v.value.substr(i,o).search(aU)==0){bn=v.value.substr(i,o).match(aU);aN[f]=bn[1];f++;C[f]=""}else{C[f]+=v.value.charAt(i)}}var J=0;V=-1;for(i=0;i<C.length;i++){if(aR>=J&&aR<=J+C[i].length){V=i}J+=C[i].length+1}var au=C[V].ar();var P=C[V].ai().ar()}else{var au=v.value;var P=v.value.ai()}if(au.length==0){D=0;K()}if(au.length<d.bc){return this}if(d.aG){var ak=new RegExp("^"+P,"i")}else{var ak=new RegExp(P,"i")}aj=0;aO=false;as=0;for(i=0;i<d.L.length;i++){ac[i]=false;if(ak.test(d.L[i])){aj++;ac[i]=true;as++;if(aw==i){aO=true}}}if(B){clearTimeout(B)}if(d.G>0){B=setTimeout(function(){D=0;K()},d.G)}bw()}return this}function ag(B,C,A){if(B.attachEvent){B.attachEvent("on"+C,A)}else{if(B.addEventListener){B.addEventListener(C,A,true)}else{B["on"+C]=A}}}function az(B,C,A){if(B.detachEvent){B.detachEvent("on"+C,A)}else{if(B.removeEventListener){B.removeEventListener(C,A,true)}else{B["on"+C]=null}}}function bh(B){B||window.event;if(B.stopPropagation){B.stopPropagation();B.preventDefault()}else{if(typeof B.cancelBubble!="undefined"){B.cancelBubble=true;B.returnValue=false}}return false}function bB(B){if(window.event){return window.event.srcElement}else{return B.currentTarget}}function bC(B){if(window.event){return window.event.srcElement}else{return B.target}}function bx(A){if(typeof A.onselectstart!="undefined"){ag(A,"selectstart",function(){return false})}}function be(B){if(typeof B.selectionEnd!="undefined"){return B.selectionEnd}else{if(document.selection&&document.selection.createRange){var E=document.selection.createRange();try{var D=E.duplicate();D.moveToElementText(B)}catch(C){var D=B.createTextRange()}D.setEndPoint("EndToEnd",E);var A=D.text.length;if(A>B.value.length){return -1}return A}}}function aA(B){if(typeof B.selectionStart!="undefined"){return B.selectionStart}else{if(document.selection&&document.selection.createRange){var E=document.selection.createRange();try{var D=E.duplicate();D.moveToElementText(B)}catch(C){var D=B.createTextRange()}D.setEndPoint("EndToStart",E);var A=D.text.length;if(A>B.value.length){return -1}return A}}}function bd(B,A){B.focus();if(B.setSelectionRange){B.setSelectionRange(A,A)}else{if(B.createTextRange){Q=B.createTextRange();Q.moveStart("character",A);Q.collapse();Q.select()}}}function bA(B,A,C){B.focus();if(B.setSelectionRange){B.setSelectionRange(A,C)}else{if(B.createTextRange){Q=B.createTextRange();Q.moveStart("character",A);Q.moveEnd("character",C);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(A){al=0;while(A){al+=A.offsetTop;A=A.offsetParent}return al}function aP(A){al=0;while(A){al+=A.offsetLeft;A=A.offsetParent}return al}function bD(A){return typeof A=="number"&&isFinite(A)}function ay(A,B){while(bq=A.childNodes[0]){A.removeChild(bq)}A.appendChild(document.createTextNode(B))};