window.load = initBlockCopy();

function initBlockCopy() {
	//alert('bla');
	document.oncontextmenu = function(){ return false; };
	document.ondragstart = function(){ return false; };	

 document.onselectstart = function () {
      if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
        return false;
      } else {
        return true;
      }
    };
	//no text selection, in IE
    document.onselectstart = function () {
        if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password" && event.srcElement.type != "select") {
          return false;
        } else {
          return true;
        }
      };

    //no text selection, in Firefox
    document.onmousedown=function(e){
      var obj=e.target;
      if (obj.tagName.toUpperCase() == "INPUT" || obj.tagName.toUpperCase() == "TEXTAREA" || obj.tagName.toUpperCase() == "PASSWORD" || obj.tagName.toUpperCase() == "SELECT") {
        return true;
      } else {
        return false;
      }
    };

    window.onkeydown = function(e) {
        if ( e.ctrlKey ) {
          return false;
        }
      };
	
}
