function get_xml (url, fnc) {

if (!this.http) {
            this.http = get_http();
            my_working = false;
			}
			
  
  if (!my_working && this.http) {
            var http = this.http;            
            this.http.open("GET", url, true);			
            this.http.onreadystatechange = function() {
                if (http.readyState == 4) {
				    if (fnc==1) {
 				     get_table(http.responseXML.documentElement);	
					}
                    my_working = false;
                  }else{
                  }
            }
            my_working = true;
            this.http.send("");
        }
        if(!this.http){
             //обработка ошибки
        }

}


function prepare_get_table() { 
 this.element=document.getElementById("find");
 get_xml("http://www.glossostav.ru/ajax/table.xml?url="+encodeURIComponent(this.element.value), 1);
}

function get_table(rxml, rtext) {
 this.element=document.getElementById("search_table");
 this.strs=rxml.getElementsByTagName("string");
 this.html="";
 for (i=0; i<this.strs.length; i++) {
  this.tag=this.strs[i].getElementsByTagName("id");
  this.id=this.tag[0].firstChild.data;
  this.tag=this.strs[i].getElementsByTagName("name");
  this.name=this.tag[0].firstChild.data;
  this.html=this.html+"<TR><TD style='padding-bottom: 5px'><A class=blackul style='font-size: 12px' href='http://www.glossostav.ru/word/"+this.id+"/' target=_parent><B>"+this.name+"</B></A><TD></TR>"
 }
 
 if (!this.html.length) this.html="<TR><TD></TD></TR>";
 this.html="<TABLE cellspacing=0 cellpadding=0>"+this.html+"</TABLE>";
 this.element.innerHTML=this.html;

}