var OnKeyRequestBuffer = 
    {
        bufferText: false,
        bufferTime: 700,
        
        modified : function(strId)
        {
                setTimeout('OnKeyRequestBuffer.compareBuffer("'+strId+'","'+xajax.$(strId).value+'");', this.bufferTime);
        },
        
        compareBuffer : function(strId, strText)
        {
            if (strText == xajax.$(strId).value && strText != this.bufferText)
            {
                this.bufferText = strText;
                OnKeyRequestBuffer.makeRequest(strId);
            }
        },
        
        makeRequest : function(strId)
        {
            xajax_requestBuffer(xajax.$(strId).value);
        }
    }

/*
This class will only execute the code in the OnKeyRequestBuffer.makeRequest function 
if the text in the input with the given id has not changed in a half of a second (500 ms). 
So now, instead of calling the xajax function directly in the onkeyup event, we call our buffer class:

<input id="myText" type="text" onkeyup="OnKeyRequestBuffer.modified('myText');" />
*/
