function changevisible(twiggleoff, twiggleon){
  for(var i in twiggleoff) {
      $j('#' + twiggleoff[i]).addClass('nwi_obob_button_voted');
      $j('#' + twiggleoff[i]).html('Одобрено');
      $j('#' + twiggleoff[i]).attr('onclick', 'javascript:void(0)');
  }
  /*
  for(var i in twiggleon) {
    var el = document.getElementById(twiggleon[i]);
    el.style.display='';
  }
  */
}
var opened = null;
var fckeditors = new Array(); var fckeditors1 = new Array()
open_edit = function (id) {
    if(opened) {
        document.getElementById('lay_edit_' + opened).style.display='none';
        document.getElementById('lay_show_' + opened).style.display='';
    }
    opened = id;
    document.getElementById('lay_edit_' + id).style.display='';
    document.getElementById('lay_show_' + id).style.display='none';

    var sBasePath = "/lib/fckeditor262/";
    if (!fckeditors[id]) {
        loadFCKEditor("pretext_" + id, '', 'smi2_shortpanel', '500px', '250px');
    }

    if (!fckeditors1[id]) {
        loadFCKEditor("fulltext_" + id, '', 'smi2_panel', '500px', '400px');
    }
}

pop = function(id, text) {
    window.location.assign('/register/');
}

function comment_rating_telnews(act, comm_id) {
    var req = newHttpRequest();
    req.onreadystatechange = function(){
        if (req.readyState == 4) {
            var resp = req.responseText;
            if (req.status == 200) {
                $j('#comment_rating_' + comm_id).html(resp);
                $j('#comm_voted_' + comm_id).show();
                $j('#comm_vote_' + comm_id).hide();
            }
        }
    };
    var request = '/process/?action=vote_comment&comm_id='+comm_id+'&act1='+act;
    req.open('GET', request, true);
    req.send(null);
}