function cAdd() {
  new Ajax.Updater( 'commentbox',
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'comment_post_id='+$('comment_post_id').value+
                                '&comment_author='+$('comment_author').value+
                                '&comment_content='+$('comment_content').value+
                                '&comment_status='+$('comment_status').value+
                                '&comment_parent='+$('comment_parent').value+
                                '&user_id='+$('user_id').value+
                                '&submitKind=comment'+
                                '&commentKind=add',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function cCheck() {
  var place = 'comments';
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'comment_post_id='+$('comment_post_id').value+
                                '&comment_author='+$('comment_author').value+
                                '&comment_content='+$('comment_content').value+
                                '&comment_status='+$('comment_status').value+
                                '&comment_parent='+$('comment_parent').value+
                                '&user_id=0'+
                                '&question='+$('question').value+
                                '&question_id='+$('question_id').value+
                                '&question_user_id='+$('question_user_id').value+
                                '&submitKind=comment'+
                                '&commentKind=check',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function cDelete(id) {
  var place = 'comment_'+id;
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'comment_id='+id+
                                '&submitKind=comment'+
                                '&commentKind=delete',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function cDeleteSure(id) {
  var place = 'comment_u_'+id;
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'comment_id='+id+
                                '&submitKind=comment'+
                                '&commentKind=delete_sure',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function cEdit(id) {
  var place = 'comment_'+id;
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: '&comment_id='+id+
                                '&submitKind=comment'+
                                '&commentKind=edit',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function cPage(id) {
  new Ajax.Updater( 'comments',
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'comment_post_id='+$('comment_post_id').value+
                                '&comment_page='+id+
                                '&submitKind=comment'+
                                '&commentKind=page',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function cRate(id, rating) {
  var place = 'comment_rating_'+id;
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'comment_id='+id+
                                '&comment_rating='+rating+
                                '&submitKind=comment'+
                                '&commentKind=rate',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function cSpam(id) {
  var place = 'comment_u_'+id;
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: '&comment_id='+id+
                                '&submitKind=comment'+
                                '&commentKind=spam',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function cUpdate(id) {
  var place = 'comment_'+id;
  var comment_content = $('comment_content_'+id).value;
  if(true == $('comment_editby').checked) {
    var comment_editby = $('comment_editby').value;
  } else {
    var comment_editby = 1;
}
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'comment_id='+id+
                                '&comment_content='+comment_content+
                                '&comment_editby='+comment_editby+
                                '&submitKind=comment'+
                                '&commentKind=update',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}