function bRate(id,rating,home) {
  var place;
  if(home== null) {
    place = 'rating';
  } else {
    place = 'beitrag_unten_'+id;
  }
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { method:'post', postBody:'post_id='+id+'&post_rating='+rating+'&submitKind=post&postKind=rate', 
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    }
  )
}
function bRateToolTip(top, flop, id) {
  if(top == 0 && flop == 0) {
    var text = 'Es hat noch niemand abgestimmt';
  } else {
    var gesamt = (51-(Number(top) + Number(flop)));
    var text = top+' positiv | '+flop+' negativ.<br />Nur noch maximal '+gesamt+' Stimmen n&ouml;tig.';
  }
  new Tip('rating_box_'+id, 
          text, 
          {
            width: 'auto', 
            border: 3, 
            radius: 3,
            style: 'darkgrey',
            stem: 'bottomMiddle',
            hook: {target: 'topMiddle', tip: 'bottomMiddle'}
          }
  );
}
function bDelete(id) {
  new Ajax.Updater( 'beitrag_edit_'+id,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'post_id='+id+
                                '&submitKind=post'+
                                '&postKind=delete',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function bDeleteSure(id) {
  new Ajax.Request( html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'post_id='+id+
                                '&submitKind=post'+
                                '&postKind=delete_sure',
                      onCreate : startLoading, 
                      onComplete : function postdeny_diable() {stopLoading();Effect.Fold('beitrag_delete_'+id);}
                    } 
                  )
}
function bEdit(id) {
  var place = 'beitrag_edit_'+id;
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'post_id='+id+
                                '&submitKind=post'+
                                '&postKind=edit',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function bUpdate(id) {
  var place = 'beitrag_edit_'+id;
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'post_id='+id+
                                '&post_content='+$('post_content_'+id).value+
                                '&submitKind=post'+
                                '&postKind=update',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function buAdd(id) {
  var place = 'postslist_unten_'+id;
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'post_id='+id+
                                '&submitKind=post'+
                                '&postKind=userrate'+
                                '&rate=add',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}
function buDeny(id) {
  var place = 'postslist_unten_'+id;
  new Ajax.Updater( place,
                    html_url+'submitAJAX.php',
                    { 
                      method:'post',
                      postBody: 'post_id='+id+
                                '&submitKind=post'+
                                '&postKind=userrate'+
                                '&rate=deny',
                      onCreate : startLoading, 
                      onComplete : stopLoading
                    } 
                  )
}