
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
--------------------------------------------------------------------------------------------

Funciones incluidas:
	- Inhabilitar el botón derecho del ratón.
	- Impedir que se seleccione el texto de la página.
	- PopUp Window

--------------------------------------------------------------------------------------------
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

// Inhabilitar el botón derecho del ratón

/* Necesario incluir el la página este código:
<SCRIPT language=JavaScript>
	document.onmousedown = non;
</SCRIPT>
*/
function non(clic) 
	{
	var msg=".: detand.net :.";
	if (navigator.appName == 'Netscape' && clic.which==3) {
		alert(msg);
		return false;}
	else
		if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) 
			{
			alert(msg);
			return false;
			}
	return true;
	}

//-------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------

// Impedir que se seleccione el texto (IE4+, NS6+)
/*
function disableselect(e)
	{
	return false
	}

function reEnable()
	{
	return true
	}
//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar)
	{
	document.onmousedown=disableselect
	document.onclick=reEnable
	}
	*/


//-------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------

var win = null;
function NewWindow(mypage,myname,w,h,scroll)
	{
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	TopPosition = TopPosition - 10;
	settings =	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
	}
