
// VARIABLES
var winxp = false
var otro_so = false
// MEJOR TODO EN MINÚSCULAS
var user_agent = navigator.userAgent.toLowerCase()
// DETECTO EL SISTEMA OPERATIVO
if ((user_agent.indexOf("windows nt 5.1") != -1) || (user_agent.indexOf("winnt 5.1") != -1))
  winxp = true
else
    otro_so = true

// ELIGE SEGÚN SE HAYA DETECTADO UNO U OTRO	
if (winxp)
  {
   if (window.Event)
     document.captureEvents(Event.MOUSEUP);
// ESTO ES PARA LA TECLA DEL MENÚ CONTEXTUAL DE WINDOWS
   function nocontextmenu() 
           {
            event.cancelBubble=true
            event.returnValue=false;
            return false;
           }
   function norightclick(e)
           {
	        if (window.Event) 
		      {
	           if (e.which==2||e.which==3)  
			     return false; 
		      }
		    else
                if (event.button==2||event.button==3) 
			      { 
			       event.cancelBubble=true; 
				   event.returnValue=false;
                   alert("www.cofradialaentrada.com");
                   return false;
                  }
           }
   document.oncontextmenu=nocontextmenu;
   document.onmousedown=norightclick;
  }
else 
    if (otro_so)
      {
       function right(e) 
	           {
			    if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
                  return false;
                else 
				    if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) 
					  {
                       alert ("www.cofradialaentrada.com")
                       return false;
                      }
                return true;
               }

       if (window.Event)
         document.captureEvents(Event.MOUSEUP)
   
       document.onmousedown=right
       document.onmouseup=right
       if (document.layers) 
	     window.captureEvents(Event.MOUSEDOWN)
       if (document.layers) 
	   window.captureEvents(Event.MOUSEUP)
       window.onmousedown=right;
// ESTO ES PARA LA TECLA DEL MENÚ CONTEXTUAL DE WINDOWS
       function tecla()
               {
			    event.returnValue=false <!-- AUNQUE SEA PARA UNA LÍNEA, NO PUEDO QUITAR LAS LLAVES PORQUE -->
			   }                        <!-- SI LO HAGO NO FUNCIONA ¿? --> 
       document.oncontextmenu=tecla
      }


