function HishopGetMoreUserInfo(_control, _nameControlId, _emailControlId, _addressControlId, _addressPlaceControlId, _postcodeControlId, _phoneControlId,_saveConsigneeId){
    this.Back = function(_backText) {

        //_nameControlId, _emailControlId,_addressControlId,_addressPlaceControlId,_postcodeControlId,_phoneControlId
        var _nameControl = document.getElementById(_nameControlId);
        if (_nameControl) {
            _nameControl.value = "";

            if (moreUserId == "0")
                _nameControl.disabled = true;
            else
                _nameControl.disabled = false;
        }

        var _emailControl = document.getElementById(_emailControlId);
        if (_emailControl) {
            _emailControl.value = "";
            if (moreUserId == "0")
                _emailControl.disabled = true;
            else
                _emailControl.disabled = false;
        }

        var _addressControl = document.getElementById(_addressControlId);
        if (_addressControl) {
            _addressControl.value = "";
            if (moreUserId == "0")
                _addressControl.disabled = true;
            else
                _addressControl.disabled = false;
        }

        var _addressPlaceCountryId = _addressPlaceControlId + "_ctl00_Country";
        var _addressPlaceProvinceId = _addressPlaceControlId + "_ctl00_Province";
        var _addressPlaceRegionId = _addressPlaceControlId + "_ctl00_Region";
        var _addressPlacePlaceAreaId = _addressPlaceControlId + "_ctl00_PlaceArea";

        var _addressPlaceCountry = document.getElementById(_addressPlaceCountryId);
        if (_addressPlaceCountry) {
            if (moreUserId == "0")
                _addressPlaceCountry.disabled = true;
            else
                _addressPlaceCountry.disabled = false;
        }

        var _addressPlaceProvince = document.getElementById(_addressPlaceProvinceId);
        if (_addressPlaceProvince) {
            if (moreUserId == "0")
                _addressPlaceProvince.disabled = true;
            else
                _addressPlaceProvince.disabled = false;
        }

        var _addressPlaceRegion = document.getElementById(_addressPlaceRegionId);
        if (_addressPlaceRegion) {
            if (moreUserId == "0")
                _addressPlaceRegion.disabled = true;
            else
                _addressPlaceRegion.disabled = false;
        }

        var _addressPlacePlaceArea = document.getElementById(_addressPlacePlaceAreaId);
        if (_addressPlacePlaceArea) {
            if (moreUserId == "0")
                _addressPlacePlaceArea.disabled = true;
            else
                _addressPlacePlaceArea.disabled = false;
        }

        var _postcodeControl = document.getElementById(_postcodeControlId);
        if (_postcodeControl) {
            _postcodeControl.value = "";
            if (moreUserId == "0")
                _postcodeControl.disabled = true;
            else
                _postcodeControl.disabled = false;
        }

        var _phoneControl = document.getElementById(_phoneControlId);
        if (_phoneControl) {
            _phoneControl.value = "";
            if (moreUserId == "0")
                _phoneControl.disabled = true;
            else
                _phoneControl.disabled = false;
        }
        //这个对收货人电话的校验是给boee作的，不过这个还是比较有用的
        //这里暂时用的直接的编码 ConsigneePhone_vjs_1
        var _phoneValidator = VerifyGetbyMessageControlId("ConsigneePhone_vjs_1");
        var _phoneValidatorMessageControl = document.getElementById("ConsigneePhone_vjs_1");

        if (moreUserId == "0") {
            if (_phoneValidator) {
                _phoneValidator.IsValid = false;
                _phoneValidator._base.AllowNull = "True";
            }
            if (_phoneValidatorMessageControl)
                _phoneValidatorMessageControl.style.display = "none";
        }
        else {
            if (_phoneValidator) {
                _phoneValidator.IsValid = false;
                _phoneValidator._base.AllowNull = "False";
            }
            if (_phoneValidatorMessageControl)
                _phoneValidatorMessageControl.style.display = "inline";
        }

        var _addressValidator = VerifyGetbyMessageControlId("ConsigneeAddress_vjs_1");
        var _addressValidatorMessageControl = document.getElementById("ConsigneeAddress_vjs_1");

        if (moreUserId == "0") {
            if (_addressValidator) {
                _addressValidator.IsValid = false;
                _addressValidator._base.AllowNull = "True";
            }
            if (_addressValidatorMessageControl)
                _addressValidatorMessageControl.style.display = "none";
        }
        else {
            if (_addressValidator) {
                _addressValidator.IsValid = false;
                _addressValidator._base.AllowNull = "False";
            }
            if (_addressValidatorMessageControl)
                _addressValidatorMessageControl.style.display = "inline";
        }


        var _saveConsigneeControl = document.getElementById(_saveConsigneeId);
        if (_saveConsigneeControl) {
            if (moreUserId == "-1") {
                _saveConsigneeControl.style.display = "";
                _saveConsigneeControl.nextSibling.style.display = "";
            }
            else {
                _saveConsigneeControl.style.display = "none";
                //这是文本
                _saveConsigneeControl.nextSibling.style.display = "none";
            }
        }

        /*
        *  sb.Append(_user.Define.Name);
        sb.Append("|");
        sb.Append(_user.Define.Mail);
        sb.Append("|");
        sb.Append(_user.Define.Tel);
        sb.Append("|");
        sb.Append(_user.Define.YouBian);
        sb.Append("|");
        sb.Append(_user.Define.Guojia);
        sb.Append("|");
        sb.Append(_user.Define.ShengFen);
        sb.Append("|");
        sb.Append(_user.Define.DiQu);
        sb.Append("|");
        sb.Append(_user.Define.TheArea);
        sb.Append("|");
        sb.Append(_user.Define.DiZhi);
        */
        var backTextList = _backText.split('|');
        if (backTextList.length > 0) {
            _defaultHishopPlace = new HishopPlaceDefault();
            for (var i = 0; i < backTextList.length; i++) {

                if (i == 0 && _nameControl)
                    _nameControl.value = backTextList[0];

                else if (i == 1 && _emailControl)
                    _emailControl.value = backTextList[1];

                else if (i == 2 && _phoneControl)
                    _phoneControl.value = backTextList[2];

                else if (i == 3 && _postcodeControl)
                    _postcodeControl.value = backTextList[3];

                else if (i == 4 && _addressPlaceCountry)
                    _defaultHishopPlace.Country = backTextList[4];

                else if (i == 5 && _addressPlaceProvince)
                    _defaultHishopPlace.Province = backTextList[5];

                else if (i == 6 && _addressPlaceRegion)
                    _defaultHishopPlace.Region = backTextList[6];

                else if (i == 7 && _addressPlacePlaceArea)
                    _defaultHishopPlace.Area = backTextList[7];

                else if (i == 8 && _addressControl)
                    _addressControl.value = backTextList[8];

                else if (i == 9 && _saveConsigneeControl) {
                    //第9个表示当前用户是否是匿名用户，如果是的话，则保存到我的收货人列表中默认为未选中且不显示
                    if (backTextList[9] == "True") {
                        _saveConsigneeControl.checked = false;
                        _saveConsigneeControl.style.display = "none";
                        //这是文本
                        _saveConsigneeControl.nextSibling.style.display = "none";
                    }


                }
            }

            //根据默认值重新创建国家等列表
            CountryInit(_addressPlaceCountryId, _addressPlaceProvinceId, _addressPlaceRegionId, _addressPlacePlaceAreaId)
        }
    }
	
	var moreUserId = escape(_control.options[_control.selectedIndex].value);
	var theUrl = HishopAjaxDirUrl + "/HishopUserInfo.aspx?Type=Get&UserId=" + moreUserId;
	GetValue2(theUrl, this.Back);
	
}

function hishopUpUserInfo(_userId,_name,_email,_address,_country,_province,_region,_area,_postcode,_phone,_parentUserId)
{
	this.Back=function(_backText)
	{
		
	}
	
	var theUrl = HishopAjaxDirUrl + "/HishopUserInfo.aspx?Type=Update&UserId=" + _userId
		+"&Name="+escape(_name)+"&Email="+escape(_email)+"&Address="+escape(_address)
		+"&Country="+escape(_country)+"&Province="+escape(_province)+"&Region="+escape(_region)+"&Area="+escape(_area)
		+"&Postcode="+escape(_postcode)+"&Phone="+escape(_phone)+"&ParentUserId="+escape(_parentUserId);
	GetValue2(theUrl,this.Back);
}

function HishopGetCurrentUser(_controlId,_fieldName,_formatString)
{
	this.Back = function(_backText){
		var _control = document.getElementById(_controlId);
		
		if (_control) 
			_control.innerHTML = _backText;
	}

	var theUrl = HishopAjaxDirUrl + "/HishopGetUserInfo.aspx?FieldName="+ _fieldName+"&FormatString=" + _formatString;
	GetValue2(theUrl,this.Back);
}

function HishopRegUserAgreementCheck(_agreementControlId, _regButtonControlId) {
    var _agreementControl = document.getElementById(_agreementControlId);
    var _regButtonControl = document.getElementById(_regButtonControlId);
    if (_agreementControl && _regButtonControl) {
        _regButtonControl.disabled = !_agreementControl.checked;
    }
}

function HishopRegUserQuestionListChange(_listControlId, _otherQuestionControlId) {
    var _listControl = $(_listControlId);
    var _otherQuestionControl = $(_otherQuestionControlId);

    if (_listControl.options[_listControl.selectedIndex].value == "-1")
        _otherQuestionControl.style.display = "";
    else
        _otherQuestionControl.style.display = "none";
        
 }