
function actButton(btId){
	if($(btId).className=='button_1')$(btId).className='button_on1';
	else $(btId).className='button_1';
}

function sendRegard(uid){
	createXHR();
	var url = "ajaxUser.php?action=sendRegard&uid="+uid;
	xhr.onreadystatechange =  function(){
		if(xhr.readyState == 4){
			if(xhr.status == 200){
				if(xhr.responseText == 'NO_LOGIN'){
					if(confirm("您还没登录呢，现在要登录吗？"))location.href='login.php';
				}else if(xhr.responseText == 'NOT_INTEGRITY'){
					alert("请先完善您的个人资料");
				}else if(xhr.responseText == 'NO_STARTUP'){
					if(confirm("您还没开通呢，现在要开通吗？"))window.open('/');
				}else if(xhr.responseText == 'NO_BODY'){
					alert("该会员已被禁用，您无法进行此操作！");
				}else if(xhr.responseText == 'REPEAT'){
					alert("请勿重复发送！");
				}else if(xhr.responseText == 'SEND_TO_SELF'){
					alert("对不起，您无法对您自己进行此操作！");
				}else{
					alert("恭喜您，发送成功");
				}
			}
		}
	}
	xhr.open("GET", url, true);
	xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
	xhr.send(null);
}

function sendFlower(uid){
	createXHR();
	var url = "ajaxUser.php?action=sendFlower&uid="+uid;
	xhr.onreadystatechange =  function(){
		if(xhr.readyState == 4){
			if(xhr.status == 200){
				if(xhr.responseText == 'NO_LOGIN'){
					if(confirm("您还没登录呢，现在要登录吗？"))location.href='login.php';
				}else if(xhr.responseText == 'NOT_INTEGRITY'){
					alert("请先完善您的个人资料");
				}else if(xhr.responseText == 'NO_STARTUP'){
					if(confirm("您还没开通呢，现在要开通吗？"))window.open('/');
				}else if(xhr.responseText == 'NO_BODY'){
					alert("该会员已被禁用，您无法进行此操作！");SEND_TO_SELF
				}else if(xhr.responseText == 'REPEAT'){
					alert("请勿重复发送！");
				}else if(xhr.responseText == 'SEND_TO_SELF'){
					alert("对不起，您无法对您自己进行此操作！");
				}else{
					alert("恭喜您，发送成功");
				}
			}
		}
	}
	xhr.open("GET", url, true);
	xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
	xhr.send(null);
}

function addCourt(uid){
	createXHR();
	var url = "ajaxUser.php?action=court&uid="+uid;
	xhr.onreadystatechange =  function(){
		if(xhr.readyState == 4){
			if(xhr.status == 200){
				if(xhr.responseText == 'NO_LOGIN'){
					if(confirm("您还没登录呢，现在要登录吗？"))location.href='login.php';
				}else if(xhr.responseText == 'NOT_INTEGRITY'){
					alert("请先完善您的个人资料");
				}else if(xhr.responseText == 'NO_STARTUP'){
					if(confirm("您还没开通呢，现在要开通吗？"))window.open('/');
				}else if(xhr.responseText == 'NO_BODY'){
					alert("该会员已被禁用，您无法进行此操作！");SEND_TO_SELF
				}else if(xhr.responseText == 'REPEAT'){
					alert("您已经将该会员加入到追求着行列！");
				}else if(xhr.responseText == 'SEND_TO_SELF'){
					alert("对不起，您无法对您自己进行此操作！");
				}else{
					alert("恭喜您，设置成功");
				}
			}
		}
	}
	xhr.open("GET", url, true);
	xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
	xhr.send(null);
}



function appUpPhoto(uid){
	createXHR();
	var url = "ajaxUser.php?action=appUpPhoto&uid="+uid;
	xhr.onreadystatechange =  function(){
		if(xhr.readyState == 4){
			if(xhr.status == 200){
				if(xhr.responseText == 'NO_LOGIN'){
					if(confirm("您还没登录呢，现在要登录吗？"))location.href='login.php';
				}else if(xhr.responseText == 'NOT_INTEGRITY'){
					alert("请先完善您的个人资料");
				}else if(xhr.responseText == 'REPEAT'){
					alert("您的邀请已经发送出去，请勿重复发送！");
				}else if(xhr.responseText == 'SEND_TO_SELF'){
					alert("对不起，不能邀请自己！");
				}else{
					alert("恭喜您，邀请已发送成功");
				}
			}
		}
	}
	xhr.open("GET", url, true);
	xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
	xhr.send(null);
}
