/*****************************************************************************************************
 * File Name 	: VCClientEtc.js
 * @author ATTO Information Technology Corp. eWork R&D Team 
 * @since 2007. 5. 16
 * @version 3.0
 * ----------------------------------------------------------------------------------------------------
 * Modification Information
 * Date             Developer          	Content
 * -------          -------------       ---------------------------
 * 2007.06.07     	SeonAeYIM			Create     
 * 2008.05.09		SeonAeYIM			ReCreate     
 * ----------------------------------------------------------------------------------------------------
 * Copyright (C) 2007 by ATTO Information Technology Corp. eWork R&D Team  All rights reserved.
 *****************************************************************************************************/


/**
 * 클럽관련 공통 클래스
 */
var VCCMControl={
	
	pageLink : function(strCase, strURL, strParams, strTarget){
		//SCActionControl 초기화
		SCActionControl.initAction();
		
		if(typeof(strParams) === SCConst.UNDEFINED){strParams = "";}
		if(typeof(strTarget) === SCConst.UNDEFINED){strTarget = "_self";}

		try {
			switch (strCase) {
				case "VCGP_EDITMYCLUB" : //클럽바로가기편집
					SCActionControl.CALL_ID = "VcGpEditMyClubC.SELECT_MYCLUB";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpEditMyClubC.jsp", "", strTarget);
					break;
				case "ACTIVITY" : //클럽활동
					SCActionControl.CALL_ID = "VcGpActivityL.ACTIVITY";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpActivityL.jsp", strParams, strTarget);
					break;
				case "RANKING"	: //클럽랭킹
					SCActionControl.CALL_ID = "VcGpRankL.RANK";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpRankL.jsp", strParams, strTarget);
					break;
				case "ENTRUST" : //나의클럽현황:위임바로가기
					SCActionControl.CALL_ID = "VcGpCloseM.SELECT_REQCLOSE";
					SCActionControl.addResultURL ("error", "/srcweb/vc/vccm/VcCmClosed.jsp");
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpEntrustmentM.jsp", strParams, "_blank");
					break;
				case "CLOSE" : //나의클럽현황:폐쇄바로가기
					SCActionControl.CALL_ID = "VcGpCloseM.SELECT_REQCLOSE";
					SCActionControl.addResultURL ("error", "/srcweb/vc/vccm/VcCmClosed.jsp");
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpCloseM.jsp", strParams, "_blank");
					break;
				case "WITHDRAWAL" : //나의클럽현황:탈퇴하기 바로가기
					SCActionControl.CALL_ID = "VcGpWithdrawalC.WITHDRAWAL_SELF";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpWithdrawalC.jsp", strParams, "_blank");
					break;
				case "JOIN" : //나의클럽현황:클럽가입 바로가기
					SCActionControl.CALL_ID = "VcGpApplicationFormC.CLUB_JOIN";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpApplicationFormC.jsp", strParams, "_blank");
					break;
				case "CLUBLIST" :	//클럽현황조회
					SCActionControl.CALL_ID = "VcGpSearchL.CLUBLIST";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpSearchL.jsp", strParams, strTarget);
					break;
				case "SELECTENTRUST" :	//위임이력조회
					SCActionControl.CALL_ID = "VcGpInformationT.ENTRUST";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpInformationT.jsp", "Param01=2&KEY__CLUB_NO="+strParams, strTarget);
					break;	
				case "VC_TOTALSECTION" :	//클럽전체분류
					SCActionControl.CALL_ID = "VcGpSearchL.TOTALSECTION";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpWorksList_TotalSection.jsp", strParams, strTarget);
					break;
				case "VCGPMYLISTJOIN" :	//나의클럽조회-가입
					SCActionControl.CALL_ID = "VcGpMyClubL.MYCLUB";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpMyClubL.jsp", "KEY__MENUNO="+"JOIN", strTarget);
					break;
				case "VCGPMYLISTREG" :	//나의클럽조회-개설
					SCActionControl.CALL_ID = "VcGpMyClubL.MYCLUB";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpMyClubL.jsp", "KEY__MENUNO="+"REG", strTarget);
					break;
				case "SEARCHMEMBER" :	//클럽회원검색팝업
					SCActionControl.CALL_ID = "VcCmFindMemLP.FINDMEMBER";
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmFindMemLP.jsp", strParams, "popup", 800, 680, "toolbar=no, location=no, menubar=no, scrollbars=no, status=yes, resizable=no");
					break;
				case "CLUBAGREE" : //클럽이용약관팝업
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmStipulationP.jsp", "VcCmStipulationP", "popup", 800, 560, "toolbar=no, location=no, menubar=no, scrollbars=no, status=yes, resizable=no");
					break;
				case "CHECKNAME" : //클럽명중복확인
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmNameCheckP.jsp", "VcCmNameCheckP", "popup", 490, 380, "toolbar=no, location=no, menubar=no, scrollbars=no, status=yes, resizable=no");
					break;
				case "CHECKURL" : //URL중복확인
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmUrlCheckP.jsp", "VcCmUrlCheckP", "popup", 390, 330, "toolbar=no, location=no, menubar=no, scrollbars=no, status=yes, resizable=no");
					break;
				case "DETAILHOME" : //클럽홈방문수체크  || case "VSTCHECK"
					SCActionControl.CALL_ID = "VcGpDetailHomeC.HOMECHECK";
					SCActionControl.addResultURL ("error", "/srcweb/vc/vccm/VcCmClosed.jsp");
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpDetailHomeC.jsp", strParams, "");
					break;
				case "DETAILHOME_S" : //클럽홈방문수체크  || case "VSTCHECK"
					SCActionControl.CALL_ID = "VcGpDetailHomeC.HOMECHECK";
					SCActionControl.addResultURL ("error", "/srcweb/vc/vccm/VcCmClosed.jsp");
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpDetailHomeC.jsp", strParams, strTarget);
					break;
				case "SELECTHOME" : //클럽홈조회
					SCActionControl.CALL_ID = "VcGpDetailHomeC.SELECTHOME";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpDetailHomeC.jsp", strParams);
					break;
				case "SELECTCNTMBR" :	//클럽회원현황보기
					SCActionControl.CALL_ID = "VcGpMemberL.MEMBERLIST";
					SCActionControl.SUCCESS_URL = "/srcweb/vc/vcgp/VcGpMemberL.jsp";
					SCActionControl.addResultURL ("error", "/srcweb/vc/vccm/VcCmHomeErrorL.jsp");
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpMemberL.jsp", "KEY__MBR_GRADE_CD1=true&KEY__MBR_GRADE_CD2=true&KEY__MBR_GRADE_CD3=true&KEY__CLUB_NO="+strParams, strTarget);
					break;
				case "SELECTBRDMANAGER" :	//게시판운영자조회
					SCActionControl.CALL_ID = "VcGpBoardManagerL.BOARDMANAGER";
					SCActionControl.SUCCESS_URL = "/srcweb/vc/vcgp/VcGpBoardManagerL.jsp";
					SCActionControl.addResultURL ("error", "/srcweb/vc/vccm/VcCmHomeErrorL.jsp");
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpBoardManagerL.jsp",  "KEY__CLUB_NO="+strParams, strTarget);
					break;
				case "DOCPOPUP" : //가입신청서확인 팝업
					SCActionControl.CALL_ID = "VcCmApplicationFormP.APPLICATION_FORM";
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmWorksPopUpP.jsp", strParams  + "&PGCASE=DOCPOPUP", "popup", 650, 680, "toolbar=no, location=no, menubar=no, scrollbars=no, status=yes, resizable=yes");
					break;
				case "REQPOPUP" : //강제탈퇴요청팝업	
					SCActionControl.CALL_ID = "";
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmWorksPopUpP.jsp", strParams + "&PGCASE=REQPOPUP", "popup", 430, 410, "toolbar=no, location=no, menubar=no, scrollbars=no, status=yes, resizable=no");
					break;
				case "OUTPOPUP" :	//강제탈퇴팝업
					SCActionControl.CALL_ID = "";
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmWorksPopUpP.jsp", strParams + "&PGCASE=OUTPOPUP", "popup", 430, 420, "toolbar=no, location=no, menubar=no, scrollbars=no, status=yes, resizable=no");
					break;				
				case "REJPOPUP" :	//가입거부 팝업 
					SCActionControl.CALL_ID = "";
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmWorksPopUpP.jsp", strParams + "&PGCASE=REJPOPUP", "popup", 430, 420, "toolbar=no, location=no, menubar=no, scrollbars=no, status=yes, resizable=no");
					break;
				case "INTPOPUP" :	//가입차단 팝업 
					SCActionControl.CALL_ID = "";
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmWorksPopUpP.jsp", strParams + "&PGCASE=INTPOPUP", "popup", 430, 420, "toolbar=no, location=no, menubar=no, scrollbars=no, status=yes, resizable=no");
					break;
				case "LINK001" :	//기본정보관리
					SCActionControl.CALL_ID = "VcGpBaseInfoM.SELECT_BASEINFO";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpBaseInfoM.jsp", strParams, strTarget);
					break;
				case "LINK002" :	//클럽홈구성
					SCActionControl.CALL_ID = "VcGpIntroductionM.SELECT_HOME_MAKE";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpIntroductionM.jsp", strParams, strTarget);
					break;
				case "LINK003" :	//가입신청관리
					SCActionControl.CALL_ID = "VcGpApplicationFormM.SELECT_APPFORM_MANAGEMENT";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpApplicationFormM.jsp", strParams, strTarget);
					break;
				case "LINK004" :	//클럽장위임
					SCActionControl.CALL_ID = "VcGpEntrustmentM.SELECT_ENTRUSTMENT";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpEntrustmentM.jsp", strParams, strTarget);
					break;
				case "LINK005" :	//클럽폐쇄요청
					SCActionControl.CALL_ID = "VcGpCloseM.SELECT_REQCLOSE";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpCloseM.jsp", strParams, strTarget);
					break;
				case "LINK006" :	//클럽폐쇄요청취소
					SCActionControl.CALL_ID = "VcGpCancelCloseM.SELECT_CANCELCLOSE";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpCancelCloseM.jsp", strParams, strTarget);
					break;
				case "LINK007" :	//게시판구성
					SCActionControl.CALL_ID = "VcGpBoardEntrustM.SELECT_BOARDENTRUST";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpBoardEntrustM.jsp", strParams, strTarget);
					break;
				case "LINK008" : 	//게시판권한관리
					SCActionControl.CALL_ID = "VcGpBoardAuthorityM.SELECT_AUTHORITH";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpBoardAuthorityM.jsp", strParams, strTarget);
					break;
				case "LINK009" :    //작업공간생성여부조회
					SCActionControl.CALL_ID = "VcGpManagementMainR.MANAGE_MAIN";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpWorkspaceC.jsp", strParams + "&KEY__PAGE_CASE=SPACE&MENU_NO=00", strTarget);
					break;
				case "LINK0016" :    //작업공간이 생성되었을 때 해당 작업공간으로 이동
					SCActionControl.CALL_ID = "VcGpManagementMainR.MANAGE_MAIN";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpWorkspaceL.jsp", strParams + "&KEY__PAGE_CASE=SPACE&MENU_NO=00", strTarget);
					break;
				case "LINK0010" :	//클럽회원현황관리
					SCActionControl.CALL_ID = "VcGpMemberM.SELECT_MEMBERM";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpMemberM.jsp", "KEY__MBR_GRADE_CD1=true&KEY__MBR_GRADE_CD2=true&KEY__MBR_GRADE_CD3=true&"+strParams, strTarget);
					break;
				case "LINK0010B" :	//클럽회원현황관리
					SCActionControl.CALL_ID = "VcGpMemberM.SELECT_MEMBERM";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpMemberM.jsp", "KEY__MBR_GRADE_CD1=true&KEY__MBR_GRADE_CD2=true&KEY__MBR_GRADE_CD3=true&"+strParams, "_blank");
					break;
				case "LINK0011" :	//가입신청회원목록
					SCActionControl.CALL_ID = "VcGpApplicantMemberM.SELECT_APPLICANT_MEMBER";
					SCActionControl.addResultURL ("error", "/srcweb/vc/vccm/VcCmClosed.jsp");
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpApplicantMemberM.jsp", strParams, strTarget);
					break;
				case "LINK0012" :	//강제탈퇴요청목록
					SCActionControl.CALL_ID = "VcGpReqWithdrawalMemberM.SELECT_REQ_WITHDRAWALMEMBER";
					SCActionControl.addResultURL ("error", "/srcweb/vc/vccm/VcCmClosed.jsp");
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpReqWithdrawalMemberM.jsp", strParams, strTarget);
					break;
				case "LINK0013" :	//탈퇴회원목록
					SCActionControl.CALL_ID = "VcGpWithdrawalMemberM.SELECT_WITHDRAWAL_MEMBER";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpWithdrawalMemberM.jsp", strParams, strTarget);
					break;
				case "LINK0014" :	//가입차단회원
					SCActionControl.CALL_ID = "VcGpInterceptionMemberM.SELECT_INTERCEPT_MEMBER";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpInterceptionMemberM.jsp", strParams, strTarget);
					break;
				case "LINK0015" :	//회원상태이력
					SCActionControl.CALL_ID = "VcGpStateMemberM.SELECT_HIST_MEMBERSTAT";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpStateMemberM.jsp", strParams, strTarget);
					break;
				case "NEWWRITE" : 	//게시물 신규 작성
					SCActionControl.CALL_ID = "VcGpBoardWritingC.WRITING";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpBoardWritingC.jsp", strParams, strTarget);
					break;
				case "BOARDDETAIL" : //게시물 상세					
					SCActionControl.CALL_ID = "VcGpBoardDetailL.BOARD_DETAIL";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpBoardDetailL.jsp", strParams, strTarget);
					break;
				case "BOARDDETAILB" : //게시물 상세					
					SCActionControl.CALL_ID = "VcGpBoardDetailL.BOARD_DETAIL";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpBoardDetailL.jsp", strParams, "_blank");
					break;
				case "BOARDLIST" :	//게시판 리스트					
					SCActionControl.CALL_ID = "VcGpFreeBoardL.BOARD";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpFreeBoardL.jsp", strParams, strTarget);
					break;
				case "BRDWRTMODIFY" : //게시물 수정					
					SCActionControl.CALL_ID = "VcGpBoardWritingC.MODIFY_WROTE";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpBoardWritingC.jsp", strParams, strTarget);
					break;
				case "BRDWRTREPLY" : // 게시물 답글
					SCActionControl.CALL_ID = "VcGpBoardWritingC.REPLY_WROTE";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpBoardWritingC.jsp", strParams, strTarget);
					break;
				case "MEMOBOARD" :
					SCActionControl.CALL_ID = "VcGpMemoBoardL.BOARD_LIST";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpMemoBoardL.jsp", strParams, strTarget);
					break;
					
				case "COOPNOTE" :		// 협업노트 링크
					SCActionControl.CALL_ID = "VcNtMain.COOP_NOTE";
					SCActionControl.linkPage("/srcweb/vc/vcnt/VcNtMain.jsp", strParams, strTarget);
					break;
					
				case "NOTEMANAGE" :		// 협업노트 관리 링크
					SCActionControl.CALL_ID = "VcGpNoteEntrustM.SELECT_NOTEENTRUST";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpNoteEntrustM.jsp", strParams, strTarget);
					break;
					
				case "NOTEUSERMANAGE" :		// 협업노트 사용자 관리 링크
					SCActionControl.CALL_ID = "VcGpNoteAuthorityM.SELECT_NOTE_AUTH";
					SCActionControl.linkPage("/srcweb/vc/vcgp/VcGpNoteAuthorityM.jsp", strParams, strTarget);
					break;
					
				case "CLOSE_P" :		// 클럽폐쇄 확인 팝업
					SCActionControl.SUBMIT_METHOD = "post";
					SCActionControl.CALL_ID = "VcCmCloseP.CLOSE";
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmWorksPopUpP.jsp", strParams + "&PGCASE=CLOSE_P", "VcCmCloseP", 530,390, "toolbar=no, location=no, menubar=no, scrollbars=no, status=no, resizable=no, target=0");
					break
					
				case "CANCELCLOSE" :		// 클럽폐쇄취소 확인 팝업
					SCActionControl.SUBMIT_METHOD = "post";
					SCActionControl.CALL_ID = "VcCmCancelCloseP.CANCELCLOSE";
					SCActionControl.linkPage("/srcweb/vc/vccm/VcCmWorksPopUpP.jsp", strParams + "&PGCASE=CANCELCLOSE", "VcCmCancelCloseP", 530, 410, "toolbar=no, location=no, menubar=no, scrollbars=no, status=no, resizable=no, target=0");
					break
			}
		} catch(ex){
			throw SCErrorControl.raiseSysErr(ex, "linkPage");			
		}
	},
	
	pageBoardLink:function(strCase, strURL, strParams, strBoardKnd) {
		if(typeof(strParams) === SCConst.UNDEFINED){strParams = "";}
		switch(strCase){
			case "CLUBBOARD" :
				if(strBoardKnd === "G") {
					this.pageLink("BOARDLIST", "", strParams);
				} else if (strBoardKnd === "M") {
					this.pageLink("MEMOBOARD", "", strParams);
				}				
				break;
		}
	},
	
	/** 
	 * 클럽 단축 주소
	 * @param {Object} strClubUrl
	 * @param {Object} strTarget
	 */
	clickClubUrl : function(strClubUrl, strTarget) {
		if(strTarget == null || strTarget == "undefined") {
			strTarget = "_blank"
		}
		window.open("/eworklandweb/club/" + strClubUrl, strTarget);
	}
	
};
