function getComentarii(script_url, id, div_id, div_class)
{
  if (arguments.length == 3)
  {
    div_class = 'loading';
  }
  
  jQuery("div#" + div_id).empty().addClass(div_class);
  jQuery.get(script_url, {id : id, _: 'ah_' + Math.random()}, function(data)
  {
    jQuery("div#" + div_id).removeClass(div_class);
    jQuery("div#" + div_id).html(data);
  });
}

function getComentariiByForm(script_url, form_id, div_id, div_class)
{
  if (arguments.length == 3)
  {
    div_class = 'loading';
  }
  
  parameters =  jQuery('form#' + form_id).serialize();
  jQuery("div#" + div_id).empty().addClass(div_class);
  jQuery.post(script_url + '?_=ah_' + Math.random(), parameters, function(data)
  {
    jQuery("div#" + div_id).removeClass(div_class);
    jQuery("div#" + div_id).html(data);
  });
}

function roundNumber(rnum, rlength)
{
  return Math.round(rnum*Math.pow(10,rlength))/Math.pow(10,rlength);
}