function lookup(_1,_2,_3,_4){this.selected=new Array(0);this.name=_1;this.baseurl="index.php?s=lookup&i="+_2+"&fld="+_1;if(_4){this.baseurl+="&desc="+_4;}this.target=document.getElementById?document.getElementById("LF_"+_1):document.all?document.all[_1]:null;this.wrapper=document.getElementById?document.getElementById(_1+"_wrapper"):document.all?document.all[_1+"_wrapper"]:null;this.update=lookup_refresh;this.load=lookup_load;this.ifrm=document.getElementById?document.getElementById(_1+"_lookupframe"):document.all?document.all[_1+"_lookupframe"]:null;return (this);}function lookup_load(_5){if(this.target.options[_5].getAttribute("name")!="1"){return;}lkey=this.target.options[_5].value;if(_5+1<this.target.options.length){if(this.target.options[_5+1].value==lkey){return;}}url=this.baseurl+"&key="+lkey+"&";this.target.options[_5].text="Loading...";this.ifrm.src=url;}function lookup_refresh(_6){var t=this.target;var to=this.target.options;src=window.frames[this.ifrm.id].document.getElementById("LF_"+this.name);if(src.innerHTML==""){if(this.selected[this.selected.length]){this.selected[this.selected.length]=null;}return;}to.length=0;ti=src.options.length;for(i=0;i<ti;i++){to.add(new Option(src.options[i].text,src.options[i].value));to[to.length-1].setAttribute("name",src.options[i].getAttribute("name"));}to.selectedIndex=src.selectedIndex;}
