 function dscroll() {
   CSBfleXcroll('scroller1'); 
   if (typeof(goid)!="undefined") {
    //alert (goid);
    document.getElementById("scroller1").scrollToElement(document.getElementById(goid));
   }
}

function loadGroup(id) {
    Ext.get("detail").load("/detail.php?id="+id);

}

if (document.getElementById && document.getElementsByTagName) {
if (window.addEventListener) window.addEventListener('load', appinit, false);
else if (window.attachEvent) window.attachEvent('onload', appinit);
}

function appinit() {
     doQuicksearch();
}


function doQuicksearch() {
 
qds = new Ext.data.Store({
        proxy: new Ext.data.HttpProxy({
            url: '/livesearch.php'
        }),
        reader: new Ext.data.XmlReader({
            totalRecords: 'results',
            record: 'row',
            id: 'id'
        }, [
            {name: 'name'},
            {name: 'urlname'}
        ])
    });

     // Custom rendering Template
    qresultTpl = new Ext.XTemplate(
        '<tpl for="."><div class="livesearch-item"><p><b>{name}</b></p></div></tpl>'
    );

    var qsearch = new Ext.form.ComboBox({
        store: qds,
        displayField:'name',
        typeAhead: false,
        minChars:3,
        loadingText: 'Suchen ...',
        width: 256,
        value:'Suche: PLZ, Krankheitsbild, etc.',
        pageSize:0,
        autoCreate:false,
        hideTrigger:true,
        tpl: qresultTpl,
        itemSelector: 'div.livesearch-item',
        onSelect: function(record){
            window.location = String.format('{0}', record.data.urlname);
        }
    });
    qsearch.render('qsearch');
    qsearch.on("focus", function(el) {
        el.setRawValue('');
     });
}
