﻿
var s_nUrl      = location.href;
var s_nLenUrl   = parseInt(s_nUrl.length)
var s_nUrls     = s_nUrl.substring(0, s_nLenUrl + 1)
var r_dmn       = s_nUrls;

var Service_TopLink = {
	MB_InfoMain			: new SvcItem_TopLink("MB07", _SEC_URL_SSL + "/Member/mgrPri/mgrPri_Main.asp" ),
	MB_Join				: new SvcItem_TopLink("MB00", _SEC_URL_SSL + "/Member/Regist/Member_Regist_Step_01.asp", self) ,
	MB_Logout			: new SvcItem_TopLink("MB11", _SEC_URL_SSL + "/Member/Login/__Common_Logout_Proc.asp?r_dmn=" + r_dmn),
	MB_Login			: new SvcItem_TopLink("MB12", _SEC_URL_SSL + "/Member/Login/__Common_Login_Form.asp", self),
	MB_ChangePrivate 	: new SvcItem_TopLink("MB01", _SEC_URL_SSL + "/Member/MgrPri/Member_MgrPri_Check_Form.asp?proc_cd=CHGINFO"),
	MB_FindId			: new SvcItem_TopLink("MB03", _SEC_URL_SSL + "/Member/ForgotInfo/ForgotInfo_Main.asp" ),
	MB_FindPwd			: new SvcItem_TopLink("MB04", _SEC_URL_SSL + "/Member/ForgotInfo/ForgotInfo_Main.asp#ANCHOR_PASSWORD" ),
	MB_Withdrawal		: new SvcItem_TopLink("MB05", _SEC_URL_SSL + "/Member/Withdrawal/Member_Withdrawal_Check_Form.asp" ),
	MB_WithdrawalCancel	: new SvcItem_TopLink("MB06", _SEC_URL_SSL + "/Member/Withdrawal/Member_Withdrawal_Cancel_Form.asp" ),

	MB_DekaronIkan	    : new SvcItem_TopLink("MB101", _SEC_URL_SSL + "/Dekaron_Ikan/Ikan_Step_01.asp" ),

	CS_News				: new SvcItem_TopLink("CS01", _WEB_URL_PORTAL + "/News/News_List.asp?ntc_sort=N"),
	CS_Event			: new SvcItem_TopLink("CS02", _WEB_URL_PORTAL + "/News/News_List.asp?ntc_sort=E"),
	CS_Maintenance		: new SvcItem_TopLink("CS03", _WEB_URL_PORTAL + "/News/News_List.asp?ntc_sort=M"),

	CS_Support			: new SvcItem_TopLink("CS10", _SPT_URL + "/FAQ/FAQ_Main.asp"),
	CS_Qna  			: new SvcItem_TopLink("CS11", _SPT_URL + "/Qna/Qna_Main.asp"),
	CH_Main				: new SvcItem_TopLink("CH01", _SEC_URL_SSL + "/Cash/Cash_Main.asp"),
	CH_Charge			: new SvcItem_TopLink("CH03", _SEC_URL_SSL + "/Cash/Charge/Charge_Main.asp"),	
	CH_MyCash_Main		: new SvcItem_TopLink("CH11", _SEC_URL_SSL + "/Cash/MyCash/MyCash_Main.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_TopLink.go(objSvc, objTarget) 
	}
}

function SvcItem_TopLink(id, url, target)
{ 	
	this.id = id; 
	this.url = url; 
	this.target = target;
	if(typeof(target)!='object')
		this.target =  self;
}