﻿<!--

function NonESC(evt) //禁用ESC (要加在 body onkeydown)
{
	evt = evt ? evt : (window.event ? window.event : null);

	if(evt)
		if (evt.keyCode == 27)
		{
			if(window.event)
				evt.returnValue = false; //這是IE的
			else
				evt.preventDefault(); //這是FireFox的
			return false;
		}
}

function NonESC_SFCS_eventAppend_Before(event_obj, eventFunctionStr)
{
	if(eval(event_obj))
	{
		Str = new String(eval(event_obj));
		Str += eventFunctionStr + " anonymous();";
		eval(event_obj + '= new Function(Str);');
	}
	else
	{
		eval(event_obj + '= new Function(eventFunctionStr);');
	}
}
//alert(document.body.onkeypress);

//NonESC_SFCS_eventAppend_Before("document.body.onkeypress"," NonESC(event);");
//NonESC_SFCS_eventAppend_Before("document.body.onkeyup"," NonESC(event);");

if(document.all)
{
	NonESC_SFCS_eventAppend_Before("document.body.onkeydown"," NonESC(event);"); //for IE
}	

// -->
