function xise_cn()
{
 
 if (event.button==2)alert('谢谢!\n\n请登录后下载资源! ')
}
//是否都为数字
function isDigit(s)
{	
	var patrn=/^[0-9]{1,20}$/;	
	if (!patrn.exec(s)) 
	{
		return false
	}	
	return true;
}
//验证电话号码位数
function Verify(form)
{
	if(!isDigit(form.number.value))
	{
		alert("不能为空或必须输入数字！")
		form.number.focus();
	}
	else
	{
		if(form.number.value.length!=4)
		{
			alert("请输入条形码前四位号码！")
			form.number.focus();
		}
		else
		{
			var nwin = null;
        if(nwin!=null) nwin.close();
        var url = "Verify.asp?num="+form.number.value;
        nwin = open(url,"", "width=310,height=200,resizable=no,scrollbars=no,toolbar=no,userbar=no,location=no,statusbar=yes,menubar=no,top=190,left=220");
		}
	}	
      
}

function GetProNumber(number)
{
	if(number!='')
	{
	var nwin = null;
	if(nwin!=null) nwin.close();
	var url = "ProductIntro.asp?id="+number;
	nwin = open(url);
	}
}
function GetCaseNumber(number)
{
	if(number!='')
	{
	var nwin = null;
	if(nwin!=null) nwin.close();
	var url = "CaseShow.asp?ID="+number;
	nwin = open(url);
	}
}

function Chick()
{
	if(document.searchform.ProType.value=="")
	{
		alert("请输入要搜索的类型名!");
		document.searchform.ProType.focus();
		return false;
	}
	//return true;
}
function Show(DownID)
{
		var nwin = null;
        if(nwin!=null) nwin.close();
        var url = "LoadChick.asp?ID="+DownID;
        nwin = open(url,"", "width=170,height=80,resizable=no,scrollbars=no,toolbar=no,userbar=no,location=no,statusbar=yes,menubar=no,top=190,left=220");
      
}
function Change()
{
		var nwin = null;
        if(nwin!=null) nwin.close();
        var url = "ChangePwd.asp";
        nwin = open(url,"", "width=243,height=150,resizable=no,scrollbars=no,toolbar=no,userbar=no,location=no,statusbar=yes,menubar=no,top=190,left=220");
      
}



function ChangeIntro()
{
		var nwin = null;
        if(nwin!=null) nwin.close();
        var url = "Revises.asp";
        nwin = open(url,"", "width=360,height=370,resizable=no,scrollbars=no,toolbar=no,userbar=no,location=no,statusbar=yes,menubar=no,top=190,left=220");
      
}

function chklogon(myform)
{
    with(myform)
	{
      if(!memtype[0].checked && !memtype[1].checked && !memtype[2].checked)
	  {
        alert("请选择您的会员类型！");
        memtype[0].focus();
        return false;
      }
      else
	  {
        if(memtype[0].checked)
          action= "Chick_Login.asp?Type=1";
        else if(memtype[1].checked)
          action="Chick_Login.asp?Type=0";
		else if(memtype[2].checked)
		  action="Chick_Login.asp?Type=2";
        if(UserName.value=="")
		{
          alert('请输入您的用户名！');
          UserName.focus();
          return false;
        }
        else if(PassWord.value=="")
		{
          alert("请输入您的密码！");
          PassWord.focus();
          return false;
        }
        else
          return true;
      }
    }
}
//===================================
function reg()
{
    with(myform)
	{
      if(memtype[0].checked)
	  {
		var nwin = null;
        if(nwin!=null) nwin.close();
        var url = "MemberReg.asp?UserType=Company";
        nwin = open(url,"","");
        //location.href = "MemberReg.asp?UserType=Company";

      }
      else if(memtype[1].checked)
	  {
		var nwin = null;
        if(nwin!=null) nwin.close();
        var url = "MemberReg.asp?UserType=Indi";
        nwin = open(url,"","");
        //location.href = "MemberReg.asp?UserType=Indi";

      }
      
      else if(memtype[2].checked)
	  {
	  	alert("对不起，该会员不支持注册！")
	  }
	  else{
	  	
        alert("请选择您要注册的会员类型");
        memtype[0].focus();

      }
    }
}

  var nwin = null;
  function getpass(){
    with(myform){
      if     (memtype[0].checked) memt = "Company";
      else if(memtype[1].checked) memt = "Indi";
      else if(memtype[2].checked) memt="other"
      else                        memt = "";

      if(memt == ""){
        alert("请选择会员类型！");
        memtype[0].focus();
      }
      else if(UserName.value==""){
        alert("请输入您的用户名！");
        UserName.focus();
      }
	  else if(memt=="other")
	  {
	  	alert("对不起，该会员类型不支持此操作，请与管理员联系！");
		memtype[0].focus();
	  }
      else{
        if(nwin!=null) nwin.close();
        var url = "GetPass.asp?UserName="+UserName.value+"&memtype="+memt;
        nwin = open(url,"", "width=270,height=100,resizable=no,scrollbars=no,toolbar=no,userbar=no,location=no,statusbar=yes,menubar=no,top=190,left=220");
      }
    }
  }
