﻿function go_LoginFormWithRetUrl(retUrl){
	var objForm = document.ParameterForm;
	with(objForm){
		action = _SEC_URL_SSL + "/Member/Login/__Common_Login_Form.asp?r_url=" + retUrl
		target = "GH_main";
		submit();
	}
}
function GoGame(gcd){
	var objForm = document.ParameterForm;
	with(objForm){
		switch(gcd){
			case "1001" :
				vaction = _WEB_URL_SUDDENATTACK;
				vtarget = "_self";
			break;
			case "2001" :
				vaction = _WEB_URL_DEKARON;
				vtarget = "_self";
			break;
			case "2002" :
				vaction = _WEB_URL_SANGOKUSHIHERO;
				vtarget = "_self";
			break;
			case "3001" :
				vaction = _WEB_URL_TRANSPEE;
				vtarget = "_self";
			break;
		}
		action = vaction;
		target = vtarget;
		submit();
	}
}
function GoGameByUrl(gurl){
	var objForm = document.ParameterForm;
	with(objForm){
		action = gurl;
		target = "_self";
		submit();
	}
}

var r_dmn = GetCurrentUrlFull();
var Service_Portal = {
	MB_Join				: new SvcItem("MB00", _SEC_URL_SSL + "/Member/Regist/Member_Regist_Step_01.asp", self) ,
	MB_ChangePrivate 	: new SvcItem("MB01", _SEC_URL_SSL + "/Member/MgrPri/Member_MgrPri_Check_Form.asp?proc_cd=CHGINFO"),
	MB_ChangePwd 		: new SvcItem("MB02", _SEC_URL_SSL + "/Member/MgrPri/Member_MgrPri_Check_Form.asp?proc_cd=CHGPWD" ),
	MB_FindId			: new SvcItem("MB03", _SEC_URL_SSL + "/Member/findIDPwd/Member_FindID_Form.asp" ),
	MB_FindPwd			: new SvcItem("MB04", _SEC_URL_SSL + "/Member/findIDPwd/Member_FindPwd_Form.asp" ),
	MB_Withdrawal		: new SvcItem("MB05", _SEC_URL_SSL + "/Member/Withdrawal/Member_Withdrawal_Check_Form.asp" ),
	MB_WithdrawalCancel	: new SvcItem("MB06", _SEC_URL_SSL + "/Member/Withdrawal/Member_Withdrawal_Cancel_Form.asp" ),
	MB_InfoMain			: new SvcItem("MB07", _SEC_URL_SSL + "/Member/mgrPri/mgrPri_Main.asp" ),
	MB_Logout			: new SvcItem("MB11", _SEC_URL_SSL + "/Member/Login/__Common_Logout_Proc.asp?r_dmn=" + r_dmn),
	MB_Login			: new SvcItem("MB12", _SEC_URL_SSL + "/Member/Login/__Common_Login_Form.asp", self),
	MB_Agreement		: new SvcItem("MB41", "/Etc/Agreement.asp"),
	MB_Policy			: new SvcItem("MB42", "/Etc/PrivatePolicy.asp"),
	MB_Company			: new SvcItem("MB43", "/Etc/AboutCompany.asp"),
		
	CM_Home				: new SvcItem("CM00", _WEB_URL_PORTAL + "/index.asp"),
	CM_GAMEHI			: new SvcItem("CM50", "http://www.gamehi.jp"),
	CM_Contactus		: new SvcItem("CM51", ""),

	CS_News				: new SvcItem("CS01", _WEB_URL_PORTAL + "/News/News_List.asp"),
	CS_Event			: new SvcItem("CS02", _WEB_URL_PORTAL + "/News/News_List.asp?ntc_sort=E"),
	CS_Maintenance		: new SvcItem("CS03", _WEB_URL_PORTAL + "/News/News_List.asp?ntc_sort=M"),

	CS_Support			: new SvcItem("CS10", _SPT_URL + "/FAQ/FAQ_Main.asp"),
	CS_FAQ				: new SvcItem("CS11", _SPT_URL + "/FAQ/FAQ_Main.asp"),
	CS_QNA				: new SvcItem("CS12", _SPT_URL + "/Qna/Qna_Main.asp"),
	CS_QNA_My_List		: new SvcItem("CS13", _SPT_URL + "/Qna/Qna_My_List.asp"),
	CS_OperationPolicy	: new SvcItem("CS14", _SPT_URL + "/Help/Operation_Policy.asp"),
	CS_Tel_Service		: new SvcItem("CS15", _SPT_URL + "/Support/Tel_Service.asp"),

	CS_FAQ_SUDDENATTACK	: new SvcItem("CS21", _WEB_URL_SUDDENATTACK + "/Support/FAQ/FAQ_Main.asp"),
	CS_QNA_SUDDENATTACK	: new SvcItem("CS22", _WEB_URL_SUDDENATTACK + "/Support/QNA/QNA_Main.asp"),
	
	CS_FAQ_DEKARON		: new SvcItem("CS23", _WEB_URL_DEKARON + "/Support/FAQ/FAQ_Main.asp"),
	CS_QNA_DEKARON		: new SvcItem("CS24", _WEB_URL_DEKARON + "/Support/QNA/QNA_Main.asp"),
	
	CS_FAQ_SANGOKUSHI	: new SvcItem("CS25", _WEB_URL_SANGOKUSHI + "/Support/FAQ/FAQ_Main.asp"),
	CS_QNA_SANGOKUSHI	: new SvcItem("CS26", _WEB_URL_SANGOKUSHI + "/Support/QNA/QNA_Main.asp"),

	CS_FAQ_TRANSPEE		: new SvcItem("CS27", _WEB_URL_TRANSPEE + "/Support/FAQ/FAQ_Main.asp"),		//트랜스피 공식사이트 FAQ 추가 - 2009.01.14 김상호
	CS_QNA_TRANSPEE		: new SvcItem("CS28", _WEB_URL_TRANSPEE + "/Support/QNA/QNA_Main.asp"),		//트랜스피 공식사이트 QNA 추가 - 2009.01.14 김상호

	CS_FAQ_NOSTALE		: new SvcItem("CS29", _WEB_URL_NOSTALE + "/supports/faq/faq2.asp"),
	CS_QNA_NOSTALE		: new SvcItem("CS30", _WEB_URL_NOSTALE + "/supports/qna/"),
	
	CS_FAQ_TEKKI		: new SvcItem("CS31", _WEB_URL_TEKKI + "/Support/QNA_Main.asp"),
	CS_QNA_TEKKI		: new SvcItem("CS32", _WEB_URL_TEKKI + "/Support/QNA_Main.asp"),

	CM_Help_ActiveX		: new SvcItem("CM40", _WEB_URL_PORTAL + "/support/help/Help_Install_ActiveX.asp"),
	CM_SiteMap			: new SvcItem("CM41", "/etc/sitemap/sitemap.asp"),
	
	CH_Main				: new SvcItem("CH01", _SEC_URL_SSL + "/Cash/Cash_Main.asp"),
	CH_Charge_Agree		: new SvcItem("CH02", _SEC_URL_SSL + "/Cash/Charge/Charge_Agreement.asp"),
	CH_Charge			: new SvcItem("CH03", _SEC_URL_SSL + "/Cash/Charge/Charge_Main.asp"),
	CH_MyCash_Main		: new SvcItem("CH11", _SEC_URL_SSL + "/Cash/MyCash/MyCash_Main.asp"),
	CH_Law_View			: new SvcItem("CH15", _SEC_URL_SSL + "/Cash/CashShop_Law_View.asp"),

	go : function(objSvc, objTarget, strParams) {
		var url = new String(objSvc.url);
		if(strParams) {
			if( url.search(/\?/) > -1)
				url = url + "&";
			else 				
				url = url + "?";
			url = url + strParams;
		}
		if(typeof(objTarget)!="object")
			objSvc.target.location = url;
		else
			objTarget.location = url;
		return;
	},
	
	Go : function(objSvc, objTarget) {
		Service_Portal.go(objSvc, objTarget) 
	}
}

function SvcItem(id, url, target)
{ 	
	this.id = id; 
	this.url = url; 
	this.target = target;
	if(typeof(target)!='object')
		this.target =  self;
}