function confirmLink(theLink, msg)
{
    var is_confirmed=confirm(msg);
    if(is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
}

function conf(link,msg){
  if(confirm(msg))
    {
	location.href=link;
	}
  }

function current_rating(id, rating) {
  post_id = id;
  post_rating = rating;
  var images_path='skins/default_skin/ita/images';
  for(i = 1; i <= rating; i++)
    {
    document.images['rating_' + post_id + '_' + i].src = images_path + '/rating_over.gif';
    }
  }

function ratings_off(rating_score, insert_half) {
  var ratings_max=5;
  var images_path='skins/default_skin/ita/images';
  for(i = 1; i <= ratings_max; i++)
    {
    if(i <= rating_score)
      {
      document.images['rating_' + post_id + '_' + i].src =  images_path + '/rating_on.gif';
      }
      else if(i == insert_half)
      {
      document.images['rating_' + post_id + '_' + i].src =  images_path + '/rating_half.gif';
      }
      else
      {
      document.images['rating_' + post_id + '_' + i].src =  images_path + '/rating_off.gif';
      }
    }
  }

function toggleLayer(whichLayer) {
  if (document.getElementById)
    {
    // this is the way the standards work
    var style2 = document.getElementById(whichLayer).style;
    style2.display = style2.display? "":"block";
    }
    else if (document.all)
    {
    // this is the way old msie versions work
    var style2 = document.all[whichLayer].style;
    style2.display = style2.display? "":"block";
    }
    else if (document.layers)
    {
    // this is the way nn4 works
    var style2 = document.layers[whichLayer].style;
    style2.display = style2.display? "":"block";
    }
  }
