function add_friend(to,from) {
	if (from) {
		skybox('/member/add_friend?to='+to+'&from='+from,500);
	} else {
		login_skybox();
	}
}

function add_friend_submit(theform) {
	theform.action = '/member/add_friend';
	theform.method = 'post';
	AjaxRequest.submit(theform,{
		'onSuccess':function(req){
			document.getElementById('skybox').innerHTML = req.responseText;
		}
	});
}




function send_msg(to,from) {
	if (from) {
		skybox('/member/send_msg?to='+to+'&from='+from,500);
	} else {
		login_skybox();
	}	
}

function send_msg_submit(theform) {
	theform.action = '/member/send_msg';
	theform.method = 'post';
	AjaxRequest.submit(theform,{
		'onSuccess':function(req){
			document.getElementById('skybox').innerHTML = req.responseText;
		}
	});
}

function post_comments(to,from) {
	if (from) {
		skybox('/member/post_comments?to='+to+'&from='+from,500);
	} else {
		login_skybox();
	}	
}

function post_comments_submit(theform) {
	theform.action = '/member/post_comments';
	theform.method = 'post';
	AjaxRequest.submit(theform,{
		'onSuccess':function(req){
			document.getElementById('skybox').innerHTML = req.responseText;
		}
	});
}


