/*******************************************************************************
* Title       : PHCO.js
* Description : È­¸é±¸¼ºÀ» À§ÇÑ ½ºÅ©¸³Æ®
* File Name   : /common/js/common/PHCO.js
* Copyright   : Copyright (c) 2004
* Company     : CyberImagination
* @author     : Sang-Mi Lee
******************************************************************************/

var Layout_MenuId   = null ;//¸Þ´º¾ÆÀÌµð
var fls_body_url    = null ;//¿ÞÂÊ¸Þ´ºflashÁÖ¼Ò
var fls_body_width  = null ;//¿ÞÂÊ¸Þ´ºflashÁÖ¼Ò
var fls_body_height = null ;//¿ÞÂÊ¸Þ´ºflashÁÖ¼Ò
var fls_left_url    = null ;//¿ÞÂÊ¸Þ´ºflashÁÖ¼Ò
var mylp_home       = tempForm.mylpUrl.value;//mylp domain
var mylpLphomeUrl       = tempForm.mylpLphomeUrl.value;//mylphome domain 
var mylpLphomeGate       = tempForm.mylpLphomeUrl.value;//mylphome domain 


/* -----------------------------------------------------------------------------
Function : LPpage()
Comment  : º¸Çè»óÇ°
----------------------------------------------------------------------------- */
function LPpage()
{
	location.href = mylp_home;
}

/* -----------------------------------------------------------------------------
Function : prudential01()
Comment  : º¸Çè»óÇ°¾È³»(¿À´ÃÂÊ Äü¸Þ´º Prudential) 
----------------------------------------------------------------------------- */
function prudential01() 
{
	location.href = "/products/wlp_special.do";
}

/* -----------------------------------------------------------------------------
Function : prudential01()
Comment  : º¸Çè°¡ÀÔ »ó´ã(¿À´ÃÂÊ Äü¸Þ´º Prudential)
----------------------------------------------------------------------------- */
function prudential02() {
	location.href = "/products/join_counsel.do";
}

/* -----------------------------------------------------------------------------
Function : prudential01()
Comment  : e-mail ¾È³»¼­ºñ½º(¿À´ÃÂÊ Äü¸Þ´º Prudential)
----------------------------------------------------------------------------- */
function prudential03() {
	location.href = "/customer/email_intro.jsp";
}

/* -----------------------------------------------------------------------------
Function : myLP01()
Comment  : ´ã´çLP°Ë»ö(¿À´ÃÂÊ Äü¸Þ´º MYLP)
----------------------------------------------------------------------------- */
function myLP01() 
{
	//location.href = mylpLphomeGate+"/_common/gate.jsp?target=/lppage/lp_search_self_before.do";
	location.href = mylp_home +"/lppage/lp_search_self_before.do";
	
}

/* -----------------------------------------------------------------------------
Function : myLP02()
Comment  : LP°Ë»ö(¿À´ÃÂÊ Äü¸Þ´º MYLP)
----------------------------------------------------------------------------- */
function myLP02() {
	//location.href = mylpLphomeGate+"/_common/gate.jsp?target=/lppage/lp_search_main.do";
	location.href = mylp_home + "/lppage/lp_search_main.do";

}

/* -----------------------------------------------------------------------------
Function : myLP03()
Comment  : ÁöÁ¡ÃßÃµLP(¿À´ÃÂÊ Äü¸Þ´º MYLP)
----------------------------------------------------------------------------- */
function myLP03() {
	//location.href = mylpLphomeGate+"/_common/gate.jsp?target=/lppage/pru_recommand.do";		
	location.href = mylp_home +"/lppage/pru_recommand.do";		

}

/* -----------------------------------------------------------------------------
Function : myLP04()
Comment  : LPÀÎÅÍºä(¿À´ÃÂÊ Äü¸Þ´º MYLP)
----------------------------------------------------------------------------- */
function myLP04() {
	//location.href = mylpLphomeGate+"/_common/gate.jsp?target=/lppage/lp_interview_list.do";		
	location.href = mylp_home +"/lppage/lp_interview_list.do";		

}

/* -----------------------------------------------------------------------------
Function : prumail01()
Comment  : Çª¸£¸ÞÀÏ(¿À´ÃÂÊ Äü¸Þ´º PruMail
----------------------------------------------------------------------------- */
function prumail01() {
	window.open( "http://www.prumail.co.kr/" );
}
/* -----------------------------------------------------------------------------
Function : lpsearch01()
Comment  : LP°Ë»ö(¿À´ÃÂÊ Äü¸Þ´º MYLP)
----------------------------------------------------------------------------- */
function lpsearch01() 
{
   //location.href = mylpLphomeGate+"/_common/gate.jsp?target=/lppage/lp_search_main.do" ;
	location.href = mylp_home +"/lppage/lp_search_main.do" ;

}
/* -----------------------------------------------------------------------------
Function : favorite01()
Comment  : º¸Çè»óÇ°(¿À´ÃÂÊ Äü¸Þ´º MYLP)
----------------------------------------------------------------------------- */
function favorite01() {
   location.href = "/products/main.do" ;
}
/* -----------------------------------------------------------------------------
Function : PHSetFlash( fls_id )
Comment  : ÇÃ·¡½¬ º¯°æÇÏ±â
----------------------------------------------------------------------------- */
function PHSetFlash( fls_id ){

}

/* -----------------------------------------------------------------------------
* Function : loc_href( url ){
* Comment  : ÆäÀÌÁö ¸µÅ©
* Param    : url - ÆäÀÌÁö ÁÖ¼Ò
----------------------------------------------------------------------------- */
function loc_href( url ){
    if(url.length>0)
        location.href = url ;
}

function pw_loc_href( url ){location.href = EncLocation(url);}

/* -----------------------------------------------------------------------------
Function : PHHO_link()
Comment  : »ó´ÜÀÇ ¸Þ´º
Param    : nm     - ¸Þ´ºÀÌ¸§
----------------------------------------------------------------------------- */
function PHHO_login_link( nm,url ){
    //alert(nm + " : " + url);
    location.href = "/common/login.do?login_url="+escape(url);
}

function PHHO_link( nm ){
    

    if(nm=='È¨')
        location.href = "/index.jsp";

//    else if(nm=='·Î±×ÀÎ')
//        location.href = "/common/login.do";
    
    else if(nm=='°í°´µî·Ï')
        location.href = "/common/member.do?method=goApply";
    else if(nm=='·Î±×¾Æ¿ô')
       location.href = "/common/logout.do";

    else if(nm=='°í°´Á¤º¸')
       location.href = "/mypage/info.do";
	   
    else if(nm=='ÀÌ¿ë¾È³»')
       location.href = "/customer/member_info.do";

    else if(nm=='pruservice')
        location.href = "/customer/email_intro.do";
        
    else if(nm=='»çÀÌÆ®¸Ê')
        location.href = "/customer/sitemap.do";
    
}

/* -----------------------------------------------------------------------------
Function : company()
Comment  : È¸»ç¼Ò°³
----------------------------------------------------------------------------- */
function company(){
	location.href = "/company/main.do";
}

// Çª¸£µ§¼È»ý¸í ¼Ò°³
function company_1(){
	location.href = "/company/philosophy.do";
}

// Life Planner ¼Ò°³
function company_2(){
	location.href = "/company/lp_intro.do";
}

// Çª¸£µ§¼È»ý¸í ´º½º
function company_3(){
	location.href = "/company/pru_notice_list.do";
}

// »çÈ¸°øÇå
function company_4(){
	location.href = "/company/society.do?method=main";
}

// Ã¤¿ë¾È³»
function company_5(){
	location.href = "/company/recruit_main.do";
}
/* -----------------------------------------------------------------------------
Function : products()
Comment  : º¸Çè»óÇ°
----------------------------------------------------------------------------- */
function products(){
	location.href = "/products/main.do";
}

// »óÇ°¾È³»
function products_1(){
	location.href = "/products/wlp_special.do";
}

// Æ¯¾à¾È³»
function products_2(){
	location.href = "/products/adbr_non.do";
}

// »óÇ°°ø½Ã½Ç
function products_3(){
	location.href = "/products/how.do";
}

// º¯¾×º¸Çè°ø½Ã½Ç
function products_4(){
	location.href = "/products/variable_description.do";
}

// º¸Çè°¡°Ýµ¿½Ã½Ç
function products_5(){
	location.href = "/products/contract.do";
}

// ºÎÇè°¡ÀÔ»ó´ã
function products_6(){
	location.href = "/products/join_info.do";
}
/* -----------------------------------------------------------------------------
Function : cybercenter()
Comment  : »çÀÌ¹ö¼¾ÅÍ
----------------------------------------------------------------------------- */
function cybercenter(){
	location.href = "/cybercenter/main.do";
}

// °è¾àÁ¶È¸ ¹× º¯°æ¼­ºñ½º
function cybercenter_1(){
    loc_href_check("/common/gate.jsp?param=1");
}

// ´ëÃâ¼­ºñ½º
function cybercenter_2(){
    loc_href_check("/common/gate.jsp?param=2");
}

// ÀÔÃâ±Ý¼­ºñ½º
function cybercenter_3(){
    loc_href_check("/common/gate.jsp?param=3");
}

// ÀÚµ¿ÀÌÃ¼¼­ºñ½º
function cybercenter_4(){
    loc_href_check("/common/gate.jsp?param=4");
}

// Áõ¸í¼­¹ß±Þ/º¸Çè°¡ÀÔÁõ¼­ Àç¹ßÇà
function cybercenter_5(){
    loc_href_check("/common/gate.jsp?param=5");
}

// º¸Çè±Ý Ã»±¸¾È³»
function cybercenter_6(){
    loc_href_check("/common/gate.jsp?param=6");
}
/* -----------------------------------------------------------------------------
Function : products()
Comment  : °í°´¹®ÀÇ
----------------------------------------------------------------------------- */
function customer(){
	location.href = "/customer/main.do";
}

// ÀÌ¿ë¾È³»
function customer_1(){
	location.href = "/customer/member_info.do";
}

// FAQs
function customer_2(){
	location.href = "/customer/faqs.do";
}

// °í°´»ó´ã
function customer_3(){
	location.href = "/customer/customer.do";
}


/* -----------------------------------------------------------------------------
Function : products()
Comment  : mypage
----------------------------------------------------------------------------- */
function mypage(){
	location.href = "/mypage/main.do";
}
/* 2006.4.16 ¾Èº´ÈÆ ¾Æ·¡ ¸µÅ©´Â ´Ù½Ã »ì¸±Áöµµ ¸ð¸§.
// °í°´µî·Ï
function mypage_1(){
	location.href = "/common/member.do?method=goApply";
}

// °í°´Á¤º¸º¯°æ
function mypage_2(){
	location.href = "/common/login.do";
}

// ÆÐ½º¿öµå°ü¸®
function mypage_3(){
	location.href = "/common/member.do?method=goFind";
}

// À¥È¸¿øÅ»Åð
function mypage_4(){
	location.href = "/common/login.do";
}
*/
// °í°´Á¤º¸
function mypage_1(){
	location.href = "/mypage/main.do";
}

// °í¾à»çÇ×¿ä¾à
function mypage_2(){
	location.href = "/mypage/main.do";
}

// e·¯ºê·¹ÅÍ
function mypage_3(){
	location.href = "/mypage/main.do";
}

// MyLP
function mypage_4(){
	location.href = "/mypage/main.do";
}
/* -----------------------------------------------------------------------------
Function : prumagazine()
Comment  : prumagazine
----------------------------------------------------------------------------- */
function prumagazine(){
	location.href = "/magazine/main.do";
}

/* -----------------------------------------------------------------------------
¸ÞÀÎÆäÀÌÁö
----------------------------------------------------------------------------- */
// LPÀÎÅÍºä
function main_lifeplanner_1() {
	location.href = mylp_home + "/lppage/lp_interview_list.do";
}
// Magic of Insurance
function main_lifeplanner_2() {
	location.href = "/company/magic_ins_top.do";
}
// LP°¡ ±â¾ïÇÏ´Â °í°´
function main_lifeplanner_3() {
	location.href = mylp_home + "/plaza/lp_remember_list.do";
}

// ¸ÞÀÎÆäÀÌÁö ÀÌº¥Æ® - »çº¸
function main_event_1() {
	location.href = "/company/pru_magazine.do";
}
// ¸ÞÀÎÆäÀÌÁö ÀÌº¥Æ® - ÀÚ³à¿¡°Ô ÆíÁöº¸³»±â
function main_event_2() {
    // °øÀÎÀÎÁõ ¹®Á¦ °ü°è·Î PruMain_main.jspÀÇ Æã¼ÇÀ» È£Ãâ
    main_event1();
}
/* -----------------------------------------------------------------------------
* Function : viewContents()
* Comment  : ³»¿ëº¸¿©ÁÖ±â
----------------------------------------------------------------------------- */
function viewContents(){
    var html = document.all.content ;

    if( document.all.content!=null && document.all.main!=null ){
        document.all.main.innerHTML    = document.all.content.innerHTML;
        document.all.content.innerHTML = "" ;
    }
}
/* -----------------------------------------------------------------------------
* Function : viewBanner()
* Comment  : ¹è³Êº¸¿©ÁÖ±â
----------------------------------------------------------------------------- */
function viewBanner(){

    if(document.all.banner!=null && window.bannerWindow==null){
        document.all.bannerHtml.innerHTML = document.all.banner.innerHTML ;
        document.all.banner.innerHTML = "" ;

    }else if( document.all.banner==null && window.bannerWindow!=null ){
        document.all.bannerHtml.innerHTML 
            = window.bannerWindow.document.all.banner.innerHTML ;

    }else if( document.all.banner!=null && window.bannerWindow!=null ){
        var str = "" ;

        str = document.all.banner.innerHTML  ;
        document.all.banner.innerHTML = "" ;

        document.all.bannerHtml.innerHTML 
            = str+ window.bannerWindow.document.all.banner.innerHTML ;

    }
}

/* -----------------------------------------------------------------------------
* Function : makeLocation()
* Comment  : À§Ä¡º¸¿©ÁÖ±â (location bar)
----------------------------------------------------------------------------- */
function makeLocation(){

    //ÆäÀÌÁö¿¡ LocationBar°ª¿¡ ³Ö±â
    if(document.all.LocationBar!=null){    
        var id      = Layout_MenuId.substring(4);
        var cnt     = id.length/2 ;
        var menustr = null ;        
        var depth1_url   = "" ;
        var depth1_menu  = "" ;
        menustr = " <img src='/img/common/bu_history01.gif' border='0' vspace='1'>" ;
        menustr+= " <a href='/index.jsp' class='history'>È¨</a>" ;
        
        if(Layout_MenuId.substring(6)==0){
            cnt-- ;
            id = Layout_MenuId.substring(4, 6);
        }

        if( Layout_MenuId.indexOf("PHCO")!=-1 ){
            depth1_url  = "/company/main.do" ;
            depth1_menu = "È¸»ç¼Ò°³" ;
        }else if( Layout_MenuId.indexOf("PHPR")!=-1 ){
            depth1_url  = "/products/main.do" ;
            depth1_menu = "º¸Çè»óÇ°" ;
        }else if( Layout_MenuId.indexOf("PHCC")!=-1 ){
            depth1_url  = "/cybercenter/main.do" ;
            depth1_menu = "»çÀÌ¹ö°í°´¼¾ÅÍ" ;
        }else if( Layout_MenuId.indexOf("PHCI")!=-1 ){
            depth1_url  = "/customer/main.do" ;
            depth1_menu = "°í°´¹®ÀÇ" ;
        }else if( Layout_MenuId.indexOf("PHMP")!=-1 ){
            depth1_url  = "/mypage/main.do" ;
            depth1_menu = "My Page" ;
        }else if( Layout_MenuId.indexOf("PHSM")!=-1 ){
            depth1_url  = "/customer/sitemap.do" ;
            depth1_menu = "»çÀÌÆ®¸Ê" ;
        }else if( Layout_MenuId.indexOf("PHSV")!=-1 ){
            depth1_url  = "#" ;
            depth1_menu = "PruService" ;
        }else if( Layout_MenuId.indexOf("PHMB")!=-1 ){
            depth1_url  = "/customer/sitemap.do" ;
            depth1_menu = "È¸¿ø" ;
        }

        //depth1¿¡´Â ¾ÆÀÌÄÜÀÌ ´Ù¸£´Ù.
        menustr+= " <img src='/img/common/bu_history02.gif' border='0' vspace='1'>" ;
        menustr+= " <a href='"+depth1_url+"' class='history'>"+depth1_menu+"</a>" ;        


        try{

            var list    = eval(Layout_MenuId.substring(0,6));
            var u       = "" ;//ÁÖ¼Ò
            var m       = "" ;//¸Þ´ºÀÌ¸§
            var index   = null ;

            for(var i=0 ; i<cnt ; i++){
                index = parseInt( id.substring( i*2 , (i+1)*2 ) );
                menustr += " <img src='/img/common/bu_history02.gif' border='0' vspace='1'>" ;

                //depth2Ç¥½ÃÇÏ°í ¸µÅ© °É¾îÁÙ ÁÖ¼Ò°¡ ¾ø´Ù¸é
                if( i==0 && list(0)[0].length==0){
                    u       = list(1)[0] ;//ÁÖ¼Ò    
                    m       = list(0)[1] ;//¸Þ´ºÀÌ¸§

                //depth2Ç¥½ÃÇÏ°í ¸µÅ© °É¾îÁÙ ÁÖ¼Ò°¡ ÀÖ´Ù¸é
                }else if( i==0 && list(0)[0].length!=0){
                    u       = list(0)[0] ;//ÁÖ¼Ò   
                    m       = list(0)[1] ;//¸Þ´ºÀÌ¸§

                }else {
                    u       = list(index)[0] ;//ÁÖ¼Ò   
                    m       = list(index)[1] ;//¸Þ´ºÀÌ¸§
                }
                
                //¸¶Áö¸· ¸Þ´ºÀÌ¸§¿¡´Â ¸µÅ©¸¦ °É¾îÁÖÁö ¾Ê´Â´Ù.
                if( i<(cnt-1) ){
                    menustr += " <a href='"+u+"' class='history'> " ;
                    menustr += m ;
                    menustr += "</a>" ;
                }else{
                    menustr += " <span class='history'>" ;
                    menustr += m ;
                    menustr += "</span>" ;
                }
            }
        }catch(e){
        }
        document.all.LocationBar.innerHTML = menustr ;
    }
}

