﻿//登录验证
function xxx(){
//window.open("AccountOrderTrade.aspx");
}

function Login(){
	var username=document.getElementById("txtusername");
    var password=document.getElementById("txtpassword");
	var yzm=document.getElementById("txtyzm");
    if (trim(username.value) == "")
    {
		alert("用户名不能为空!");
		return false;
    }
    else if (trim(password.value)== "")
    {
		alert("密码不能为空!");
		return false;
    }
	else if(trim(yzm.value) == "")
	{
		alert("验证码不能为空!");
		return false;
	}
}
function SubmitHuiCheEvent(image)
{
  if(event.keyCode==13)//13是指回车键
  {
     image.focus();
  }
}

// JavaScript Document

function OldPassWord()
{
    var txtOldPass=document.getElementById("ctl00$MastRight$txtOldPass");
	var lbOldPass=document.getElementById("ctl00_MastRight_lbOldPass");
	
    var txtpassword=document.getElementById("ctl00$MastRight$txtpassword");
	var lbpass=document.getElementById("ctl00_MastRight_lbpass");
	
    var txtMpassword=document.getElementById("ctl00$MastRight$txtMpassword");
	var lbMpass=document.getElementById("ctl00_MastRight_lbMpass");
	var lbMpass2=document.getElementById("ctl00_MastRight_lbMpass2");
	
	if(trim(txtOldPass.value) == "")
	{
	    txtOldPass.style.backgroundColor="#D4D0C8";
        lbOldPass.style.display="";
        return false;
    }
    else
    {
        lbOldPass.style.display="none";
        txtOldPass.style.backgroundColor="";
    }
    
    if (trim(txtpassword.value) == "")
    {
        txtpassword.style.backgroundColor="#D4D0C8";
        lbpass.style.display="";
		return false;
    }
    else
    {
        lbpass.style.display="none";
        txtpassword.style.backgroundColor="";
    }
    
	if (trim(txtMpassword.value) == "")
    {
        txtMpassword.style.backgroundColor="#D4D0C8";
        lbMpass.style.display="";
		lbMpass2.style.display="none";
		return false;
    }
    else
    {
        lbMpass.style.display="none";
		lbMpass2.style.display="none";
        txtMpassword.style.backgroundColor="";
    }
	 
	if(trim(txtpassword.value) != trim(txtMpassword.value) )
	{
		txtMpassword.style.backgroundColor="#D4D0C8";
        lbMpass.style.display="none";
		lbMpass2.style.display="";
		return false;
	}
	else
	{
		lbMpass.style.display="none";
		lbMpass2.style.display="none";
		txtMpassword.style.backgroundColor="";
	}
	
}

function ProductInfoSave()
{

	var txtQQnick=document.getElementById("ctl00$MastRight$txtQQnick");
    var lbQQnick=document.getElementById("ctl00_MastRight_lbQQnick");
	
	var txtQQ=document.getElementById("ctl00$MastRight$txtQQ");
	var lbQQ=document.getElementById("ctl00_MastRight_lbQQ");
	
	var txtTel=document.getElementById("ctl00$MastRight$txtTel");
	var lbTel=document.getElementById("ctl00_MastRight_lbTel");
	var lbTelTrue=document.getElementById("ctl00_MastRight_lbTelTrue");
	
	var txtMove=document.getElementById("ctl00$MastRight$txtMove");
	var lbMove=document.getElementById("ctl00_MastRight_lbMove");
	
	var txtMsn=document.getElementById("ctl00$MastRight$txtMsn");
	var lbMsn=document.getElementById("ctl00_MastRight_lbMSN");
	
	var txtName=document.getElementById("ctl00$MastRight$txtName");
	var lbName=document.getElementById("ctl00_MastRight_lbname");
	
	var txtCard=document.getElementById("ctl00$MastRight$txtcard");
	var lbcard=document.getElementById("ctl00_MastRight_lbcard");
	
	var txtAddress=document.getElementById("ctl00$MastRight$txtAddress");
	var lbaddress=document.getElementById("ctl00_MastRight_lbaddress");
	
	
    var txtOldPass=document.getElementById("ctl00$MastRight$txtOldPass");
	var lbOldPass=document.getElementById("ctl00_MastRight_lbOldPass");
	
	var txtqu =document.getElementById("ctl00$MastRight$txtqu");
	
	var txtEmail =document.getElementById("ctl00$MastRight$txtEmail");
	var lbEmail=document.getElementById("ctl00_MastRight_lbEmail");
	
	
	
    
	if (trim(txtQQnick.value) == "")
    {
        txtQQnick.style.backgroundColor="#D4D0C8";
        lbQQnick.style.display="";
		return false;
    }
    else
    {
        lbQQnick.style.display="none";
        txtQQnick.style.backgroundColor="";
    }
     
	 if (trim(txtQQ.value) == "")
    {
        txtQQ.style.backgroundColor="#D4D0C8";
        lbQQ.style.display="";
		return false;
    }
    else
    {
        lbQQ.style.display="none";
        txtQQ.style.backgroundColor="";
    }
    //alert(!limitNum(txtQQ.value));
    if (!limitNum(trim(txtQQ.value)))
    {
        txtQQ.style.backgroundColor="#D4D0C8";
        lbQQ.style.display="";
		return false;
    }
    else
    {
        lbQQ.style.display="none";
        txtQQ.style.backgroundColor="";
    }
    
    if (trim(txtTel.value) == "" && trim(txtMove.value) == "")
    {
        txtqu.style.backgroundColor="#D4D0C8";
        txtTel.style.backgroundColor="#D4D0C8";
		txtMove.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        lbTelTrue.style.display="none";
        lbMove.style.display="none";
        return false;
    }
    else
    {
        lbTel.style.display="none";
        txtTel.style.backgroundColor="";
		txtMove.style.backgroundColor="";
    }
    
    if(trim(txtqu.value) == "" && trim(txtTel.value) == "" && trim(txtMove.value) == "") 
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        return false;
    }
    else
    {
        lbTel.style.display="none";
        txtqu.style.backgroundColor="";
    }
    if(trim(txtqu.value) != "" && trim(txtTel.value) == "") 
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        return false;
    }
    else
    {
        lbTel.style.display="none";
        txtqu.style.backgroundColor="";
    }
    
    if(trim(txtqu.value) == "" && trim(txtTel.value) != "") 
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        return false;
    }
    else
    {
        lbTel.style.display="none";
        txtqu.style.backgroundColor="";
    }
    
    if(trim(txtqu.value) !="" && !limitNum(trim(txtqu.value)))
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTelTrue.style.display="";
        return false;
    }
    else
    {
        txtqu.style.backgroundColor="";
        lbTelTrue.style.display="none";
    }
    if(trim(txtTel.value) !="" && !limitNum(trim(txtTel.value)))
    {
        txtTel.style.backgroundColor="#D4D0C8";
        lbTelTrue.style.display="";
        return false;
    }
    else
    {
        txtTel.style.backgroundColor="";
        lbTelTrue.style.display="none";
    }
      
      
    
    if (!limitNum(trim(txtTel.value)))
    {
        txtTel.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
		return false;
    }
    else
    {
        lbTel.style.display="none";
        txtTel.style.backgroundColor="";
    }
    
    
    if (trim(txtMove.value) != "" && !limitNum(trim(txtMove.value)))
    {
        txtMove.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
		return false;
    }
    else
    {
        lbTel.style.display="none";
        txtMove.style.backgroundColor="";
    }
    
    if(trim(txtEmail.value) == "")
	{
	    lbEmail.style.display="";
        txtEmail.style.backgroundColor="#D4D0C8";
	    return false;
	}
	else
	{
	    lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
	}
	if (!isMail(trim(txtEmail.value)))
    {
        txtEmail.style.backgroundColor="#D4D0C8";
        lbEmail.style.display="";
		return false;
    }
    else
    {
        lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
    }
    
	if(trim(txtMsn.value) != "" && !isMail(trim(txtMsn.value)))
	{
        txtMsn.style.backgroundColor="#D4D0C8";
        lbMsn.style.display="";
		return false;
    }
    else
    {
        lbMsn.style.display="none";
        txtMsn.style.backgroundColor="";
    }
    
	 if (trim(txtName.value) == "")
    {
        txtName.style.backgroundColor="#D4D0C8";
        lbName.style.display="";
		return false;
    }
    else
    {
        lbName.style.display="none";
        txtName.style.backgroundColor="";
    }
    
	 if (trim(txtCard.value) == "")
    {
        txtCard.style.backgroundColor="#D4D0C8";
        lbcard.style.display="";
		return false;
    }
    else
    {
        lbcard.style.display="none";
        txtCard.style.backgroundColor="";
    }
	 
	 if (trim(txtAddress.value) == "")
    {
        txtAddress.style.backgroundColor="#D4D0C8";
        lbaddress.style.display="";
		return false;
    }
    else
    {
        lbaddress.style.display="none";
        txtAddress.style.backgroundColor="";
    }
}
function ProductInfoSaveAdd()
{

	var txtusername=document.getElementById("txtusername");
    var lbusername=document.getElementById("lblusername");
	
	var txtpassword=document.getElementById("txtpassword");
	var lbpass=document.getElementById("lbpass");
	
    var txtMpassword=document.getElementById("txtMpassword");
	var lbMpass=document.getElementById("lbMpass");
	var lbMpass2=document.getElementById("lbMpass2");
	
	var txtQQnick=document.getElementById("txtQQnick");
    var lbQQnick=document.getElementById("lbQQnick");
	
	var txtQQ=document.getElementById("txtQQ");
	var lbQQ=document.getElementById("lbQQ");
	
	var txtqu=document.getElementById("txtqu");
	
	var txtTel=document.getElementById("txtTel");
	var lbTel=document.getElementById("lbTel");
	var lbTelTrue=document.getElementById("lbTelTrue");
	
	var txtMove=document.getElementById("txtMove");
	var lbMove=document.getElementById("lbMove");
	
	var txtMsn=document.getElementById("txtMsn");
	var lbMsn=document.getElementById("lbMSN");
	
	var txtName=document.getElementById("txtName");
	var lbName=document.getElementById("lbname");
	
	var txtCard=document.getElementById("txtcard");
	var lbcard=document.getElementById("lbcard");
	
	var txtAddress=document.getElementById("txtAddress");
	var lbaddress=document.getElementById("lbaddress");
	
	var txtEmail=document.getElementById("txtEmail");
	var lbEmail=document.getElementById("lbEmail");
	
	var cboxSel=document.getElementById("cboxSel");
	
	if (trim(txtusername.value) == "")
    {
        txtusername.style.backgroundColor="#D4D0C8";
		return false;
    }
    else {
        if (escape(txtusername.value).indexOf("%u") != -1) {
            txtusername.style.backgroundColor = "#D4D0C8";
            return false;
        }
        else {
            txtusername.style.backgroundColor = "";
        }
    }
    
	if (trim(txtpassword.value) == "")
    {
        txtpassword.style.backgroundColor="#D4D0C8";
        lbpass.style.display="";
		return false;
    }
    else
    {
        lbpass.style.display="none";
        txtpassword.style.backgroundColor="";
    }
    
	if (trim(txtMpassword.value) == "")
    {
        txtMpassword.style.backgroundColor="#D4D0C8";
        lbMpass.style.display="";
		lbMpass2.style.display="none";
		return false;
    }
    else
    {
        lbMpass.style.display="none";
		lbMpass2.style.display="none";
        txtMpassword.style.backgroundColor="";
    }
	 
	if(trim(txtpassword.value) != trim(txtMpassword.value) )
	{
		txtMpassword.style.backgroundColor="#D4D0C8";
        lbMpass.style.display="none";
		lbMpass2.style.display="";
		return false;
	}
	else
	{
		lbMpass.style.display="none";
		lbMpass2.style.display="none";
		txtMpassword.style.backgroundColor="";
	}
    
	if (trim(txtQQnick.value) == "")
    {
        txtQQnick.style.backgroundColor="#D4D0C8";
        lbQQnick.style.display="";
		return false;
    }
    else
    {
        lbQQnick.style.display="none";
        txtQQnick.style.backgroundColor="";
    }
     
	 if (trim(txtQQ.value) == "")
    {
        txtQQ.style.backgroundColor="#D4D0C8";
        lbQQ.style.display="";
		return false;
    }
    else
    {
        lbQQ.style.display="none";
        txtQQ.style.backgroundColor="";
    }
	
	if (!limitNum(trim(txtQQ.value)))
    {
        txtQQ.style.backgroundColor="#D4D0C8";
        lbQQ.style.display="";
		return false;
    }
    else
    {
        lbQQ.style.display="none";
        txtQQ.style.backgroundColor="";
    }
	
	 
    if (trim(txtTel.value) == "" && trim(txtMove.value) == "")
    {
        txtTel.style.backgroundColor="#D4D0C8";
        txtMove.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
		return false;
    }
    else
    {
        lbTel.style.display="none";
        txtTel.style.backgroundColor="";
        txtMove.style.backgroundColor="";
    }
    
    if(trim(txtTel.value) == "" && trim(txtqu.value) != "")
    {
        txtTel.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        return false;
    }
    else
    {
        txtTel.style.backgroundColor="";
        lbTel.style.display="none";
    }
    if(trim(txtTel.value) != "" && trim(txtqu.value) == "")
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        return false;
    }
    else
    {
        txtqu.style.backgroundColor="";
        lbTel.style.display="none";
    }
    if(trim(txtqu.value) != "" && !limitNum(trim(txtqu.value)))
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        return false;
    }
    else
    {
        txtqu.style.backgroundColor="";
        lbTel.style.display="none";
    }
    if (!limitNum(trim(txtTel.value)))
    {
        lbTelTrue.style.display="";
        txtTel.style.backgroundColor="#D4D0C8";
		return false;
    }
    
    else
    {
        lbTelTrue.style.display="none";
        txtTel.style.backgroundColor="";
    }
    if(!isMail(trim(txtEmail.value)))
	{
        txtEmail.style.backgroundColor="#D4D0C8";
        lbEmail.style.display="";
		return false;
    }
    else
    {
        lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
    }
	if(trim(txtMsn.value) != "" && !isMail(trim(txtMsn.value)))
	{
        txtMsn.style.backgroundColor="#D4D0C8";
        lbMsn.style.display="";
		return false;
    }
    else
    {
        lbMsn.style.display="none";
        txtMsn.style.backgroundColor="";
    }
    
	 if (trim(txtName.value) == "")
    {
        txtName.style.backgroundColor="#D4D0C8";
        lbName.style.display="";
		return false;
    }
    else
    {
        lbName.style.display="none";
        txtName.style.backgroundColor="";
    }
	 if (trim(txtCard.value) == "")
    {
        txtCard.style.backgroundColor="#D4D0C8";
        lbcard.style.display="";
		return false;
    }
    else
    {
        lbcard.style.display="none";
        txtCard.style.backgroundColor="";
    }
	 
	 if (trim(txtAddress.value) == "")
    {
        txtAddress.style.backgroundColor="#D4D0C8";
        lbaddress.style.display="";
		return false;
    }
    else
    {
        lbaddress.style.display="none";
        txtAddress.style.backgroundColor="";
    }
    if(!cboxSel.checked)
    {
        alert("请阅读注册条例！");
        return false;
    }
}

function ProductInfoEdit()
{
	var txtusername=document.getElementById("ctl00$MastRight$txtusername");
    var lbusername=document.getElementById("ctl00_MastRight_lblusername");
	
	var txtQQnick=document.getElementById("ctl00$MastRight$txtQQnick");
    var lbQQnick=document.getElementById("ctl00_MastRight_lbQQnick");
	
	var txtQQ=document.getElementById("ctl00$MastRight$txtQQ");
	var lbQQ=document.getElementById("ctl00_MastRight_lbQQ");
	
	var txtTel=document.getElementById("ctl00$MastRight$txtTel");
	var lbTel=document.getElementById("ctl00_MastRight_lbTel");
	var lbTelTrue=document.getElementById("ctl00_MastRight_lbTelTrue");
	
	var txtMove=document.getElementById("ctl00$MastRight$txtMove");
	var lbMove=document.getElementById("ctl00_MastRight_lbMove");
	
	var txtMsn=document.getElementById("ctl00$MastRight$txtMsn");
	var lbMsn=document.getElementById("ctl00_MastRight_lbMSN");
	
	var txtName=document.getElementById("ctl00$MastRight$txtName");
	var lbName=document.getElementById("ctl00_MastRight_lbname");
	
	var txtCard=document.getElementById("ctl00$MastRight$txtcard");
	var lbcard=document.getElementById("ctl00_MastRight_lbcard");
	
	var txtAddress=document.getElementById("ctl00$MastRight$txtAddress");
	var lbaddress=document.getElementById("ctl00_MastRight_lbaddress");
	
	
	if (trim(txtusername.value) == "")
    {
        txtusername.style.backgroundColor="#D4D0C8";
        lbusername.style.display="";
		return false;
    }
    else
    {
        lbusername.style.display="none";
        txtusername.style.backgroundColor="";
    }
	
    
	if (trim(txtQQnick.value) == "")
    {
        txtQQnick.style.backgroundColor="#D4D0C8";
        lbQQnick.style.display="";
		return false;
    }
    else
    {
        lbQQnick.style.display="none";
        txtQQnick.style.backgroundColor="";
    }
     
	 if (trim(txtQQ.value) == "")
    {
        txtQQ.style.backgroundColor="#D4D0C8";
        lbQQ.style.display="";
		return false;
    }
    else
    {
        lbQQ.style.display="none";
        txtQQ.style.backgroundColor="";
    }
	
	 
      if (trim(txtTel.value) == "")
    {
        txtTel.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
		return false;
    }
    else
    {
        lbTel.style.display="none";
        txtTel.style.backgroundColor="";
    }
    
	if (trim(txtMove.value) == "")
    {
        txtMove.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
		return false;
    }
    else
    {
        lbTel.style.display="none";
        txtMove.style.backgroundColor="";
    }
	
	 if (trim(txtName.value) == "")
    {
        txtName.style.backgroundColor="#D4D0C8";
        lbName.style.display="";
		return false;
    }
    else
    {
        lbName.style.display="none";
        txtName.style.backgroundColor="";
    }
	 if (trim(txtCard.value) == "")
    {
        txtCard.style.backgroundColor="#D4D0C8";
        lbcard.style.display="";
		return false;
    }
    else
    {
        lbcard.style.display="none";
        txtCard.style.backgroundColor="";
    }
	 
	 if (trim(txtAddress.value) == "")
    {
        txtAddress.style.backgroundColor="#D4D0C8";
        lbaddress.style.display="";
		return false;
    }
    else
    {
        lbaddress.style.display="none";
        txtAddress.style.backgroundColor="";
    }
}

function UserNameNullFind()
{
	var txtusername=document.getElementById("txtusername");
    var lbusername=document.getElementById("lbusername");
    var lbtishi=document.getElementById("lbtishi");
	if (trim(txtusername.value) == "")
    {
        txtusername.style.backgroundColor="#D4D0C8";
        lbusername.style.display="";
        lbtishi.style.display="none";
		return false;
    }
    else
    {
        lbtishi.style.display="";
        lbusername.style.display="none";
        txtusername.style.backgroundColor="";
    }
}

function UserNameNullAdd() {

    var txtusername = document.getElementById("txtusername");
    if (trim(txtusername.value) == "") {
        txtusername.style.backgroundColor = "#D4D0C8";
        return false;
    }
    else {
        if (escape(txtusername.value).indexOf("%u") != -1) {
            txtusername.style.backgroundColor = "#D4D0C8";
            return false;
        }
        else {
            txtusername.style.backgroundColor = "";
        }
    }
}

function PassWordNull()
{
	var txtpassword=document.getElementById("ctl00$MastRight$txtpassword");
	var lbpass=document.getElementById("ctl00_MastRight_lbpass");
	var txtMpassword=document.getElementById("ctl00$MastRight$txtMpassword");
	var lbMpass=document.getElementById("ctl00_MastRight_lbMpass");
	var lbMpass2=document.getElementById("ctl00_MastRight_lbMpass2")
	
	
	if (trim(txtpassword.value) == "")
    {
        txtpassword.style.backgroundColor="#D4D0C8";
        lbpass.style.display="";
        return;
    }
    else
    {
        lbpass.style.display="none";
        txtpassword.style.backgroundColor="";
    }
    
    if(trim(txtpassword.value) != trim(txtMpassword.value))
    {
        txtMpassword.style.backgroundColor="#D4D0C8";
		lbMpass2.style.display="";
    }
    else
    {
        txtpassword.style.backgroundColor="";
        txtMpassword.style.backgroundColor="";
        lbMpass.style.display="none";
		lbMpass2.style.display="none";
    }
}

function PassWordNullAdd()
{
	var txtpassword=document.getElementById("txtpassword");
	var lbpass=document.getElementById("lbpass");
	var txtMpassword=document.getElementById("txtMpassword");
	var lbMpass=document.getElementById("lbMpass");
	var lbMpass2=document.getElementById("lbMpass2")
	
	
	if (trim(txtpassword.value) == "")
    {
        txtpassword.style.backgroundColor="#D4D0C8";
        lbpass.style.display="";
        return;
    }
    else
    {
        lbpass.style.display="none";
        txtpassword.style.backgroundColor="";
    }
    
    if(trim(txtpassword.value) != trim(txtMpassword.value))
    {
        txtMpassword.style.backgroundColor="#D4D0C8";
		lbMpass2.style.display="";
    }
    else
    {
        txtpassword.style.backgroundColor="";
        txtMpassword.style.backgroundColor="";
        lbMpass.style.display="none";
		lbMpass2.style.display="none";
    }
}

function MPassWord()
{
	var txtpassword=document.getElementById("ctl00$MastRight$txtpassword");
	var lbpass=document.getElementById("ctl00_MastRight_lbpass");
    var txtMpassword=document.getElementById("ctl00$MastRight$txtMpassword");
	var lbMpass=document.getElementById("ctl00_MastRight_lbMpass");
	var lbMpass2=document.getElementById("ctl00_MastRight_lbMpass2");
	
	if (trim(txtpassword.value) == "")
    {
        txtpassword.style.backgroundColor="#D4D0C8";
        lbpass.style.display="";
        return;
    }
    else
    {
        lbpass.style.display="none";
        txtpassword.style.backgroundColor="";
    }
	if (trim(txtMpassword.value) == "")
    {
        txtMpassword.style.backgroundColor="#D4D0C8";
        lbMpass.style.display="";
		lbMpass2.style.display="none";
		return ;
    }
    else
    {
        lbMpass.style.display="none";
		lbMpass2.style.display="none";
        txtMpassword.style.backgroundColor="";
    }

	if(trim(txtpassword.value) != trim(txtMpassword.value) )
	{
		txtMpassword.style.backgroundColor="#D4D0C8";
        lbMpass.style.display="none";
		lbMpass2.style.display="";
	}
	else
	{
		lbMpass.style.display="none";
		lbMpass2.style.display="none";
		txtMpassword.style.backgroundColor="";
	}
}

function MPassWordAdd()
{
	var txtpassword=document.getElementById("txtpassword");
	var lbpass=document.getElementById("lbpass");
    var txtMpassword=document.getElementById("txtMpassword");
	var lbMpass=document.getElementById("lbMpass");
	var lbMpass2=document.getElementById("lbMpass2");
	
	if (trim(txtpassword.value) == "")
    {
        txtpassword.style.backgroundColor="#D4D0C8";
        lbpass.style.display="";
        return;
    }
    else
    {
        lbpass.style.display="none";
        txtpassword.style.backgroundColor="";
    }
	if (trim(txtMpassword.value) == "")
    {
        txtMpassword.style.backgroundColor="#D4D0C8";
        lbMpass.style.display="";
		lbMpass2.style.display="none";
		return ;
    }
    else
    {
        lbMpass.style.display="none";
		lbMpass2.style.display="none";
        txtMpassword.style.backgroundColor="";
    }

	if(trim(txtpassword.value) != trim(txtMpassword.value) )
	{
		txtMpassword.style.backgroundColor="#D4D0C8";
        lbMpass.style.display="none";
		lbMpass2.style.display="";
	}
	else
	{
		lbMpass.style.display="none";
		lbMpass2.style.display="none";
		txtMpassword.style.backgroundColor="";
	}
}

function QQNickNull()
{
	var txtQQnick=document.getElementById("ctl00$MastRight$txtQQnick");
    var lbQQnick=document.getElementById("ctl00_MastRight_lbQQnick");
	
	if (trim(txtQQnick.value) == "")
    {
        txtQQnick.style.backgroundColor="#D4D0C8";
        lbQQnick.style.display="";
    }
    else
    {
        lbQQnick.style.display="none";
        txtQQnick.style.backgroundColor="";
    }
}

function QQNickNullAdd()
{
	var txtQQnick=document.getElementById("txtQQnick");
    var lbQQnick=document.getElementById("lbQQnick");
	
	if (trim(txtQQnick.value) == "")
    {
        txtQQnick.style.backgroundColor="#D4D0C8";
        lbQQnick.style.display="";
    }
    else
    {
        lbQQnick.style.display="none";
        txtQQnick.style.backgroundColor="";
    }
}

function QQNumNull()
{
	var txtQQ=document.getElementById("ctl00$MastRight$txtQQ");
	var lbQQ=document.getElementById("ctl00_MastRight_lbQQ");
	
	 if (trim(txtQQ.value) == "")
    {
        txtQQ.style.backgroundColor="#D4D0C8";
        lbQQ.style.display="";
        return;
    }
    else
    {
        lbQQ.style.display="none";
        txtQQ.style.backgroundColor="";
    }
    if(!limitNum(trim(txtQQ.value)))
    {
        txtQQ.style.backgroundColor="#D4D0C8";
        lbQQ.style.display="";
        return;
    }
    else
    {
        lbQQ.style.display="none";
        txtQQ.style.backgroundColor="";
    }
}

function QQNumNullAdd()
{
	var txtQQ=document.getElementById("txtQQ");
	var lbQQ=document.getElementById("lbQQ");
	
	 if (trim(txtQQ.value) == "")
    {
        txtQQ.style.backgroundColor="#D4D0C8";
        lbQQ.style.display="";
        return;
    }
    else
    {
        lbQQ.style.display="none";
        txtQQ.style.backgroundColor="";
    }
    if(!limitNum(trim(txtQQ.value)))
    {
        txtQQ.style.backgroundColor="#D4D0C8";
        lbQQ.style.display="";
        return;
    }
    else
    {
        lbQQ.style.display="none";
        txtQQ.style.backgroundColor="";
    }
}

function TelNull()
{
	var txtMove=document.getElementById("ctl00$MastRight$txtMove");
	var txtTel=document.getElementById("ctl00$MastRight$txtTel");
	var lbTel=document.getElementById("ctl00_MastRight_lbTel");
	var lbTelTrue=document.getElementById("ctl00_MastRight_lbTelTrue");
	var lbMove=document.getElementById("ctl00_MastRight_lbMove");
	var txtqu =document.getElementById("ctl00$MastRight$txtqu");

	
    if (trim(txtTel.value) == "" && trim(txtMove.value) == "")
    {
        txtqu.style.backgroundColor="#D4D0C8";
        txtTel.style.backgroundColor="#D4D0C8";
		txtMove.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        lbTelTrue.style.display="none";
        lbMove.style.display="none";
        return;
    }
    else
    {
        lbTel.style.display="none";
        txtTel.style.backgroundColor="";
		txtMove.style.backgroundColor="";
    }
    if(trim(txtqu.value) == "" && trim(txtTel.value) == "" && trim(txtMove.value) == "") 
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        return;
    }
    else
    {
        lbTel.style.display="none";
        txtqu.style.backgroundColor="";
    }
    
    if(trim(txtqu.value) == "" && trim(txtTel.value) != "") 
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        return;
    }
    else
    {
        lbTel.style.display="none";
        txtqu.style.backgroundColor="";
    }
    
    if(trim(txtqu.value) !="" && !limitNum(trim(txtqu.value)))
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTelTrue.style.display="";
        return;
    }
    else
    {
        txtqu.style.backgroundColor="";
        lbTelTrue.style.display="none";
    }
    if(trim(txtTel.value) !="" && !limitNum(trim(txtTel.value)))
    {
        txtTel.style.backgroundColor="#D4D0C8";
        lbTelTrue.style.display="";
        return;
    }
    else
    {
        txtTel.style.backgroundColor="";
        lbTelTrue.style.display="none";
    }
    
    if(!limitNum(trim(txtMove.value)))
    {
        txtMove.style.backgroundColor="#D4D0C8";
        lbMove.style.display="";
        return;
    }
    else
    {
        txtMove.style.backgroundColor="";
        lbMove.style.display="none";
    }
    
}
	
function TelNullAdd()
{
	var txtMove=document.getElementById("txtMove");
	var txtTel=document.getElementById("txtTel");
	var lbTel=document.getElementById("lbTel");
	var lbTelTrue=document.getElementById("lbTelTrue");
	var lbMove=document.getElementById("lbMove");
	var txtqu =document.getElementById("txtqu");
	
    if (trim(txtTel.value) == "" && trim(txtMove.value) == "")
    {
        txtqu.style.backgroundColor="#D4D0C8";
        txtTel.style.backgroundColor="#D4D0C8";
		txtMove.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        lbTelTrue.style.display="none";
        lbMove.style.display="none";
        return;
    }
    else
    {
        lbTel.style.display="none";
        txtTel.style.backgroundColor="";
		txtMove.style.backgroundColor="";
    }
    if(trim(txtqu.value) == "" && trim(txtTel.value) == "" && trim(txtMove.value) == "") 
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTel.style.display="";
        return;
    }
    else
    {
        lbTel.style.display="none";
        txtqu.style.backgroundColor="";
    }
    if(trim(txtqu.value) !="" && !limitNum(trim(txtqu.value)))
    {
        txtqu.style.backgroundColor="#D4D0C8";
        lbTelTrue.style.display="";
        return;
    }
    else
    {
        txtqu.style.backgroundColor="";
        lbTelTrue.style.display="none";
    }
    if(trim(txtTel.value) !="" && !limitNum(trim(txtTel.value)))
    {
        txtTel.style.backgroundColor="#D4D0C8";
        lbTelTrue.style.display="";
        return;
    }
    else
    {
        txtTel.style.backgroundColor="";
        lbTelTrue.style.display="none";
    }
    
    if(!limitNum(trim(txtMove.value)))
    {
        txtMove.style.backgroundColor="#D4D0C8";
        lbMove.style.display="";
        return;
    }
    else
    {
        txtMove.style.backgroundColor="";
        lbMove.style.display="none";
    }
}	

function MsnTrue()
{
	var txtMsn=document.getElementById("ctl00$MastRight$txtMsn");
	var lbMsn=document.getElementById("ctl00_MastRight_lbMSN");
	
	if(trim(txtMsn.value) == "")
	{
	    lbMsn.style.display="none";
        txtMsn.style.backgroundColor="";
	    return ;
	}
	if (!isMail(trim(txtMsn.value)))
    {
        txtMsn.style.backgroundColor="#D4D0C8";
        lbMsn.style.display="";
		return ;
    }
    else
    {
        lbMsn.style.display="none";
        txtMsn.style.backgroundColor="";
    }
}

function EmailTrue()
{
	var txtEmail=document.getElementById("txtEmail");
	var lbEmail=document.getElementById("lbEmail");
	if(trim(txtEmail.value) == "")
	{
	    lbEmail.style.display="";
        txtEmail.style.backgroundColor="#D4D0C8";
	    return ;
	}
	else
	{
	    lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
	}
	if (!isMail(trim(txtEmail.value)))
    {
        txtEmail.style.backgroundColor="#D4D0C8";
        lbEmail.style.display="";
		return ;
    }
    else
    {
        lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
    }
}
function EmailTrueAdd()
{
	var txtEmail=document.getElementById("ctl00$MastRight$txtEmail");
	var lbEmail=document.getElementById("ctl00_MastRight_lbEmail");
	if(trim(txtEmail.value) == "")
	{
	    lbEmail.style.display="";
        txtEmail.style.backgroundColor="#D4D0C8";
	    return ;
	}
	else
	{
	    lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
	}
	if (!isMail(trim(txtEmail.value)))
    {
        txtEmail.style.backgroundColor="#D4D0C8";
        lbEmail.style.display="";
		return ;
    }
    else
    {
        lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
    }
}
function NewAdd()
{
    var txtEmail=document.getElementById("ctl00$MastRight$txtEmailadd");
	var lbEmail=document.getElementById("ctl00_MastRight_lbEmailadd");
	if(trim(txtEmail.value) == "")
	{
	    lbEmail.style.display="";
        txtEmail.style.backgroundColor="#D4D0C8";
	    return false;
	}
	else
	{
	    lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
	}
	if (!isMail(trim(txtEmail.value)))
    {
        txtEmail.style.backgroundColor="#D4D0C8";
        lbEmail.style.display="";
		return false;
    }
    else
    {
        lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
    }
}

function EmailTrueAddNew()
{
	var txtEmail=document.getElementById("ctl00$MastRight$txtEmailadd");
	var lbEmail=document.getElementById("ctl00_MastRight_lbEmailadd");
	if(trim(txtEmail.value) == "")
	{
	    lbEmail.style.display="";
        txtEmail.style.backgroundColor="#D4D0C8";
	    return ;
	}
	else
	{
	    lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
	}
	if (!isMail(trim(txtEmail.value)))
    {
        txtEmail.style.backgroundColor="#D4D0C8";
        lbEmail.style.display="";
		return ;
    }
    else
    {
        lbEmail.style.display="none";
        txtEmail.style.backgroundColor="";
    }
}

function MsnTrueAdd()
{
	var txtMsn=document.getElementById("txtMsn");
	var lbMsn=document.getElementById("lbMSN");
	
	if(trim(txtMsn.value) == "")
	{
	    lbMsn.style.display="none";
        txtMsn.style.backgroundColor="";
	    return ;
	}
	if (!isMail(trim(txtMsn.value)))
    {
        txtMsn.style.backgroundColor="#D4D0C8";
        lbMsn.style.display="";
		return ;
    }
    else
    {
        lbMsn.style.display="none";
        txtMsn.style.backgroundColor="";
    }
}

function NameNull()
{
	var txtName=document.getElementById("ctl00$MastRight$txtName");
	var lbName=document.getElementById("ctl00_MastRight_lbname");
	
	 if (trim(txtName.value) == "")
    {
        txtName.style.backgroundColor="#D4D0C8";
        lbName.style.display="";
		return ;
    }
    else
    {
        lbName.style.display="none";
        txtName.style.backgroundColor="";
    }
}

function NameNullAdd()
{
	var txtName=document.getElementById("txtName");
	var lbName=document.getElementById("lbname");
	
	 if (trim(txtName.value) == "")
    {
        txtName.style.backgroundColor="#D4D0C8";
        lbName.style.display="";
		return ;
    }
    else
    {
        lbName.style.display="none";
        txtName.style.backgroundColor="";
    }
}

function CardNull()
{
	var txtCard=document.getElementById("ctl00$MastRight$txtcard");
	var lbcard=document.getElementById("ctl00_MastRight_lbcard");
	
	 if (trim(txtCard.value) == "")
    {
        txtCard.style.backgroundColor="#D4D0C8";
        lbcard.style.display="";
		return ;
    }
    else
    {
        lbcard.style.display="none";
        txtCard.style.backgroundColor="";
    }
}

function CardNullAdd()
{
	var txtCard=document.getElementById("txtcard");
	var lbcard=document.getElementById("lbcard");
	
	 if (trim(txtCard.value) == "")
    {
        txtCard.style.backgroundColor="#D4D0C8";
        lbcard.style.display="";
		return ;
    }
    else
    {
        lbcard.style.display="none";
        txtCard.style.backgroundColor="";
    }
}

function AddressNull()
{
	var txtAddress=document.getElementById("ctl00$MastRight$txtAddress");
	var lbaddress=document.getElementById("ctl00_MastRight_lbaddress");
	 if (trim(txtAddress.value) == "")
    {
        txtAddress.style.backgroundColor="#D4D0C8";
        lbaddress.style.display="";
		return ;
    }
    else
    {
        lbaddress.style.display="none";
        txtAddress.style.backgroundColor="";
    }
}

function AddressNullAdd()
{
	var txtAddress=document.getElementById("txtAddress");
	var lbaddress=document.getElementById("lbaddress");
	 if (trim(txtAddress.value) == "")
    {
        txtAddress.style.backgroundColor="#D4D0C8";
        lbaddress.style.display="";
		return ;
    }
    else
    {
        lbaddress.style.display="none";
        txtAddress.style.backgroundColor="";
    }
}


//验证正整数
function limitNum(obj) {

    if(obj.replace(/[\d+]/ig,"").length>0)
     {
        return false;
     }
     else 
     {
        return true;
     }

}

//验证Email
function isMail(mail)
{
	return(new RegExp(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(mail));
}

//去空格
function trim(s){
return s.replace(/^\s+|\s+$/g,'');
}