function clipboard_start () {
      var clip = new ZeroClipboard.Client();
      var source = document.getElementById("codeCopyContainer").innerHTML;
      var source1 = source.replace(/&lt;/g, "<");
      var source2 = source1.replace(/&gt;/g, ">");
      var source3 = source2.replace(/&amp;/g, "&");
      clip.setText(source3);
      clip.glue("copy_button");
}

function getResultDiv (id) {
      document.getElementById(id).style.display = "block";
}

function doElementShake (id) {
      Effect.Shake(id);
}

function bbcodes (bbcode) {
    var textarea = document.getElementById("text");
    if (document.selection) {
        textarea.focus();
        document.selection.createRange().text = bbcode;
        document.selection.createRange().select();
    } else if (textarea.selectionStart || textarea.selectionStart == '0') {
        intStart = textarea.selectionStart;
        intEnd = textarea.selectionEnd;
        textarea.value = (textarea.value).substring(0, intStart) + bbcode + (textarea.value).substring(intEnd, textarea.value.length);
        textarea.selectionStart = textarea.selectionEnd = intStart + bbcode.length;
        textarea.focus();
    } else {
        textarea.value += bbcode;
    }
}

function sicherheit () {
    var rand = Math.random();
    document.getElementById("captcha").src = "include/libs/Captcha/captcha.class.php?" + rand;
}

function checkBrowser () {
      var ua = navigator.userAgent;
      var falseAlert = "Bitte beachten Sie, dass Sie mit dem Internet Explorer nicht alle Funktionen nutzen können! Bitte laden Sie FireFox herunter";
      /*if (ua.indexOf("MSIE") > -1) {
       // alert(falseAlert);    
      }*/
}
