
/* quicksearch */
$(document).ready(function() {
    $('.form_search .input_field').each(function() {
        $(this).attr('standardvalue', $(this).val());
        $(this).focus(function() {
            $(this).addClass('hover');
            if ($(this).val() == $(this).attr('standardvalue')) {
                this.value = '';
            }
        });
        $(this).blur(function() {
            $(this).removeClass('hover');
            if (jQuery.trim($(this).val()) == '') {
                this.value = $(this).attr('standardvalue');
            }
        });
    });
});

function testVal(myA) {
    check=true;
    for(var i=0; i<myA.length; i++) {
        if(!document.getElementById(myA[i]) || document.getElementById(myA[i]).value.length<1) {
            check=false;
            if(document.getElementById('tr_'+myA[i])) {
                document.getElementById('tr_'+myA[i]).style.backgroundColor='orange';
            }
        }
    }
    if(!check) {
        self.alert('Bitte alle Pflichtfelder ausfuellen!');
    }
    return check;
}