//创建请求
var xmlHttp;
function createXMLHttpRequest(){
	if (window.ActiveXObject){
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	} else if (window.XMLHttpRequest){
		xmlHttp = new XMLHttpRequest();
	}
}

function getly(){
	var id;
	id=getid();
	}
//获得id
function getid(){
	var idlen;
	var id;
	idlen=document.URL.lastIndexOf("=")+1;
	id=document.URL.substring(idlen);
	return id;
	}
//----------------------------------------------权重查询
function checkqz_info(){
	str="";
	str=str+"domains="+(document.getElementById("searchdomainqz").value);
	createXMLHttpRequest();
	xmlHttp.open("GET","js/domainqz.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById("domainssearch").innerHTML = "==查询失败，请稍后再试==";
				} else {
					
					document.getElementById("domainssearch").innerHTML = xmlHttp.responseText;
				}
		}
	}
	xmlHttp.send();
}
//---------------------------------------------------------------------------------------------
function searchdomain_beian(){
	str="";
	str=str+"domains="+(document.getElementById("searchdomain_beian").value);
	createXMLHttpRequest();
	xmlHttp.open("GET","js/chazhuce.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById("domainssearch").innerHTML = "==查询失败，请稍后再试==";
				} else {
					
					document.getElementById("domainssearch").innerHTML = xmlHttp.responseText;
					document.getElementById("loading").innerHTML =""
				}
		}
	}
	xmlHttp.send();
}

function beianpf(){
	str="";
	str=str+"domains="+(document.getElementById("domaintxt").value);
	createXMLHttpRequest();
	xmlHttp.open("GET","/js/beianpf.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById("bmba").innerHTML = "==查询失败，请稍后再试==";
				} else {
					
					document.getElementById("bmba").innerHTML = xmlHttp.responseText;
				}
		}
	}
	xmlHttp.send();
	}


function checkdomain(domainid){
	str="";
	str=str+"domains="+domainid;
	createXMLHttpRequest();
	xmlHttp.open("GET","../js/checkdomain.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById("zhuceinfo").innerHTML = "==查询失败，请稍后再试==";
				} else {
					document.getElementById("zhuceinfo").innerHTML = xmlHttp.responseText;
				}
		}
	}
	xmlHttp.send();
}
function checkdomainlist(domainid){
	str="";
	str=str+"domains="+domainid;
	createXMLHttpRequest();
	xmlHttp.open("GET","../js/checkdomain.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById(domainid).innerHTML = "X";
				} else {
					document.getElementById(domainid).innerHTML = xmlHttp.responseText;
				}
		}
	}
	xmlHttp.send();
}

function domain_sc(domainid){
	str="";
	str=str+"domains="+domainid;
	createXMLHttpRequest();
	xmlHttp.open("GET","../js/domain_sc.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById("domain_sc"+domainid).innerHTML = "错误";
				} else {
					document.getElementById("domain_sc"+domainid).innerHTML = xmlHttp.responseText;
				}
		}
	}
	xmlHttp.send();
}

function checkdomain2(domainid){
	ids=domainid
	document.getElementById("zhuceinfo").innerHTML ="<img src='../Styles/images/loadding.gif'>";
	setTimeout("checkdomain(ids);",100);
}
function checkdomain3(domainid){
	ids=domainid
	document.getElementById(domainid).innerHTML ="<img src='../Styles/images/loadding.gif'>";
	setTimeout("checkdomainlist(ids);",100);
}
function prcheckinfo(domainid){
	str="";
	str=str+"domains="+domainid;
	createXMLHttpRequest();
	xmlHttp.open("GET","../js/prcheck.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById("prcheckid"+domainid).innerHTML = "X";
				} else {
					document.getElementById("prcheckid"+domainid).innerHTML = xmlHttp.responseText;
				}
		}
	}
	xmlHttp.send();
}
function prchecks(domainid){
	prid=domainid
	document.getElementById("prcheckid"+domainid).innerHTML ="<img src='../Styles/images/loadding.gif'>";
	setTimeout("prcheckinfo(prid);",100);
}
function bdqzcheck(domainid){
	ids=domainid
	document.getElementById("bdqzcheck"+domainid).innerHTML ="<img src='../Styles/images/loadding.gif'>";
	setTimeout("bdqzcheckinfo(ids);",100);
}
function yhlink(domainid){
	ids=domainid
	document.getElementById("yhlink"+domainid).innerHTML ="<img src='../Styles/images/loadding.gif'>";
	setTimeout("yhlinkinfo(ids);",100);
}
function bdqzcheckinfo(domainid){
	str="";
	str=str+"domains="+domainid;
	createXMLHttpRequest();
	xmlHttp.open("GET","../js/qzcheck.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById("bdqzcheck"+domainid).innerHTML = "X";
				} else {
					document.getElementById("bdqzcheck"+domainid).innerHTML = xmlHttp.responseText;
				}
		}
	}
	xmlHttp.send();
}
function yhlinkinfo(domainid){
	str="";
	str=str+"domains="+domainid;
	createXMLHttpRequest();
	xmlHttp.open("GET","../js/yhlink.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById("yhlink"+domainid).innerHTML = "X";
				} else {
					document.getElementById("yhlink"+domainid).innerHTML = xmlHttp.responseText;
				}
		}
	}
	xmlHttp.send();
}
function checkdomainreg(domainid,domainclass){
	ids=domainid
	domainc=domainclass
	document.getElementById(domainid).innerHTML ="<img src='../Styles/images/loadding.gif'>";
	setTimeout("checkdomainreginfo(ids,domainc);",100);
}
function checkdomainreginfo(domainid,domainclass){
	str="";
	str=str+"domains="+domainid+"&domainclass="+domainclass;
	createXMLHttpRequest();
	xmlHttp.open("GET","../js/checkdomainreg.asp?"+str+"&flag="+1+ "&nocache="+new Date().getTime(),true);
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
				if(xmlHttp.responseText=="") {
					document.getElementById(domainid).innerHTML = "X";
				} else {
					document.getElementById(domainid).innerHTML = xmlHttp.responseText;
				}
		}
	}
	xmlHttp.send();
}

function CheckDomain(str){
	var domainPattern = /^[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
	if (domainPattern.test(str)==false){
		return false;
	}else{
		return true;
	}
}

