//禁止右键
function click(e) {
	if (document.all) {
		if (event.button==1||event.button==2||event.button==3) {
			oncontextmenu='return false';
		}
	}
	if (document.layers) {
		if (e.which == 3) {
			oncontextmenu='return false';
		}
	}
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
/* hotkey即为热键的键值,是ASII码,这里99代表c键 */
/* 
var travel=true
var hotkey=17　 
if (document.layers)
	document.captureEvents(Event.KEYDOWN)
	
function gogo(e){ 
	if (document.layers) {
		if (e.which==hotkey&&travel){alert("操作错误.或许是您按错了按键!"); } 
	}
	else if (document.all){
		if (event.keyCode==hotkey&&travel) {alert("操作错误.或许是您按错了按键!"); }
	}
}
document.onkeydown=gogo 
*/

//防止全部另存为html和mht，但无法防止仅存本页和txt
if(document.all)document.write('<link rel=stylesheet type="text/css" href="ehp_null.css">')

//禁止本地查看，不信你可以试试（先另存为，然后直接双击打开） 
wside=(window.sidebar)?true:false;
var w456=false;
function f369w(){
	document.location="";w456=true;return;
}
if(window.location.protocol.indexOf("file")!=-1){f369w();}

//禁止选中
document.onselectstart=new Function("return false")

function nsel(){
	if((document.layers)||wside){
		var qwe= document.getSelection();
		if(qwe!=""){window.find(" ")};
		setTimeout("nsel()",20);
	}
}
nsel();

//禁止拖拉
function disdrag(){
	if(document.all){
		document.ondragstart= new Function("return false")
		for (I = 0; I< document.images.length; I++){
			z = document.images(I);
			z.galleryImg = 'no';
		}
	}
}
disdrag();

//禁止Opera用户
if(navigator.userAgent.indexOf('Opera')!=-1){
	alert("This web page does not support Opera Browser.");
	window.location="about:blank";
}

//禁止非发使用Iframe连接本网页
if (top.location != self.location){
	top.location = self.location;
}

//禁止状态栏看到链接地址
function wwddd(){
	window.status=" ";
	setTimeout("wwddd()",10);
}
wwddd();

//双击鼠标滚动屏幕的代码
var currentpos,timer;
function initialize()
{
timer=setInterval ("scrollwindow ()",30);
}
function sc()
{
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos !=document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
