function checkDomain(domain,type)
			{
				domain=domain.toLowerCase();
				if(domain.indexOf(".")>-1)
				{
				 	return -1;
				}
				if(type==1)//中文域名
				{
					if(/^[0-9A-Za-z\.-]{1,50}$/.test(domain)==true)
					{
						return -1;
					}
				}
				else if(/^[0-9a-z\.-]{1,50}$/.test(domain)==false)
				{
					return -1;
				}
				
				return 1;
			}
			
			function CheckForm(form,type)
			{
				len=form.suffix.length;
				var count = 0;
				for(var i=0;i<len;i++)
				{
					if(form.suffix[i].checked)
						count++;
				}
				
				if(count<1 || count>10)
				{
					alert("为保证查询速度,每次最多允许查询10个域名");
					return false;
				}
				
				form.DomainName.value=form.DomainName.value.replace(/ /g,"");
				form.DomainName.value=form.DomainName.value.replace(/\.{2,}/g,".");
				form.DomainName.value=form.DomainName.value.replace(/^\.{1,}/,"");
				form.DomainName.value=form.DomainName.value.replace(/\.{1,}$/,"");
				form.DomainName.value=form.DomainName.value.toLowerCase();
				
				if(form.DomainName.value==''){
					alert("请输入域名!");
					form.DomainName.focus();
					return false;
				}
				if(/^(www\.)/.test(form.DomainName.value)){
					alert('域名前面不用输入www.');
					form.DomainName.focus();
					return false;
				}
				
				if(form.DomainName.value.length<3 && type==0){
					alert("英文域名长度不能小于3");
					form.DomainName.focus();
					return false;
				}
				if(form.DomainName.value.length<2 && type==1){
					alert("中文域名长度不能小于2");
					form.DomainName.focus();
					return false;
				}
				
				var domain=checkDomain(form.DomainName.value,type);
				if(domain<1) {
					alert("请输入正确的域名!!");
					form.DomainName.focus();
					return false;
				}
}

document.writeln("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">");
document.writeln("      <tr>");
document.writeln("                                      <td width=\"274\" valign=\"top\" align=\"center\"><table width=\"274\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">                                        ");
document.writeln("											 <tr>");
document.writeln("                                            <td width=\"274\"><img src=\"Template/www/images/check_top.jpg\" width=\"274\" height=\"12\" /></td>");
document.writeln("                                          </tr>");
document.writeln("                                          <tr>");
document.writeln("                                            <td background=\"Template/www/images/check_bg.jpg\"><table width=\"230\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
document.writeln("                                                 <form id=\"form11\" name=\"form11\" onSubmit=\"return CheckForm(this,0)\" method=\"post\" action=\"http://dns.ww178.com/domain/domaincheck.aspx\" target=\"_blank\">");
document.writeln("												<tr>");
document.writeln("                                                  <td height=\"47\" align=\"left\"><img src=\"Template/www/images/check_1.jpg\" width=\"132\" height=\"33\" /></td>");
document.writeln("                                                </tr>");
document.writeln("                                                <tr>");
document.writeln("                                                  <td height=\"1\" background=\"Template/www/images/check_xu_line.jpg\"></td>");
document.writeln("                                                </tr>");
document.writeln("                                                <tr>");
document.writeln("                                                  <td><table width=\"100%\" height=\"35\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
document.writeln("                                                      <tr>");
document.writeln("                                                        <td width=\"24%\" align=\"center\"><img src=\"Template/www/images/www.jpg\" width=\"43\" height=\"14\" /></td>");
document.writeln("                                                        <td width=\"50%\" align=\"left\"><input name=\"DomainName\" type=\"text\" id=\"DomainName\" size=\"17\" maxlength=\"32\" class=\"input\"/></td>");
document.writeln("                                                        <td width=\"26%\" align=\"center\"><input type=\"image\" src=\"Template/www/images/btn_search.gif\" border=\"0\" name=\"img\" width=\"55\" height=\"22\" align=\"left\" class=\"submit\"></td>");
document.writeln("                                                      </tr>");
document.writeln("                                                  </table></td>");
document.writeln("                                                </tr>");
document.writeln("                                                <tr>");
document.writeln("                                                  <td><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"all\">");
document.writeln("                                                      <tr>");
document.writeln("                                                        <td width=\"24\" align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".com\"  checked class=\"checkbox\"></td>");
document.writeln("                                                        <td width=\"51\" align=\"left\">.com</td>");
document.writeln("                                                        <td width=\"24\" align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                 value=\".com.cn\" class=\"checkbox\"></td>");
document.writeln("                                                        <td width=\"64\" align=\"left\">.com.cn</td>");
document.writeln("                                                        <td width=\"25\" align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".cn\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.cn</td>");
document.writeln("                                                      </tr>");
document.writeln("                                                      <tr>");
document.writeln("                                                        <td align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".net\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.net</td>");
document.writeln("                                                        <td align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".net.cn\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.net.cn</td>");
document.writeln("                                                        <td align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".name\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.name</td>");
document.writeln("                                                      </tr>");
document.writeln("                                                      <tr>");
document.writeln("                                                        <td align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".org\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.org</td>");
document.writeln("                                                        <td align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".org.cn\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.org.cn</td>");
document.writeln("                                                        <td align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".mobi\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.mobi</td>");
document.writeln("                                                      </tr>");
document.writeln("													 ");
document.writeln("                                                  </table></td>");
document.writeln("                                                </tr></FORM>");
document.writeln("                                            </table></td>");
document.writeln("                                          </tr>");
document.writeln("                                          <tr>");
document.writeln("                                            <td valign=\"top\"><img src=\"Template/www/images/check_down.jpg\" width=\"274\" height=\"12\" /></td>");
document.writeln("                                          </tr>");
document.writeln("                                      </table></td>");
document.writeln("                                      <td width=\"6\"></td>");
document.writeln("                                      <td width=\"274\" valign=\"top\" align=\"center\"><table width=\"274\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("                                          	    ");
document.writeln("											  <tr>");
document.writeln("                                            <td width=\"274\"><img src=\"Template/www/images/check_top.jpg\" width=\"274\" height=\"12\" /></td>");
document.writeln("                                          </tr>");
document.writeln("                                          <tr>");
document.writeln("                                            <td background=\"Template/www/images/check_bg.jpg\"><table width=\"230\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
document.writeln("                                               <form id=\"form12\" name=\"form12\" onSubmit=\"return CheckForm(this,1)\" method=\"post\" action=\"http://dns.ww178.com/domain/domaincheck.aspx\" target=\"_blank\" >");
document.writeln("												<tr>");
document.writeln("                                                  <td height=\"47\" align=\"left\"><img src=\"Template/www/images/check_2.jpg\" width=\"132\" height=\"33\" /></td>");
document.writeln("                                                </tr>");
document.writeln("                                                <tr>");
document.writeln("                                                  <td height=\"1\" background=\"Template/www/images/check_xu_line.jpg\"></td>");
document.writeln("                                                </tr>");
document.writeln("                                                <tr>");
document.writeln("                                                  <td><table width=\"100%\" height=\"35\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
document.writeln("                                                     ");
document.writeln("													 ");
document.writeln("													  <tr>");
document.writeln("                                                        <td width=\"24%\" align=\"center\"><img src=\"Template/www/images/www.jpg\" width=\"43\" height=\"14\" /></td>");
document.writeln("                                                        <td width=\"50%\" align=\"left\"><input name=\"DomainName\" type=\"text\" id=\"DomainName\" size=\"17\" maxlength=\"32\" class=\"input\"/></td>");
document.writeln("                                                        <td width=\"26%\" align=\"center\"><input type=\"image\" src=\"Template/www/images/btn_search.gif\" border=\"0\" name=\"img2\" width=\"55\" height=\"22\" align=\"left\" class=\"submit\"></td>");
document.writeln("                                                      </tr>");
document.writeln("                                                  </table></td>");
document.writeln("                                                </tr>");
document.writeln("                                                <tr>");
document.writeln("                                                  <td><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"all\">");
document.writeln("                                                      <tr>");
document.writeln("                                                        <td width=\"24\" align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".com\"  checked class=\"checkbox\"></td>");
document.writeln("                                                        <td width=\"51\" align=\"left\">.com</td>");
document.writeln("                                                        <td width=\"24\" align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".net\" class=\"checkbox\"></td>");
document.writeln("                                                        <td width=\"64\" align=\"left\">.net</td>");
document.writeln("                                                        <td width=\"25\" align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                 value=\".cc\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.cc</td>");
document.writeln("                                                      </tr>");
document.writeln("                                                      <tr>");
document.writeln("                                                        <td align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".中国\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.中国</td>");
document.writeln("                                                        <td align=\"left\"><INPUT name=\"suffix\" type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".网络\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.网络</td>");
document.writeln("                                                        <td align=\"left\"><INPUT name=\"suffix\"  type=checkbox id=\"suffix\" ");
document.writeln("                  value=\".公司\" class=\"checkbox\"></td>");
document.writeln("                                                        <td align=\"left\">.公司</td>");
document.writeln("                                                      </tr>");
document.writeln("                                                      <tr>");
document.writeln("                                                        <td colspan=\"6\" align=\"center\">&nbsp;<img src=\"Template/www/images/domainbackorder.gif\"></td>");
document.writeln("                                                      </tr>");
document.writeln("                                                  </table></td>");
document.writeln("                                                </tr></FORM>");
document.writeln("                                            </table></td>");
document.writeln("                                          </tr>");
document.writeln("                                          <tr>");
document.writeln("                                            <td valign=\"top\"><img src=\"Template/www/images/check_down.jpg\" width=\"274\" height=\"12\" /></td>");
document.writeln("                                          </tr>");
document.writeln("                                      </table>");
document.writeln("									  </td>");
document.writeln("</tr>");
document.writeln("</table>");
			
