  function copy_to_clipboard(field) {
    var val = eval("document." + field)
    val.select()
    
    if (document.all) {
      range = val.createTextRange();
      range.execCommand("Copy");
      alert('Code successfully copied. Press Ctrl + V to paste');
    }
  }

