
function getAuthInfoURL()
{
	var strurl	= '';

	/*	テスト用設定（ログイン後確認用） */
//	strurl='/test/UserInfo/userinfo.xml';

	/*	テスト用設定（ログイン前確認用） */
//	strurl='/test/UserInfo/nologin_userinfo.xml';

	/*	本番用設定 */
	strurl='/pid02/auth/getAuthInfo.do';

	return strurl;

}
	
function getPointRemainURL()
{	
	var strurl	= '';

	/*	テスト用設定（ログイン前確認用） */
//	strurl='/test/PointInfo/pointinfo.xml';

	/*	本番用設定 */
	strurl='/pid06/PointPurse.do?getType=1&pointTypeId=M000000001';

	return strurl;
	
}
	
function getplusid_host_https()
{	
	var strhost	= '';

	/*	テスト用設定  */
//	strhost='https://localhost:8080';

	/*	本番用設定 */
	strhost='https://pid.nhk.or.jp';

	return strhost;

}

function getplusid_host_http()
{	
	var strhost	= '';

	/*	テスト用設定  */
//	strhost	= 'http://localhost:8080';

	/*	本番用設定 */
	strhost='http://pid.nhk.or.jp';

	return strhost;

}

function getLoginURL(
INPUT_PID //業務毎のID
)
{	
	var strURL	= '';
	var strURL2	= '';

	strURL	= document.location.href;

	//以下、ログイン画面で共通ヘッダのログインボタンを押したときに無限ループすることへ
	//対処
	//ログイン画面のＵＲＬではない場合
	if (strURL.replace("/pid03/loginform.do?","") == strURL) {

		strURL=strURL;

	//ログイン画面のＵＲＬの場合
	} else {

		// ?href= で分割する。
		strURL_array=strURL.split("?href=");

		//１項目の場合、ＮＵＬＬをセット
		if(strURL_array.length <= 1 ) {
			strURL2 = "";

		//２項目目を取得する。
		} else {
			strURL2 = strURL_array[1];

		}

		//urldecodeする。
		strURL2 = decodeURIComponent(strURL2);

		strURL = strURL2;

	}

	strURL=strURL.replace(getplusid_host_http(),getplusid_host_https());

	return strURL;
}

function getLogoutURL(
INPUT_PID //業務毎のID
)
{	
	var strURL	= '';

	var strURL	= getplusid_host_http();

	if(INPUT_PID == "bcas") {
		strURL += '/bcas/index.html';

	} else if(INPUT_PID == "event") {
		strURL += '/event/index.html';

	} else if(INPUT_PID == "jushinryo") {
		strURL += '/jushinryo/index.html';

	} else if(INPUT_PID == "pid01") {
		strURL += '/pid01/index.html';

	} else if(INPUT_PID == "pid01_index") {
		strURL += '/pid01/index.html';

	} else if(INPUT_PID == "pid02") {
		strURL += '/pid01/index.html';

	} else if(INPUT_PID == "pid03") {
		strURL += '/pid01/index.html';

	} else if(INPUT_PID == "pid04") {
		strURL += '/pid04/NoticeTop/Show.do';

	} else if(INPUT_PID == "pid05") {
		strURL += '/pid05/index.html';

	} else if(INPUT_PID == "pid06") {
		strURL += '/pid06/index.html';

	} else if(INPUT_PID == "pid07") {
		strURL += '/pid01/index.html';

	} else if(INPUT_PID == "pid08") {
		//メルマガ
		strURL += '/pid08/MailMagCateList.do';

	} else if(INPUT_PID == "netstera") {
		strURL += '/netstera/index.html';

	} else if(INPUT_PID == "pid10") {
		strURL += '/pid10/index.html';

	} else if(INPUT_PID == "pid14") {
		strURL += '/pid14/index.html';

	} else if(INPUT_PID == "present") {
		strURL += '/pid16/present/index.html';

	}

	return strURL;
}

