var req = new JsHttpRequest();

function m8h8y(t1,t2){
	this.location='mailto:'+t1+'@'+t2+'?Subject=Letter%20from%20'+t2;
	return false
};

function print_mail(t2,t1){
	document.write("<a href='mailto:[antispam_protected]' onClick='return m8h8y(\"",t1,"\",\"",t2,"\")' title='Наш em@il'>"+t1+'@'+t2+"</a>");
}

function submit_form_communication(value){
	var action = 'send_mail';
	alert (action);
	alert (value);
		JsHttpRequest.query(
			"./modul/func/send_form_communication.php",
			{'q': value, 'action':action},
			function(result, errors) {
				document.getElementById("debug").innerHTML = errors;
				if (result) {
					$("form_comm").empty();
					$("form_comm").html(result["rez"]);
					return;
				}
			},
			false
		);

	return;
}

