﻿
function topLink(p_Num) {   //메인배너 링크

    p_Num= eval(p_Num*1);
    //alert(p_Num+"/"+p_Num+"/"+T_Num);

    var GoUrl;
    var SiteRoot = "";
    var host = document.URL.split('/')[2];

    if (host.indexOf(':9998') == -1 && (host.indexOf('localhost') != -1 || host.indexOf('220.95.232.97') != -1)) host += ':9998';   // 테스트 서버
    var hostssl = host.split(':')[0];

    if (p_Num == 1) {
        GoUrl = SiteRoot + "javascript:CenterNewWin('http://" + host + "/CoastHelper/ViewAllPop.aspx', 'ViewAllPop', 'toolbar=no,menubar=no,scrollbars=no,resizable=no,status=no,location=no,width=855,height=660');";  //전체보기
    }
    else if (p_Num == 2) {
        GoUrl = SiteRoot + "http://" + hostssl + "/CoastHelper/User/Login.aspx";  //로그인
    }
    else if (p_Num == 3)  
    {
        GoUrl = SiteRoot + "http://" + host + "/CoastHelper/User/MemberJoinAgree.aspx";    //회원가입 
    }
	else if (p_Num == 4) {
	    GoUrl = SiteRoot + "http://" + host + "/CoastHelper/Guide/UseGuide.aspx";  //이용안내
    }
    else if (p_Num == 5) {
    GoUrl = SiteRoot + "http://" + host + "/CoastHelper/SiteMap.aspx";  //사이트맵
    }
	else if (p_Num == 6) {
	    GoUrl = SiteRoot + "http://www.coast.kr/portal/html/eng/main.asp";  // 영문상이트
    }
    else if (p_Num == 7) {
        GoUrl = SiteRoot + "http://" + host + "/CoastHelper/User/Logout.aspx";     //로그아웃
    }
	else if (p_Num == 8) {
	    GoUrl = SiteRoot + "http://" + hostssl + "/CoastHelper/User/MemberUpdate.aspx"; //회원정보수정
    }
   
   MoveUrl(GoUrl)
}

function guide_Link(p_Num){   //메인 비주얼 외쪽 하단 배너

    p_Num= eval(p_Num*1);
	//s_Num= eval(s_Num*1);
    //alert(p_Num+"/"+p_Num+"/"+T_Num);


    var GoUrl;
    var SiteRoot = "";
 
        if (p_Num == 1) 
        {

			GoUrl = SiteRoot + "/CoastHelper/Guide/CoastSeaGuide.aspx"; 

        }
        else if (p_Num == 2) 
        {

            GoUrl = SiteRoot + "/CoastHelper/Guide/CoastMapGuide.aspx"; 

        }
        else if (p_Num == 3)  
        {

            GoUrl = SiteRoot + "/CoastHelper/Guide/CoastKnowledgeGuide.aspx"; 

        }
		else if (p_Num == 4)  
        {

            GoUrl = SiteRoot + "/CoastHelper/Guide/CoastInGuide.aspx"; 
        }
		else if (p_Num == 5)  
        {

            GoUrl = SiteRoot + "/CoastHelper/Guide/CoastHelperGuide.aspx"; 
        }
		else if (p_Num == 6)  
        {

            GoUrl = SiteRoot + "/CoastHelper/Guide/CoastCmisGuide.aspx"; 
        }
       
	   MoveUrl(GoUrl)

}

function MoveUrl(Url) {
    var GoUrl = Url;
    if (GoUrl != "" && GoUrl != undefined ) {
		//alert("'"+GoUrl+"'");
        window.location.href = GoUrl;
    } else {
        alert("서비스 준비 중 입니다.");
    }
}
