if (window.Event) 
	document.captureEvents(Event.MOUSEUP); 

function nocontextmenu() 
{
	event.cancelBubble = true;
	event.returnValue = false;
	return false;
}
//下面代码实现全屏显示      
//function window.onload()   
//{      
//    var Request = new Array();//保存参数      
////    var s = location.search.substring(1);   
////    if(s && s!="")   
////    {      
////        var list = s.split("&");      
////        for(var i=0;i<list.length;i++)   
////        {      
////            var pair = list[i].split("=");      
////            if(pair[0]&&pair[0]!="") Request[unescape(pair[0])] = unescape(pair[1]);   
////        }      
////    }   
//    var  fullscreen=Request["fullscreen"];      
//    if(fullscreen!="yes")   
//    {      
//        var file=self.location;      
//        var a = window.open("about:blank","","fullscreen=yes");      
//        self.opener=null;   
//        self.close();    
//        if (file.indexOf("?")>=0)
//        a.location=file +"&fullscreen=yes";
//        else    
//          a.location=file +"?fullscreen=yes";
//    }      
//} 
function SetExam(PaperId,UserCode)
{
	if(confirm("确定要设置重考？") == false)
	return;
	window.location ="SetReExam.aspx?PaperId="+PaperId+"&UserCode="+UserCode;
}

function norightclick(e) 
{
	if (window.Event) 
	{
	if (e.which == 2 || e.which == 3)
		return false;
	}
	else
	if (event.button == 2 || event.button == 3)
	{
		event.cancelBubble = true;
		event.returnValue = false;
		return false;
	}
}

function KeyDown(){ 
//屏蔽鼠标右键、Ctrl+n、shift+F10、F5刷新、退格键
//alert("ASCII代码是："+event.keyCode);
if (window.event.keyCode==8)
{
   event.keyCode=0;
     event.returnValue=false;
}
  if ((window.event.altKey)&&
      ((window.event.keyCode==37)||   //屏蔽 Alt+ 方向键 ←
       (window.event.keyCode==39))){  //屏蔽 Alt+ 方向键 →
     alert("不准你使用ALT+方向键前进或后退网页！");
     event.returnValue=false;
     }
  if ((event.keyCode==116)||                 //屏蔽 F5 刷新键
      (event.keyCode==112)||                 //屏蔽 F1 刷新键
      (event.keyCode==27)||
      (event.ctrlKey && event.keyCode==82)){ //Ctrl + R
     event.keyCode=0;
     event.returnValue=false;
     }
  if ((event.ctrlKey)&&(event.keyCode==78))   //屏蔽 Ctrl+N
     event.returnValue=false;
  if ((event.shiftKey)&&(event.keyCode==121)) //屏蔽 shift+F10
     event.returnValue=false;
  if (window.event.srcElement.tagName == "A" && window.event.shiftKey) 
      window.event.returnValue = false;  //屏蔽 shift 加鼠标左键新开一网页
  if ((window.event.altKey)&&(window.event.keyCode==115)){ //屏蔽Alt+F4
      window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");
      return false;}
  if (window.event.keyCode==18 || window.event.keyCode==91 || window.event.keyCode==92)   //屏蔽非法键
	{
		window.event.keyCode=0;
		window.event.returnValue=false;
     }
}

document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
document.onkeydown = KeyDown;