﻿// JScript File
//Prevent paste shortcut keystroke
function checkCtrlIns(evt) {
	//First try the event argument to detect for FF
	if(evt.ctrlKey==true && evt.which==86){
		return false
	};
	//Now handle IE, Safari and NS
	if (event.ctrlKey==1 || event.keyCode==45) {
		return false
	} else {
		return true
	}
}
//Prevent paste shortcut mouse click
function browser(evt) {
	//First try the event argument to detect for FF
	mbtn = (window.Event) ? evt.which : evt.button;
	if (mbtn==2 || mbtn ==3) {
		document.oncontextmenu=new Function("return false")
		return false;
	}
	//Now handle IE, Safari and NS
	if (event.button == 2)  {
		if (navigator.appName == 'Microsoft Internet Explorer') {
			clickIE()
		} else if (navigator.appName == 'Netscape') {
			clickNS
		} else {
			clickNS
		}
		function clickIE() {
			if (document.all) {
				return false;
			}
		}
		function clickNS(e) {
			if (document.layers || (document.getElementById && !document.all)) {
				if (e.which==2 || e.which==3) {
					return false;
				}
			}
		}
		if (document.layers) {
			document.captureEvents(Event.MOUSEDOWN);
			document.onmousedown=clickNS;
		} else {
			document.onmouseup=clickNS;
			document.oncontextmenu=clickIE;
		}
		document.oncontextmenu=new Function("return false")
	}
}
function reenable() {
	function clickIE() {
		if (document.all) {
			return true;
		}
	}
	function clickNS(e) {
		if (document.layers || (document.getElementById && !document.all)) {
			if (e.which==2||e.which==3) {
				return true;
			}
		}
	}
	if (document.layers) {
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=clickNS;
	} else {
		document.onmouseup=clickNS;
		document.oncontextmenu=clickIE;
	}
	document.oncontextmenu=new Function("return true")
}

