//*****************************************************
//	MapxSeries AutoJump Script
//*****************************************************
function AutoJumpPage(svc,directmode,openmode)
{
	var sJampPage = "";

	if(document.location.hostname == "www.keiei-mapx.com"
		|| document.location.hostname == "www.tenshoku-mapx.com"
		|| document.location.hostname == "www.shikin-mapx.com"
		|| directmode == "DIRECT")
	{
		switch(svc)
		{
			// KeieiMapx
			case "KEIEI_NEWREG":
				sJampPage = "https://www.keiei-mapx.com/Entry/frmKeieiSinkiTouroku.aspx";
				break;
			// TenshokuMapx
			case "TENSHOKU_NEWREG":
				// 2007/01/26 T.AOSAWA UPDATE BEGIN
				// for campaign
				// 2007/03/27 T.Tebaka Mod
				sJampPage = "https://www.tenshoku-mapx.com/Entry/Entry.aspx";
				//sJampPage = "https://www.tenshoku-mapx.com/Campaign/SpringCamp1.aspx";
				// 2007/03/27 T.Tebaka Mod END
				// 2007/01/26 T.AOSAWA UPDATE END
				break;
			// ShikinMapx
			case "SHIKIN_NEWREG":
				sJampPage = "https://www.shikin-mapx.com:447/Entry/Entry.aspx";
				break;
				
			default:
				break;
		}
	}
	else
	{
		switch(svc)
		{
			// KeieiMapx
			case "KEIEI_NEWREG":
				if(document.location.hostname != "localhost")
				{
					sJampPage = "https://"  + document.location.hostname + "/Entry/frmKeieiSinkiTouroku.aspx";
				}
				else
				{
					sJampPage = "http://"  + document.location.hostname + "/Entry/frmKeieiSinkiTouroku.aspx";
				}
				break;
			// TenshokuMapx
			case "TENSHOKU_NEWREG":
				// 2007/01/26 T.AOSAWA UPDATE BEGIN
				// for campaign
				// 2007/03/27 T.Tebaka Mod
				sJampPage = "http://"  + document.location.hostname + "/Entry/Entry.aspx";
				//sJampPage = "http://"  + document.location.hostname + "/Campaign/SpringCamp1.aspx";
				// 2007/03/27 T.Tebaka Mod END
				// 2007/01/26 T.AOSAWA UPDATE END
				break;
			// ShikinMapx
			case "SHIKIN_NEWREG":
				sJampPage = "http://"  + document.location.hostname + "/Entry/Entry.aspx";
				break;
			default:
				break;
		}
	}

	// Jump!!
	if(sJampPage != "")
	{
		if(openmode != "BLANK")
		{
			document.location.href = sJampPage;
		}
		else
		{
			var w = window.open(sJampPage);
			w.focus();
		}
	}
}

function AutoJumpPageMsg(svc,directmode,openmode,loginFlg)
{
	var sJampPage = "";
	var sCopId = "";

	if(document.location.hostname == "www.keiei-mapx.com"
		|| document.location.hostname == "www.tenshoku-mapx.com"
		|| directmode == "DIRECT")
	{
		switch(svc)
		{
			case "TENSHOKU_MSG":
				if (document.location.hostname.indexOf("keiei")==-1) {
				
					sCopId = document.copIdForm.copID.value;
				
					if (loginFlg=="True"){
						sJampPage = "https://www.tenshoku-mapx.com/Search/MessageSendOtherWin.aspx?id=" + sCopId;
					}
					else {
						sJampPage = "https://www.tenshoku-mapx.com/Search/MessageSendOtherWinNoLogin.aspx?id=" + sCopId;
					}
				}
				break;
				
			default:
				break;
		}
	}
	else
	{
		switch(svc)
		{
			case "TENSHOKU_MSG":
				if (document.location.hostname.indexOf("keiei")==-1) {
				
					sCopId = document.copIdForm.copID.value;
				
					if (loginFlg=="True"){
						sJampPage = "http://"  + document.location.hostname + "/Search/MessageSendOtherWin.aspx?id=" + sCopId;
					}
					else {
						sJampPage = "http://"  + document.location.hostname + "/Search/MessageSendOtherWinNoLogin.aspx?id=" + sCopId;
					}
				}
				break;
				
			default:
				break;
		}
	}

	// Jump!!
	if(sJampPage != "")
	{
		if(openmode != "BLANK")
		{
			document.location.href = sJampPage;
		}
		else
		{
			var w = window.open(sJampPage);
			w.focus();
		}
	}
}

function AutoJumpPageClip(svc,directmode,openmode,loginFlg)
{
	var sJampPage = "";
	var sCopId = "";
	var sJobSeq = "";

	if(document.location.hostname == "www.keiei-mapx.com"
		|| document.location.hostname == "www.tenshoku-mapx.com"
		|| directmode == "DIRECT")
	{
		switch(svc)
		{
			case "TENSHOKU_CLIP":
				if (document.location.hostname.indexOf("keiei")==-1) {
				
					sCopId = document.copIdForm.copID.value;
					sJobSeq = document.copIdForm.jobSeq.value;
				
					if (loginFlg=="True"){
						sJampPage = "https://www.tenshoku-mapx.com/Search/FavoriteRegistOtherWin.aspx?copId=" + sCopId + "&jobSeq=" + sJobSeq + "&seq=0&execMode=fromDetail&registMode=alreadyRegist";
					}
					else {
						sJampPage = "https://www.tenshoku-mapx.com/Search/FavoriteRegistOtherWinNoLogin.aspx?copId=" + sCopId + "&seq=" + sJobSeq + "&execMode=fromDetail";
					}
				}
				break;
				
			default:
				break;
		}
	}
	else
	{
		switch(svc)
		{
			case "TENSHOKU_CLIP":
				if (document.location.hostname.indexOf("keiei")==-1) {
				
					sCopId = document.copIdForm.copID.value;
					sJobSeq = document.copIdForm.jobSeq.value;
				
					if (loginFlg=="True"){
						sJampPage = "http://"  + document.location.hostname + "/Search/FavoriteRegistOtherWin.aspx?copId=" + sCopId + "&jobSeq=" + sJobSeq + "&seq=0&execMode=fromDetail&registMode=alreadyRegist";
					}
					else {
						sJampPage = "http://"  + document.location.hostname + "/Search/FavoriteRegistOtherWinNoLogin.aspx?copId=" + sCopId + "&seq=" + sJobSeq + "&execMode=fromDetail";
					}
				}
				break;
				
			default:
				break;
		}
	}

	// Jump!!
	if(sJampPage != "")
	{
		if(openmode != "BLANK")
		{
			document.location.href = sJampPage;
		}
		else
		{
			var w = window.open(sJampPage);
			w.focus();
		}
	}
}