//运行程序
function Shell(FilePath)
{
	var obj;
	obj = new ActiveXObject("WScript.Shell");
	obj.Run(FilePath);
	obj = null;
}

//打开屏幕键盘
function OpenKeyboard()
{
	try
	{
		Shell("osk.exe");
	}catch(e){
		alert(e.toString()+"\n启动屏幕键盘出错\n请确认浏览器安全设置中ActiveX控件和插件（对没有标记为安全的ActiveX控件进行初始化和脚本运行）选项为启用！");
	}
}

function OpenScreenKeyboard()
{
//	OpenKeyboard();
}

//运行程序
function KillProcess(processname)
{
	var obj;
	obj = new ActiveXObject("Shell.Application");
	//obj.ShellExecute("tskill.exe", processname,"" ,"",0);
	obj=null;
}

//关闭屏幕键盘
function CloseKeyboard()
{
	try
	{
		KillProcess("osk");
	}catch(e){
		//alert(e.toString()+"\n关闭屏幕键盘出错\n请确认浏览器安全设置中ActiveX控件和插件（对没有标记为安全的ActiveX控件进行初始化和脚本运行）选项为启用！\n并且启动终端服务！");
	}
}

function CloseScreenKeyboard()
{
//	CloseKeyboard();
}

//屏幕键盘控制
function ScreenKeyboardControl()
{
	var objTagName;
	var objType;
	var blnOpen;
	var obj;
	try{
		obj=window.event.srcElement;
		objTagName=obj.tagName;
		blnOpen=false;
		if(objTagName=="INPUT"){
			objType=obj.type;
			if(objType=="text" || objType=="password"){
				blnOpen=true;
			}
		}
		if(blnOpen){
			OpenKeyboard();
		}else{
			CloseKeyboard();
		}
	}catch(e){
		//alert(e.toString());
	}
}

//打开新窗口
function OpenFullScreenWindow(strUrl)
{
	OpenFullWindow(strUrl,"_blank");
}

function OpenFullWindow(strUrl,WindowName)
{
    window.open(strUrl,WindowName,"resizable=yes,scrollbars=yes,fullscreen=yes");
}

function HideMenu(){}
//document.onmousemove=HideMenu ;
function returncontextmenu(){return false;}
//document.oncontextmenu=returncontextmenu ;
function returndragstart(){return false;}
//document.ondragstart=returndragstart ;
function returnselectstart(){return false;}
//document.onselectstart =returnselectstart ;
function returnselect(){document.selection.empty();}
//document.onselect=returnselect ;
function returncopy(){document.selection.empty();}
//document.oncopy=returncopy ;      
function returnbeforecopy(){return false;}
//document.onbeforecopy=returnbeforecopy ; 
function returnmouseup(){return false;}
//document.onmouseup=returnmouseup;

//屏幕键盘自动控制
//document.onmousedown=ScreenKeyboardControl;
//document.onkeyup=ScreenKeyboardControl;