if ((typeof (ncsj)=="undefined"))
{	
	ncsj={ManageFriend:[]};
}
else
{
	ncsj.namespace ("ncsj.user");
}

ncsj.user.ManageFriend = 
function()
{
	ncsj.user.ManageFriend.requestUserInformation = 
	function(nickName)
	{
		var MSG_ERROR = "Invalid Data Input";	

		try 

		{
			resultURI = encodeURI (nickName);
			sendUrl = "http://myinfo.plaync.jp/external/profile/index.nc?targetNickName=" + resultURI;
			window.open (sendUrl,"_popUp","width=520, height=650, scrollbars=no, location=no, menubar=no, toolbar=no, status=no");
		} 
		catch (exc) 
		{
			resultURI = MSG_ERROR;

		}

	}

	ncsj.user.ManageFriend.requestUserKeyword = 
	function(keyword)
	{
		var MSG_ERROR = "Invalid Data Input";	

		try 
		{
			resultURI = encodeURI (keyword);
			sendUrl = "http://blog.plaync.jp/?tp=keyword&vw=user&Keyword=" + resultURI;
			window.open (sendUrl,"_keyword");
		} 
		catch (exc) 
		{
			resultURI = MSG_ERROR;
		}
	}

	ncsj.user.ManageFriend.requestUserFriendList = 
	function()
	{
		var MSG_ERROR = "Invalid Data Input";	

		try 
		{
			sendUrl = "http://myinfo.plaync.jp/friend/popup/friendList.nc";
			window.open (sendUrl,"_friendList","width=520, height=650, scrollbars=no, location=no, menubar=no, toolbar=no, status=no");
		} 
		catch (exc) {}
	}

	ncsj.user.ManageFriend.requestFriend = 
	function(nickName)
	{
		var MSG_ERROR = "Invalid Data Input";	

		try 
		{
			var sendUrl = "http://myinfo.plaync.jp/friend/popup/external/index.nc";
			var parameter = "?ap=requestFriend&targetNickName=" + encodeURI (nickName);
			window.open (sendUrl + parameter,"_friendList","width=520, height=650, scrollbars=no, location=no, menubar=no, toolbar=no, status=no");
		} 
		catch (exc) {}
	}

	//javascript:ncsj.user.ManageFriend.createMessage('nickname');

	ncsj.user.ManageFriend.createMessage = 
	function(nickName)
	{
		var MSG_ERROR = "Invalid Data Input";	

		try 
		{
			resultURI = encodeURI (nickName);
			sendUrl = "http://myinfo.plaync.jp/message/popup/index.nc?ap=createMessage&targetNickName=" + resultURI;
			window.open (sendUrl,"_message","width=520, height=650, scrollbars=no, location=no, menubar=no, toolbar=no, status=no");
		} 
		catch (exc) 
		{
			resultURI = MSG_ERROR;

		}
	}

	ncsj.user.ManageFriend.createOptionedMessage = 
	/* DEBUG */
	function(nickName, option, preContent)
	//function(nickName)
        {
		var MSG_ERROR = "Invalid Data Input";	
		var option = 2;
		
		try 
		{
			resultURI = encodeURI(nickName);
			sendUrl = "http://myinfo.plaync.jp/message/popup/index.nc?ap=createMessage&messageType=" + option + "&targetNickName=" + resultURI + "&preContent=" + encodeURI(preContent);
			window.open (sendUrl,"_message","width=520, height=650, scrollbars=no, location=no, menubar=no, toolbar=no, status=no");
		} 
		catch (exc) 
		{
			resultURI = MSG_ERROR;

		}

	/* DEBUG */
	}
}
ncsj.user.ManageFriend();