//--------------------------------------------------------------
// Estas funciones deshabilitan el botón derecho del ratón y 
// la tecla "C" (para evitar CTRL-C), así como la posibilidad de 
// seleccionar el texto.
//--------------------------------------------------------------



  function BrowserCheck() {
      var b = navigator.appName
      if (b=="Netscape") this.b = "ns"
      else if (b=="Microsoft Internet Explorer") this.b = "ie"
      else this.b = b
 
      this.version = navigator.appVersion
      this.v = parseInt(this.version)
      this.ns = (this.b=="ns" && this.v>=4)
      this.ns4 = (this.b=="ns" && this.v==4)
      this.ns5 = (this.b=="ns" && this.v==5)
      this.ie = (this.b=="ie" && this.v>=4)
      this.ie4 = (this.version.indexOf('MSIE 4')>0)
      this.ie5 = (this.version.indexOf('MSIE 5')>0)
      this.min = (this.ns||this.ie)
    }

   is = new BrowserCheck()
   document.onkeydown = noPulsarC
   if (is.ns) document.captureEvents(Event.KEYDOWN)

   document.onmousedown = mouseDown
   if (is.ns) document.captureEvents(Event.MOUSEDOWN)

   //if IE4+
   document.onselectstart=new Function ("return false")
   //if NS6
   if (window.sidebar){
      document.onmousedown=disableselect
      document.onclick=reEnable
   }


   function mouseDown(e) {
     if ((is.ns && e.which == 1) || (is.ie && event.button == 1)) {
      } else {
         if (is.ie) alert("Esta opción se encuentra desactivada.")
         else if (is.ns) setTimeout('alert("Esta opción se encuentra desactivada.")',50)
      }
    }

   function noPulsarC(e) {
      var tecla;
 
      if (is.ie) tecla = String.fromCharCode(event.keyCode);
      else tecla = String.fromCharCode(e.which);

      if(tecla.toUpperCase() == 'C')
         if (is.ie) alert("Esta opción se encuentra desactivada.")
         else if (is.ns) setTimeout('alert("Esta opción se encuentra desactivada.")',50)
   }

   function disableselect(e){
      return false
   }

   function reEnable(){
      return true
   }


