﻿//发送数据
var onDiv = null;	//
function SendRequest(method,url,div)
{
	CreateRequest();
	onDiv=document.getElementById(div);
	//onDiv.innerHTML = "数据处理中...";
	xmlHttp.onreadystatechange = ProcessRequest;
	xmlHttp.open(method,url,true);
	xmlHttp.send(null);	
}
//处理信息
function ProcessRequest()
{
	if (xmlHttp.readyState == 4)
	{
		if (xmlHttp.status == 200)
		{
			if (xmlHttp.responseText!="")
			{
				//自定义屏蔽IP列表
				var ip="60.209.106.206|122.4.64.211"; //定义IP列表，用"|"号隔开
				var sIP=ip.split("|");
				for (var i=0;i<sIP.length;i++)
				{
					if(xmlHttp.responseText==sIP[i])
					{
						onDiv.style.display='none';	//隐藏
						window.location='/limit.html'; //自定义定位页面
					}
					else
					{
						//按原内容显示
					}
				}
			}
			else
			{
				onDiv.innerHTML = "Error!";	
			}
		}
		else
		{
			alert("页面出现异常!");	
		}
	}
}