window.addEvent('domready', function(){
    
	/*
	$('werbetraeger').addEvent('change',function(e){
		document.myform.submit();		  
	});
	*/
	// yiu controll erstellen
    if($('myKeysContainers')){
    YAHOO.example.AC = new function() {
        //this.oACDS2 = new YAHOO.widget.DS_XHR("http://www.vermarkter.de/de/web/werbetraeger/getWords/", ["ResultSet.Result","Title","ModificationDate"]);
        //this.oACDS2.responseType = YAHOO.widget.DS_XHR.TYPE_JSON;
        //this.oACDS2.maxCacheEntries = 60;
        //this.oACDS2.queryMatchSubset = true;
        //this.oACDS2.connTimeout = 3000;
		
		this.oACDS = new YAHOO.widget.DS_JSArray(YAHOO.example.myArray); 
        
        this.myAutoComp2 = new YAHOO.widget.AutoComplete("keywordss","myKeysContainers", this.oACDS);
        this.myAutoComp2.animVert = true;
        this.myAutoComp2.delimChar = " ";
        this.myAutoComp2.maxResultsDisplayed = 500;
        this.myAutoComp2.useShadow = false;
        this.myAutoComp2.useIFrame = true;
        this.myAutoComp2.queryDelay = 0;
        this.myAutoComp2.forceSelection = true;
        this.myAutoComp2.typeAhead = true;
        this.myAutoComp2.allowBrowserAutocomplete = false;
        this.myAutoComp2.prehighlightClassName = "yui-ac-prehighlight";
        this.myAutoComp2.minQueryLength = 0;
        this.myAutoComp2.textboxFocusEvent.subscribe(function(){
            var sInputValue = YAHOO.util.Dom.get('keywordss').value; 
            if(sInputValue.length === 0) { 
                var oSelf = this; 
                setTimeout(function(){oSelf.sendQuery(sInputValue);},0); 
            }
        });
    };
	};
    
});
	
