 $(document).ready(function(){
	$("#sendmail").click(function()
	{
		var mail = $("#mail").val();
		var size = $("#size").val(); 
		var name = $("#name").val(); 
		var phone = $("#phone").val(); 
		if (!mail.match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i)) 
		{
			$("#response").fadeIn("slow");
			$("#response").html("Sorry, but the email address you supplied was invalid and needs to be fixed.");
		}
		else {
			var datastr ='name=' + name + '&mail=' + mail + '&size=' + size + '&phone=' + phone; 
			$("#response").css("display", "block");
			$("#response").html("Sending message...");
			$("#response").fadeIn("slow");
			setTimeout("send('"+datastr+"')",2000);
		}
		return false;
	});
});
function send(datastr){
	$.ajax({	
		type: "POST",
		url: "order_ru.php",
		data: datastr,
		cache: false,
		success: function(html){
		$("#response").fadeIn("slow");
		$("#response").html(html);
		setTimeout('$("#response").fadeOut("slow")',4000);
	}
	});
}
