window.setTimeout(function () { if (!xajaxLoaded) { alert('Error: the xajax Javascript file could not be included. Perhaps the URL is incorrect?\nURL: /typo3conf/ext/xajax/xajax_js/xajax.js'); } }, 6000);

var OnKeyRequestBuffer = 
    {
        bufferText: false,
        bufferValue: false,		
        bufferTime: 500,


        
        modified : function(strId)
        {
                setTimeout('OnKeyRequestBuffer.compareBuffer("'+strId+'","'+xajax.$(strId).value+'");', this.bufferTime);
        },
        
        compareBuffer : function(strId, strText)
        {
			document.getElementById('suggestResult').style.display = "block";
	
			if((strText == '') || (strText.length < 2)) {
				document.getElementById('search-indicator').style.display = "none";

			} else {
				document.getElementById('search-indicator').style.display = "block";
	
			}

            if ((strText == xajax.$(strId).value && strText != this.bufferText) && (document.getElementById('search-splash').style.display=="none"))
            {
		        // alert(document.getElementById('myText').value + ' / ' + this.bufferText);
                this.bufferText = strText;
                OnKeyRequestBuffer.makeRequest(strId);
           }
        },
        
        makeRequest : function(strId)
        {	

            xajax_suggestSearchTerm(xajax.$(strId).value);

		
        }
    }

function show_search_progress() { 

	document.getElementById("search-splash").style.display = "block";


	 // Suggest ausblenden
	document.getElementById("suggest-layer").style.display = "none";
	document.getElementById("search-indicator").style.display = "none";

}
function hide_search_progress() { 

 
	document.getElementById("search-splash").style.display = "none";

if (document.getElementById("suggest-layer")) {
	document.getElementById("suggest-layer").style.display = "none";

    }
	document.getElementById("search-indicator").style.display = "none";

 
}

function checkSearchValue () {
	if (document.getElementById("myText").value == "Schnellsuche") {
		document.getElementById("myText").value = "";
	}
}