function SendContactForm(lang)
{
	url = "/contact/send/" + lang + ".xml"; 
	
	var display = $('result').empty().addClass('ajax-loading');
	display.style.display = "block";
	$('edit').style.display = 'none';
	//document.forms[0].back.style.display = 'inline';
	document.forms[0].send.style.display = 'none';
	
	var myAjax = new Ajax(url, {
		postBody:$('form'), 
		method: "POST", 
		onComplete:function(){
	    	display.removeClass('ajax-loading');
			var res = this.response["xml"].getElementsByTagName('res');
    		if (res[0].firstChild.data == 0)
			{
				ShowContactForm()
			}
    		res = this.response["xml"].getElementsByTagName('msg');
    		$("result").innerHTML = res[0].firstChild.data + " ";
		}
	}).request();
}

function ShowContactForm()
{
	$('edit').style.display = 'block';
	document.forms[0].back.style.display = 'none';
	document.forms[0].send.style.display = 'inline';
	
	return false;
}
