
function showForm(id){
  function show(data,textStatus){
    
    var div = document.createElement('div');
    $(div).html(data);
    $.weeboxs.open(div,{title: 'Отправить сообщение:',width:600});
  }
  
  function showError(request,status,er){
    $.weeboxs.open('Ошибка соединения с сервером!',{title: 'Ошибка соединения!!!',type:'error'});
  }
  var options = {
    async: true,
    cache: true,
    success: show,
    dataType: 'html',
    error: showError,
    type: 'GET',
    url: '/frm/'+id+'.html'
  };
  $.ajax(options);
 // $.get('/frm/'+id+'.html',null,show);
  
}

function submitForm(frm){
var str = $('#afrm').serialize();
$.post('/mailer.php',str,function(){$.weeboxs.close();});
return false;
}
