function setheight(txtarea) {
  txtarea.style.height='';
  txtarea.rows=txtarea.value.split('\n').length;
  txtarea.style.height=txtarea.scrollHeight+'px';
  txtarea.style.maxHeight='150px';
  txtarea.style.overflow='auto';
}

  function view_comment(id){
         $('.comment_tr_class').show();
         $('.comment_tr_class div').removeClass();
         $('.comment_tr_class div').addClass('n_commentbox');
         $('.comment_tr_class div' ).show();
         $('#comment_form div').addClass('n_comment_form_hide');


         $('#comment_div'+id).removeClass('n_commentbox');
         $('#comment_div'+id).addClass('n_commentbox_hide');
         $('#comment_trdiv'+id).hide();
        $('#comment_form'+id+' div').removeClass();
        $('#comment_form'+id).removeClass();
        $('#comment_form'+id).show();
        $('#comment_form'+id+' div').show();
        $('#comment_form'+id+' div textarea').focus();
    }

function reset_comment_form(divid){
         $('#comment_trdiv'+divid).show();
         $('#comment_trdiv'+divid+' div').removeClass().addClass('n_commentbox').show();
         $('#comment_form'+divid+' div').addClass('n_comment_form_hide');
}




function show_delete_link(id){
  $('.delete_x_link').css({'display': 'none'});
  $('#delete_x'+id).css({'display': 'block'});
}
function hide_delete_links(){
  $('.delete_x_link').css({'display': 'none'});

}
