function voteArticle (article, action)
{
 var xmlHttp = getXmlHttp();
 var idRating = document.getElementById('article-rating' + article);
 
 var postSend = 'article=' + article + '&action=' + action;

 xmlHttp.open('POST', 'http://vafelka.ru/vote/article/', true);
 xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
 
 idRating.innerHTML = '<img src="http://vafelka.ru/site/images/voting.gif" />';

 xmlHttp.onreadystatechange = function()
 {
  if (xmlHttp.readyState == 4)
  {
   if(xmlHttp.status == 200)
   {
    idRating.innerHTML = xmlHttp.responseText;
   }
  }
 };

 xmlHttp.send(postSend);
}

