function update() {
	var basePath = $($("body")[0]).attr("base");
	var O_Submit = $("#O_Submit");
	
	var O_Company = $("#O_Company");
	var O_Name = $("#O_Name");
	var O_Mobile = $("#O_Mobile");
	var O_Phone = $("#O_Phone");
	var O_QQ = $("#O_QQ");
	var O_Email = $("#O_Email");
	var O_Address = $("#O_Address");
	var O_Postcode = $("#O_Postcode");
	
	var v_company = O_Company.val().replace(/ /g, '').replace(/'/g, '');
	var v_name = O_Name.val().replace(/ /g, '').replace(/'/g, '');
	var v_sex = $("[name='O_Sex']:checked").val(); 
	if(v_sex == null) { v_sex = ''; }
	var v_mobile = O_Mobile.val().replace(/ /g, '').replace(/'/g, '');
	var v_phone = O_Phone.val().replace(/ /g, '').replace(/'/g, '');
	var v_qq = O_QQ.val().replace(/ /g, '').replace(/'/g, '');
	var v_email = O_Email.val().replace(/ /g, '').replace(/'/g, '');
	var v_address = O_Address.val().replace(/ /g, '').replace(/'/g, '');
	var v_postcode = O_Postcode.val().replace(/ /g, '').replace(/'/g, '');

	if(v_name == "") {
		alert("姓名不能为空！");
		O_Name.val("");
		O_Name.focus();
	} else if(v_mobile == "") {
		alert("手机号码不能为空！");
		O_Mobile.val("");
		O_Mobile.focus();
	} else if(v_mobile != "" && !/^(13|15|18)\d{9}$/.test(v_mobile)) {
		alert("请输入正确的手机号码！");
		O_Mobile.focus();
	} else if(v_phone != "" && !/(^[0-9]{3,4}\-[0-9]{7,8}$)|(^[0-9]{7,8}$)|(^(13|15|18)\d{9}$)/.test(v_phone)) {
		alert("联系电话有误！");
		O_Phone.focus();
	} else if(v_qq != "" && !/\d{5,}$/.test(v_qq)) {
		alert("联系QQ有误！");
		O_QQ.focus();
	} else if(v_email != "" && !/.+@.+\.[a-zA-Z]{2,4}$/.test(v_email)) {
		alert("Email有误！");
		O_Email.focus();
	} else if(v_postcode != "" && !/\d{6,}$/.test(v_postcode)) {
		alert("邮编有误！");
		O_Postcode.focus();
	} else {
		O_Submit.attr("disabled", true);
		$.post(basePath + "?m=member.updateHandle", { company:v_company, name:v_name, sex:v_sex, mobile:v_mobile, phone:v_phone, qq:v_qq, email:v_email, address:v_address, postcode:v_postcode }, function(data) {//alert(data);
			alert(data[1]);
			if(data[0] == "success") {
				window.location.reload();
			} else {
				if(data[2] == "name is null") {
					O_Name.focus();
				} else if(data[2] == "mobile is null") {
					O_Mobile.focus();
				}
			}
			O_Submit.attr("disabled", false);
		}, "json");
	}
}