function kalender2(){


    var ds = new Ext.data.Store({
        proxy: new Ext.data.HttpProxy({
            url: '/livesearch.php?ct=city'
        }),
        reader: new Ext.data.XmlReader({
            totalRecords: 'results',
            record: 'row'
        }, [
            {name: 'name'},
            {name: 'zusatz'},
            {name: 'id'}
        ])
    });


    var resultTpl = new Ext.Template('<div class="livesearch-item">','<p><b>{name}</b> {zusatz}','</div>');

    var search = new Ext.form.ComboBox({
        store: ds,
        displayField:'name',
        typeAhead: true,
        minChars:3,
        loadingText: 'Suche...',
        width: 125,
        pageSize:0,
        hideTrigger:true,
        validateOnBlur:false,
        selectOnFocus:true,
        tpl: resultTpl,
        onSelect: function(record){
            document.getElementById('cityId').value=record.data.id;
            document.getElementById('cityname').value=record.data.name;
            this.collapse();
            document.getElementById("evSubmit").disabled='';
        }

    });
     search.on("beforequery",function() {
            document.getElementById("evSubmit").disabled='disabled';
        }
    );
    search.on("focus",function() {
            document.getElementById("evSubmit").disabled='disabled';
        }
    );
    search.on("blur",function() {
            document.getElementById("evSubmit").disabled='';
        }
    );




   search.applyTo('cityname');
   //alert(document.getElementById('cityname'));


}

function stadt(){


    var ds2 = new Ext.data.Store({
        proxy: new Ext.data.HttpProxy({
            url: '/livesearch.php?ct=city'
        }),
        reader: new Ext.data.XmlReader({
            totalRecords: 'results',
            record: 'row'
        }, [
            {name: 'name'},
            {name: 'zusatz'},
            {name: 'id'}
        ])
    });


    var resultTpl2 = new Ext.Template('<div class="livesearch-item">','<p><b>{name}</b> {zusatz}','</div>');

    var search2 = new Ext.form.ComboBox({
        store: ds2,
        displayField:'name',
        typeAhead: false,
        minChars:3,
        loadingText: 'Suche...',
        width: 205,
        pageSize:0,
        hideTrigger:true,
        validateOnBlur:false,
        selectOnFocus:true,
        tpl: resultTpl2,
        onSelect: function(record){
            //document.getElementById('cityId').value=record.data.id;
            //document.getElementById('search2').value=record.data.name;

            location.href='/index.html?cityId='+ record.data.id+'#evbox';
            this.collapse();
            //if (Ext.get('calbox')!=null) Ext.get("calbox").load("/new_calendarbox.html?cityId="+record.data.id);
        }

    });



   document.getElementById('stadt').innerHTML='';
   document.getElementById('scroller31').style.height='180';
   search2.render('stadt');
   search2.focus();
   //alert(document.getElementById('stadt'));


}
function loadCal(m,y) {
//Ext.get("calbox").load("/new_calendarbox.html?month="+m+"&year="+y);
}
function additionalInit(){
    //kalender2();
}

