function onInputFocus(o)
{
    if (!o.firstFocus && ((o.value == 'Begriff eingeben') || (o.value == 'enter search term') || (o.value == 'Enter search term'))) {
        o.value      = '';
        o.firstFocus = true;
    }
}

function onSendPublicationFilterForm(o)
{
  
    var i = 0;
    var p = null;
    for (i = 0; i < o.elements.length; i++) {
        p = o.elements[i];
        if ((p.value == 'Begriff eingeben') || (p.value == 'enter search term') || (p.value == 'Enter search term')) {
            onInputFocus(p);
        }
    }

    return true;
}


function request(content, target, showFast)
{
    new Ajax.Updater(target,content, {
        onLoading:function(request){
            
        },
        onComplete:function(request){
            if (showFast) {
                Element.show(target);
            } else {
                Effect.SlideDown(target,{duration:0.4});
            }
            window.openTarget = target;
        },
        asynchronous:true,
        evalScripts:true,
        method:'post',
        requestHeaders: ['Content-Type','text/html; charset=ISO-8859-1']
        }
        );
}

function closeMe(elem)
{
    Effect.SlideUp('entryId_'+elem,{duration:0.4});
}

function openAll()
{
    var childs = $('faqcontent').childNodes;
    for (i=0; i< childs.length; i++) {
        if (childs[i].id){        
            var questionId = childs[i].id.substring(childs[i].id.lastIndexOf('_')+1,childs[i].id.length);
            request(document.URL+'&ff[entry_id]='+questionId+'&ff[display_mode]=element',childs[i].id, true);
        }
    }
    window.print();
}
