/**
 * @fileoverview
 * Cynapsis Kommunikationsagentur
 * @author Lars Hilsebein
 * @version 0.1
 */

function sendComment() {
  var send = ResourceLoader.getJsonObject("json/ajax_addComment.php", document.getElementById("sendCommentForm"));
  if(send != null) {
    document.getElementById("showUserComments").innerHTML = send.sendstr;
    document.getElementById("comment2send").value         = "Dein Kommentar";
  }
}

function getComments() {
  var sb = document.getElementById("showUserComments");
  if(sb != null) {
    var send = ResourceLoader.getJsonObject("json/ajax_getComments.php");
    if(send != null) {
      sb.innerHTML = send.sendstr;
    }
  }
}

function init() {
  var sb = document.getElementById("showUserComments");
  if(sb != null) {
    getComments();
    window.setInterval("getComments()", 5000);
  }
}
