function SendContactform()
{
	if(document.getElementById("securitycode_soll").value == document.getElementById("securitycode_ist").value)
	{
		if(CheckManatoryFields('name', 'Name', '') && CheckManatoryFields('email', 'Email Adresse', 'email') && CheckManatoryFields('message', 'Mitteilung', ''))
		{
			http_request.open('POST', "http://www.baanusers.ch/ajax/contactform/contactrequest.php", true);
			http_request.onreadystatechange = SendContactformOnStatusChange;
			http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
			http_request.send('name=' + encodeURIComponent(document.getElementById("name").value) + '&email=' + encodeURIComponent(document.getElementById("email").value) + '&phone=' + encodeURIComponent(document.getElementById("phone").value) + '&message=' + encodeURIComponent(document.getElementById("message").value));
		}
	}
	else
	{
		alert ('Security Code stimmt nicht überein.');
	}
	
}

function SendContactformOnStatusChange()
{
	if(4 == http_request.readyState)
	{
		ShowHideLayer("divLoadingCR", "hidden", "none");
		ShowHideLayer("divFormCR", "hidden", "none");
		ShowHideLayer("divResultCR", "visible", "inline");
		document.getElementById("divResultCR").innerHTML = http_request.responseText;
	}
	if(1 == http_request.readyState)
	{
		ShowHideLayer("divFormCR", "hidden", "none");
		ShowHideLayer("divResultCR", "hidden", "none");
		ShowHideLayer("divLoadingCR", "visible", "inline");
	}
}