document.observe('dom:loaded', function(){
	Val = new Validate();
	Val.lang = $('lang_version').value;
	Val.sbt.observe('click', function(btn){
		Val.do_valid();
		if(parseInt(Val.count) == 0)
		{
			new Ajax.Request($F('base_url'), {
			method:		'post',
			parameters: '?name=' + $F('name') +'&email=' + $F('email') + '&phone=' + $F('phone') + '&fax=' + $F('fax') + '&text=' + $F('text'),

			onSuccess: function(transport) {
				$('contacts').update(transport.responseText);
			}
		});
		}
	});
});


