function CheckIfEnglish( String )
{ 
    var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-";
     var i;
     var c;
      if(String.charAt( 0 )=='-')
	return false;
      if( String.charAt( String.length - 1 ) == '-' )
          return false;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}
function CheckIfEng( String )
{ 
    var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-.";
     var i;
     var c;
      if(String.charAt( 0 )=='-')
	return false;
      if( String.charAt( String.length - 1 ) == '-' )
          return false;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}

function CheckIfEint( String )
{ 
    var Letters = "1234567890-.";
     var i;
     var c;
      if(String.charAt( 0 )=='-')
	return false;
      if( String.charAt( String.length - 1 ) == '-' )
          return false;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}
function checkdomain() {

	if (document.comdomain.domain.value == "") {
		alert("域名不能为空");
		document.comdomain.domain.focus();
		return false;
	}

if (!CheckIfEng(document.comdomain.domain.value )) {
		alert("\t注意：域名应输入英文不能输入中文及非法字符！\n域名由不分大小写的英文字母和数字组成，除了开头和结尾以外，中间也可以含有“-”（即连字符或称减号）最大长度为26个字符；");
		document.comdomain.domain.focus();
		return false;
	}
	if(document.comdomain.root1.checked==true){
		root1=document.comdomain.root1.value;
//		alert(root1);
	}else{root1="";}
		if(document.comdomain.root2.checked==true){
		root2=document.comdomain.root2.value;
		}else{root2="";}
				if(document.comdomain.root3.checked==true){
		root3=document.comdomain.root3.value;
		}else{root3="";}
		if(document.comdomain.root4.checked==true){
		root4=document.comdomain.root4.value;
		}else{root4="";}
		if(document.comdomain.root5.checked==true){
		root5=document.comdomain.root5.value;
		}else{root5="";}
		if(document.comdomain.root6.checked==true){
		root6=document.comdomain.root6.value;
		}else{root6="";}
		if(document.comdomain.root7.checked==true){
		root7=document.comdomain.root7.value;
		}else{root7="";}
		if(document.comdomain.root8.checked==true){
		root8=document.comdomain.root8.value;
		}else{root8="";}
		if(document.comdomain.root9.checked==true){
		root9=document.comdomain.root9.value;
		}else{root9="";}
		if(document.comdomain.root10.checked==true){
		root10=document.comdomain.root10.value;
		}else{root10="";}
		if(document.comdomain.root11.checked==true){
		root11=document.comdomain.root11.value;
		}else{root11="";}
		if(document.comdomain.root12.checked==true){
		root12=document.comdomain.root12.value;
		}else{root12="";}
		if(document.comdomain.root13.checked==true){
		root13=document.comdomain.root13.value;
		}else{root13="";}
		if(document.comdomain.root14.checked==true){
		root14=document.comdomain.root14.value;
		}else{root14="";}
		if(document.comdomain.root15.checked==true){
		root15=document.comdomain.root15.value;
		}else{root15="";}
		if(document.comdomain.root16.checked==true){
		root16=document.comdomain.root16.value;
		}else{root16="";}
		if(document.comdomain.root17.checked==true){
		root17=document.comdomain.root17.value;
		}else{root17="";}
		if(document.comdomain.root18.checked==true){
		root18=document.comdomain.root18.value;
		}else{root18="";}
		if(document.comdomain.root19.checked==true){
		root19=document.comdomain.root19.value;
		}else{root19="";}
		if(document.comdomain.root20.checked==true){
		root20=document.comdomain.root20.value;
		}else{root20="";}

allroot=root1+","+root2+","+root3+","+root4+","+root5+","+root6+","+root7+","+root8+","+root9+","+root10+","+root11+","+root12+","+root13+","+root14+","+root15+","+root16+","+root17+","+root18+","+root19+","+root20;
//alert(allroot);
if(allroot.indexOf(".")==-1){
	alert("请至少选择一个域名后缀进行查询。");
	document.comdomain.root1.focus();
	return false;
}

document.comdomain.root.value=allroot;
//alert("域名数据库查询需要较长时间，请您耐心等待。");
//if((confirm("域名数据库查询需要较长时间，请您耐心等待。\n\n是否继续查询？"))==true) {
	return true;
//}else{return false;}
}


