window.addEvent("domready",function(){autocomp=new Autocompleter.Request.JSON("numberBox","/users/",{minLength:0,postVar:"q",forceSelect:false,autoSubmit:false,selectMode:"pick",injectChoice:function(b){h=new Hash(b);var c=h.num_colorized;var f=h.num_post_n;var a=new Element("div",{id:"z_"+c,"class":"autocompleter-normal"});var d=get_descr(h,1);var g=get_descr(h,0);if(g){directionHash[f]=g}if(h.has("price")){priceHash[f]=h.price}var e=d.getElements("td[class=dropDownContact]")[0];new Element("span",{html:this.markQueryValue(c)}).inject(e);d.inject(a);new Element("input",{type:"hidden",value:f}).inject(a);new Element("input",{type:"hidden",value:c}).inject(a);a.inputValue=c;this.addChoiceEvents(a).inject(this.choices)},onSelection:function(b,i,e,g){var f=i.getChildren("span");var c=i.getChildren("input");normalized=$(c[0]).value;colored[normalized]=$(c[1]).value}});calcMaxResults()});function calcMaxResults(){var c=$("numberBox");var b=0;do{b+=c.offsetTop}while(c=c.offsetParent);var a=Math.floor((screen.height/2.7)/45);if(a>10){a=10}if(a<2){a=2}autocomp.options.maxChoices=a};
