
var isnn,isie
var message = "";
if(navigator.appName=='Microsoft Internet Explorer') //check the browser
{  isie=true }

if(navigator.appName=='Netscape')
{  isnn=true }

function right1(e) //to trap right click button 
{
	if (isnn && (e.which == 3 || e.which == 2 ))
		return false;
	else if (isie && (event.button == 2 || event.button == 3)) 
	{
		(message);
		return false;
	}
		return true;
}

function key1(k)   
{
	if(isie) {
		if(event.keyCode==17 || event.keyCode==18 || event.keyCode==93) {
			(message);
			return false;
		 } 
	}

	if(isnn){
		(message);
		return false; 
		}   
}

if (document.layers) window.captureEvents(Event.KEYPRESS);  
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
document.onkeydown=key1;  
document.onmousedown=right1;
document.onmouseup=right1;
window.document.layers=right1;
document.oncontextmenu=new Function("return false")


	function pp1()
	{
		for(pp=0;pp<document.all.length;pp++)
		{
			if(document.all[pp].style.visibility!='hidden')
			{
				document.all[pp].style.visibility='hidden';
				document.all[pp].id='ph';
			}
		}
	}

	function pp2()
	{
		for (pp=0;pp<document.all.length;pp++)
		{
			if(document.all[pp].id=='ph')	document.all[pp].style.visibility=''
		}
	}
		

	window.onbeforeprint=pp1;
	window.onafterprint=pp2;


	function disableSelection(target){
		if (typeof target.onselectstart!="undefined") //IE route
			target.onselectstart=function(){return false}
		else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
			target.style.MozUserSelect="none"
		else //All other route (ie: Opera)
			target.onmousedown=function(){return false}
		target.style.cursor = "default"
	}

