function SendForm(IdForm, Script, IdOut, noAlert)
{
  $("#" + IdForm).ajaxSubmit(
  {
    type: "POST",
    url: Script,
    beforeSend: function(html)
    {
      if(noAlert != 1)
        $("#"+IdOut).text('Ждите ответа...');
    },
    success: function(html)
    {
      $("#"+IdOut).html(html);
    }
  });
}

function SendAjax(phpScript, Data, Method, IdOut, noAlert, Add)
{
  $.ajax(
  {
	  type: Method,
		url: phpScript,
		data: Data,
		beforeSend: function(html)
    {
      if(noAlert != 1)
        $("#"+IdOut).text('Ждите ответа...');
    },
		success: function(html)
    {
      if(IdOut == 'a')
        alert(html);
      else
      {
        if(Add)
          $("#"+IdOut).append(html);
        else
          $("#"+IdOut).empty().append(html);
      }
		}
  });
}