window.addEvent('domready', function() {
        // --
        $('contactForm').addEvent('submit', function(e) {
			$('log').setStyle('display','block');	
            //Prevents the default submit event from loading a new page.
            e.stop();
            //Empty the log and show the spinning indicator.
            var log = $('log_res').empty().addClass('ajax-loading');
            //Set the options of the form's Request handler.
            //("this" refers to the $('myForm') element).
            this.set('send', {onComplete: function(response) {
                if(response=="1"){
                    log.removeClass('ajax-loading');
                    log.set('html', "<div id='mailsent'><strong>Vielen Dank!</strong>&nbsp;&nbsp;Ihre Nachricht wurde &uuml;bermittelt!</div>");
                    $('contactForm').reset();
                }else{
                    log.removeClass('ajax-loading');
                    log.set('html', response);
                }
                
            }});
            //Send the form.
            this.send();
        });
    });
	
function schliessen(){
			$('log').setStyle('display','none');
}