/*----------------------------------
 JavaScript Document
Date: 12/04/2005
File: 
Author: ODM Studio
Purpose: Anular boton derecho modificado
----------------------------------*/

var vie=
parseFloat(navigator.appVersion.slice(navigator.appVersion.indexOf("MSIE")+4,navigator.appVersion.length));
function sinmenu()
{
event.cancelBubble = true;
event.returnValue = false;
return false;
}
function noclicderecho(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)) 
{ 
if (vie < 5) // -- para el IE4 -- \\
{
alert('Puedes personalizar este mensaje');
return false;
}
else
if (vie >= 5) // -- para el IE5 -- \\
{
document.oncontextmenu = sinmenu;
return false;
}
}
return true;
} 
document.onmousedown=noclicderecho;

// -- Desabilita el clic derecho en las capas (layers) -- \\
if (document.layers)window.captureEvents(Event.MOUSEDOWN); 
window.onmousedown=noclicderecho;

function checkImage(e) {
if (document.all) {
    if ("IMG" == event.srcElement.tagName) return false;
  } else if (document.getElementById) {
    if ("IMG" == e.target.tagName) return false;
  }
}

function filterSelectability(){
  var inputName=event.srcElement.name;
  if (typeof(inputName) == "undefined"){
    return false;
  }
  if ('INPUT'== event.srcElement.tagName) {
    return true;
  } else {
    return false;
  }
}
if(document.layers) {
  
  window.captureEvents(Event.MOUSEDOWN);
  window.onmousedown = function(e) {
    if(e.target==document || e.which == 3) return false;
  }
} else if (document.all) {
  
  document.oncontextmenu = checkImage;
  document.onselectstart= filterSelectability;
}

/*-------------------------------------------------- 
							 
									 ODM Studio
			     			On-line Developmente Media
			                http://www.odmstudio.com.mx
			             "Changing Ideas of Doing Business"
			             
			
								info@odmstudio.com.mx			
					 
-------------------------------------------------*/