
function init() {
	$('submit').onclick = function() { sendMail(); }
}


function sendMail() {
	
	var url = '/js/form.php';
	var pars = Form.serialize('frm');

	var myAjax = new Ajax.Request(url, {
					 method: 'get',
					 parameters: pars,
					 onLoading: showLoad, 
					 onComplete: success });
}

function showLoad() {
	$('load').innerHTML = 'Nachricht wird gesendet...';
}

function success() {
	$('load').style.color = '#298ff2';
	$('load').innerHTML = 'Ihre Anfrage wurde abgeschickt.';
}


