//检查域名提交信息
function SearchDomain(checkboxname) 
{
	var boxname;
	    boxname=checkboxname;
	var num;
         num=0;
		 //alert(getCheckedCheckboxesNum(boxname));
	     num=parseInt(getCheckedCheckboxesNum(boxname));
		 //alert(getCheckedCheckboxesValue(boxname));
	if (num>=1)
	{
		var DomainName;
		var DnsType;
	
		DomainName=document.Form1.DomainName.value;
		DnsType=getCheckedCheckboxesValue(boxname);

//URL="SearchDomain.asp?DomainName="+DomainName+"&DnsType="+DnsType;
	//window.showModalDialog(URL,"域名查询结果", "dialogWidth:300px;dialogHeight:200px;resizable:0;help:0;status:0;scroll:0");
      //window.open ("SearchDomain.asp?DomainName="+DomainName+"&DnsType="+DnsType, "newwindow", "height=400, width=400, toolbar =no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
      window.location="Domain/Domain.aspx?DomainName="+DomainName+"&DnsType="+DnsType
     }
	 else
	 {
		 alert("请至少选择一种域名类型！"); 
	 }
}
function SearchDomain2(checkboxname) 
{
	var boxname;
	    boxname=checkboxname;
	var num;
         num=0;
		 //alert(getCheckedCheckboxesNum(boxname));
	     num=parseInt(getCheckedCheckboxesNum(boxname));
		 //alert(getCheckedCheckboxesValue(boxname));
	if (num>=1)
	{
		var DomainName;
		var DnsType;
	
		DomainName=document.Form1.DomainName.value;
		DnsType=getCheckedCheckboxesValue(boxname);
		searchd.style.visibility="visible";
document.ds.location.replace("SearchDomain.asp?DnsType="+ DnsType + "&DomainName=" +DomainName);
     }
	 else
	 {
		 alert("请至少选择一种域名类型！"); 
	 }
}

function getCheckedCheckboxesNum(nameOfCheckBox)
{
	var theNum=0;
	var theCheckboxInputs=document.getElementsByName(nameOfCheckBox);
	for (var i=0;i<theCheckboxInputs.length;i++)
	{
		if(theCheckboxInputs[i].checked) theNum++;
	}
	return theNum;
}

function getCheckedCheckboxesValue(nameOfCheckBox)
{
	var theValue;
	theValue="";
	var theCheckboxInputs=document.getElementsByName(nameOfCheckBox);
	for (var i=0;i<theCheckboxInputs.length;i++)
	{
	   if(theCheckboxInputs[i].checked)
	    {
		   if (i==0)
		   {
		    theValue=theCheckboxInputs[i].value;
		    }
		   else
		   {
		    theValue=theValue+","+theCheckboxInputs[i].value;
		   }
	    }
	}
	return theValue;
}