// JavaScript Document
<!--
 
var message="";
//click in Internet Explorer
function clickIE(e){
	if (document.all){
		(message);
		return false;
	}
}

//click in Netscape
function clickNS(e) {
	if(document.layers||(document.getElementById&&!document.all)){
		if (e.which==2||e.which==3) {
			(message);
			return false;
		}
	}
}

//apply disabled click feature in page
function disableClick(){
	if (document.layers){
		document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
	else{
		document.onmouseup=clickNS;document.oncontextmenu=clickIE;}	 
	document.oncontextmenu=new Function("return false");
}

//function disable selection in navigator
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"
}

//check the browser
var isie, ismff;
if(navigator.appName=='Microsoft Internet Explorer'){
	isie=true
}
if (navigator.appName=='Mozilla Firefox'){
	ismff = true;
}

//function on key press
function key(k)  
{
      if(isie) {
            if(event.keyCode==17 || event.keyCode==18 || event.keyCode==93) {
                  //alert("Sorry, you do not have permission to press this key.");
                  return false;
             }
      }else	if (navigator.appName=='Opera'){
			if(event.keyCode==17 || event.keyCode==18 || event.keyCode==93) {
				alert("Sorry, you do not have permission to press this key.");
				return false; 
			}
	  }  
}

//disabled combination key ctrl and other key
function disableCtrlKeyCombination(e)
{
        //list all CTRL + key combinations you want to disable
        var forbiddenKeys = new Array('a', 'c', 'x', 'v', 's');
        var key;
        var isCtrl;

        if(window.event)
        {
                key = window.event.keyCode;     //IE
                if(window.event.ctrlKey)
                        isCtrl = true;
                else
                        isCtrl = false;
        }
        else
        {
                key = e.which;     //firefox
                if(e.ctrlKey)
                        isCtrl = true;
                else
                        isCtrl = false;
        }

        //if ctrl is pressed check if other key is in forbidenKeys array
        if(isCtrl)
        {
                for(i=0; i<forbiddenkeys .length; i++)
                {
                        //case-insensitive comparation
                        if(forbiddenKeys[i].toLowerCase() == String.fromCharCode(key).toLowerCase())
                        {
                                alert('Key combination CTRL + '
                                        +String.fromCharCode(key)
                                        +' has been disabled.');
                                return false;
                        }
                }
        }
        return true;
}