function document_onKeyDown(e)
{
	
	var nElement, sEvent, nKeyCode, oSource;
	
	if (top.m_bSubmitting==null)
	{
		if (bPageSubmitting=="locked")
		{
			return(false);
		}
		else
		{
			if (bPageSubmitting=="lock") 
			{
				bPageSubmitting="locked";
			}  
		}
	}
	else
	{
		if (top.m_bSubmitting=="locked")
		{
			return(false);
		}
		else
		{
			if (top.m_bSubmitting=="lock") 
			{
				top.m_bSubmitting="locked";
			}  
		}

	}	

	//Get events
	nKeyCode = event.keyCode;
	oSource = event.srcElement;
	
	//Debug process
	if (event.ctrlKey && event.shiftKey)
	{
		//If in debug mode, process debug request
		if (window.m_bDebugMode)
		{
			Debugger(nKeyCode-64)
		}
		
		//Kill keystroke
		return false; //does not always work
	}
	

 
 if(window.event)
 {
     handleKeysForIE();
 }
 else
 {
 
//    key = e.event.which;
//    if(e.ctrlKey)
//    {
//        if(e.charCode = 65){
//        alert("control disabled");
//        return false;
//        }
//    }
      
 }   

}

function handleKeysForIE()
{
    //Ctrl key events
	if (event.ctrlKey)
	{
		switch (event.keyCode)
		{
			case 65: //a
			//Kill ctrl + a
			alert("Ctrl A disabled");
			return false;
		
			case 66: //b
			//Kill ctrl + b
			alert("Ctrl B disabled");
			return false;
				
			case 67: 
			//Kill ctrl + c, copy
			alert("Copy is not enabled");
			return false;
				
			case 68: //d
			//Kill ctrl + d
			alert("Ctrl D disabled");
			return false;

			case 69: //e
				//Kill ctrl + e
				alert("Ctrl E disabled");
				return false;
				
			case 70: //e
				//Kill ctrl + f, (Find utility)
				alert("Find is not enabled");
				return false;

			case 72: //h
				//Kill ctrl + h
				alert("Ctrl H disabled");
				return false;

			case 73: //i
				//Kill ctrl + i
				alert("Ctrl I disabled");
				return false;
				
			case 76: //l
				//Kill ctrl + l
				alert("Ctrl L disabled");
				return false;

			case 78: //n
				//Kill ctrl + n
				alert("Ctrl N disabled");
				return false;
				
			case 79: //o
				//Kill ctrl + o
				alert("Ctrl O disabled");
				return false;
				
			case 80: //p
				//Kill ctrl + p, Print shortcut
				alert("Print shortcut is not enabled!");
				return false;

			case 82: //r
			//Kill ctrl + r
			alert("Ctrl R disabled");
			return false;
				
			case 86: //v
			//Kill ctrl + v
			alert("Paste is not enabled");
			return false;
				
			case 87: //w
			//Kill ctrl + w
			alert("Ctrl W disabled");
			return false;
				
			case 88: 
			//Kill ctrl + x
			alert("Cut is not enabled");
			return false;

			case 90: //z
			//Kill ctrl + z
			alert("Ctrl Z disabled");
			return false;
		
			default:
		}
	}

}
		
