function tb_init2() {
  var t = "Copyright";
  var a = "#TB_inline?height=70&width=250&inlineId=copyright";
  var g = false;
  tb_show(t, a, g);
}

function getSelText() {
  var txt = '';
  if (window.getSelection) {
    txt = window.getSelection();
  } else if (document.getSelection) {
    txt = document.getSelection();
  } else if (document.selection) {
    txt = document.selection.createRange().text;
  }
  return txt;
}

function copyright(mcopyright) {
  var text = getSelText();
  if (text != '') {
    tb_init2();
  }
}

jQuery.fn.extend( {
  disableSelection : function() {
    this.each(function() {
      this.ondragstart = function() {
        return false;
      };
    });
  },
  enableSelection : function() {
    this.each(function() {
      this.ondragstart = function() {
      };
    });
  }
});
$(document)
    .ready(
        function() {
          /*
          var mcopyright = $("<div id=\"copyright\"style=\"display:none\"><p>Copying materials without active hyperlink to UA-traveling is prohibited</p></div>");
          $("body").append(mcopyright);
          var iscopy = false;
          if ($.browser.opera) {
            $("body").bind('keydown', 'ctrl+c', function(event) {
              copyright(mcopyright);
            }).bind('contextmenu', function(event) {
              copyright(mcopyright);
            });
          } else {
            $("body").bind('copy', function() {
              copyright(mcopyright);
            })
          }*/
          $("ul.sf-menu").superfish();
          $("#signin_username").DefaultValue("User name");
          $("#signin_password").DefaultValue("Password");
          tree("#multi-derevo");
          tree("#multi-archive");
          /*
          var left_block = $(".ua_content_left_block").height();
          var right_block = $(".ua_content_right_block").height();
          var center_block = $(".ua_content_center").height();
          $('body *').disableSelection();
          */
        });

