﻿/*防止被人frame*/
if(top.location != self.location)top.location=self.location;

/*全屏显示*/
//self.moveTo(0,0)
//self.resizeTo(screen.availWidth,screen.availHeight)

/*双击鼠标滚动屏幕的代码*/
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

/*防注入*/
var url = location.search;
var re=/^\?(.*)(select%20|insert%20|delete%20from%20|count\(|drop%20table|update%20truncate%20|asc\(|mid\(|char\(|xp_cmdshell|exec%20master|net%20localgroup%20administrators|\"|:|net%20user|\'|%20or%20)(.*)$/gi;
var e = re.test(url);
if(e)
{
    alert("很抱歉，由于您提交的内容中含有危险的SQL注入代码，致使本次操作无效！");
    history.go(-1);
}

/*脚本永不出错*/
function killErrors()
{
   return true;
}
window.onerror = killErrors;


document.body.oncopy = function () { 
	setTimeout( function () { 
		var text = clipboardData.getData("text");
		if (text) { 
			text = text + "\r\n本文来自网络，详细请参考："+location.href; clipboardData.setData("text", text);
		} 
				}, 100 ) 
}
