function showSearchWindow(theform, field, type, aAdditional, dosubmit, formname, submitfunctionname, aFuncParamsAdditional, changefield) {
    var winwidth = 700;
    var winheight = 400;
    var link_addition = '';
    var link_funcparam_addition = '';
    var link = '';
    
    if (typeof aAdditional == 'object') {
        for (var Key in aAdditional) {
            if (typeof aAdditional[Key] != 'function') {
                link_addition = link_addition + '&' + Key + '=' + aAdditional[Key];
            }
        }
    }
    
    if (typeof aFuncParamsAdditional == 'object') {
        for (var Key in aFuncParamsAdditional) {
            if (typeof aFuncParamsAdditional[Key] != 'function') {
                link_funcparam_addition = link_funcparam_addition + '&params[' + Key + ']=' + aFuncParamsAdditional[Key];
            }
        }
    }
    
    if (typeof dosubmit == 'boolean' && dosubmit == false) {
        dosubmit = 0;
    } else {
        dosubmit = 1;
    }
    if (formname) {
        formNameAddition = '&formname='+formname;
    } else {
        formNameAddition = '';
    }
    if (changefield) {
        changefieldAddition = '&changefield='+changefield;
    } else {
        changefieldAddition = '';
    }
    if (submitfunctionname) {
        submitFunctionAddition = '&submitactionfunction='+submitfunctionname;
    } else {
        submitFunctionAddition = '';
    }
    
    // Berechungen für die Position des Suchfensters immer in der Mitte des Contentbereichs des Browsers
    if (navigator.appName == "Microsoft Internet Explorer") {
        posleft = top.screenLeft + (document.body.offsetWidth / 2) - winwidth / 2;
        postop = top.screenTop + (document.body.offsetHeight / 2) - winheight / 2;
    } else if (navigator.appName == "Netscape") { 
        posleft = window.screenX + (window.innerWidth/2) - winwidth / 2;
        postop = window.screenY + (window.innerHeight/2) - winheight / 2;
    } else if (navigator.appName == "Opera") { 
        posleft = top.screenLeft + (document.body.offsetWidth / 2) - winwidth / 2;
        postop = top.screenTop + (document.body.offsetHeight / 2) - winheight / 2;
    }
    
    link = brodos.config.get('WDIR')+'/index.php/mpath/common_searchwindow/noframe/1?infoval='+field.value+'&infokey='+field.name+'&infofieldid='+field.id+'&type='+type+'&dosubmit='+dosubmit+formNameAddition+submitFunctionAddition+link_addition+link_funcparam_addition+changefieldAddition;
    var search = window.open(link, 'searchwindow', 'width=' + winwidth + ', height=' + winheight + ', top=' + postop +  ', left=' + posleft + ', dependant=yes');
    
    if (search != null){
    	search.focus();
    }
}

function getKeyCode(e) {
    if( !e ) {
        //if the browser did not pass the event information to the
        //function, we will have to obtain it from the event register
        if( window.event ) {
            //DOM
            e = window.event;
        } else {
            //TOTAL FAILURE, WE HAVE NO WAY OF REFERENCING THE EVENT
            return;
        }
    }
    if( typeof( e.which ) == 'number' ) {
        //NS 4, NS 6+, Mozilla 0.9+, Opera
        e = e.which;
    } else if( typeof( e.keyCode ) == 'number'  ) {
        //IE, NS 6+, Mozilla 0.9+
        e = e.keyCode;
    } else if( typeof( e.charCode ) == 'number'  ) {
        //also NS 6+, Mozilla 0.9+
        e = e.charCode;
    } else {
        //TOTAL FAILURE, WE HAVE NO WAY OF OBTAINING THE KEY CODE
        return;
    }
    return e;
}