$('#closeSuggest').click(function() {
  $('#suggestLayer').fadeOut('slow', function() {
    // Animation complete.
  });
});


var xajaxRequestUri="http://www.haenssler-classic.de/index.php?eID=search_suggest&config=haenssler-classic";
var xajaxDebug=false;
var xajaxStatusMessages=false;
var xajaxWaitCursor=true;
var xajaxDefinedGet=0;
var xajaxDefinedPost=1;
var xajaxLoaded=false;
function xajax_suggestSearchTerm(){return xajax.call("suggestSearchTerm", arguments, 1);}

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,
        bufferAra: false,		
        bufferEin: false,		
        bufferTime: 50,
        
        modified : function(strId, araId)
        {
                setTimeout('OnKeyRequestBuffer.compareBuffer("'+strId+'","'+xajax.$(strId).value+'","'+
																araId+'","'+xajax.$(araId).options[xajax.$(araId).selectedIndex].value+'","'+
																radioValue()+'");', this.bufferTime);
        },
        
        compareBuffer : function(strId, strText, araId, araValue, einValue)
        {
            if ((strText == xajax.$(strId).value && strText != this.bufferText) || 
				(araValue == xajax.$(araId).options[xajax.$(araId).selectedIndex].value && araValue != this.bufferAra) || 
				(einValue == radioValue() && einValue != this.bufferEin))
            {
                this.bufferText = strText;
                this.bufferAra = araValue;
                this.bufferEin = einValue;
                OnKeyRequestBuffer.makeRequest(strId, araId);
            }
        },
        
        makeRequest : function(strId, araId)
        {	
            xajax_suggestSearchTerm(xajax.$(strId).value, 
									xajax.$(araId).options[xajax.$(araId).selectedIndex].value, 
									radioValue());
        }
    }
	
	
function radioValue() {
	rObj = document.searchForm.elements['tx_scmshopproductsearch_pi3[ein]'];
   	for (var i=0; i<rObj.length; i++) if (rObj[i].checked) return rObj[i].value;
    return '';
}	
	