
  key = function(event1){
    var evento = event1 || window.event;
    this.codigo = evento.charCode || evento.keyCode;
    this.caracter = String.fromCharCode(this.codigo);

    this.ctrlKey  = evento.ctrlKey;
    this.shiftKey = evento.shiftKey;
    this.altKey   = evento.altKey;

    this.teclas = '';
    
    switch(this.codigo){ //codigos sin caracter
      case 45: this.caracter = "ins"; break;
	}
    
	if(this.ctrlKey)  this.teclas += "ctrl + ";
	if(this.shiftKey) this.teclas += "shift + ";
	if(this.altKey)   this.teclas += "alt + ";

    this.teclas += this.caracter.toLowerCase();
  }

  function noPasteKey(evento) {
    var tecla = new key(evento);
    switch(tecla.teclas){
      case 'ctrl + v':
      case 'shift + ins':
      return false;
	}
    return true;
  }
  
  function noPaste(element){
    element.onkeydown = function(evento){
      return noPasteKey.call(element, evento);
    }
	element.oncontextmenu = function(){return false;}
  }

  function setFocusText(elemento, texto){
    jQuery(elemento).focus(function(){
      if(jQuery(this).val() == texto)
        jQuery(this).val("");
    }).blur(function(){
      if(jQuery(this).val() == '')
        jQuery(this).val(texto);
    })
  }
