﻿
//================사이트번호에 따른 팝업================

function PopUp(Siteno)
{

    var ImgName;
    var ImgWidth;//팝업가로
    var ImgHeight;//팝업세로

    if( Siteno == '36' || Siteno == '3625' || Siteno == '3676' || Siteno == '3717' || Siteno == '3737' || Siteno == '3767' || Siteno == '3570' || Siteno == '3571' || Siteno == '3572' || Siteno == '3587' || Siteno == '3844' || Siteno == '3942'|| Siteno == '4022')
    {
        switch(Siteno)
        {
			case "36" ://hanwha
                ImgName = 'popup120209_sheraton';
                ImgWidth = "375";
                ImgHeight = "558";
                break;
            case "3625" ://kepco
                ImgName = 'p20110406_kepco';
                ImgWidth = "500";
                ImgHeight = "524";
                break;
			case "3676" ://knfc
                ImgName = 'p20110406_knfc';
                ImgWidth = "500";
                ImgHeight = "524";
                break;
			case "3717" ://komipo
                ImgName = 'p20110406_komipo';
                ImgWidth = "500";
                ImgHeight = "524";
                break;
			case "3737" ://ewp
                ImgName = 'p20110406_ewp';
                ImgWidth = "500";
                ImgHeight = "524";
                break;
			case "3767" ://khnp
                ImgName = 'p20110406_khnp';
                ImgWidth = "500";
                ImgHeight = "524";
                break;
            case "3570" ://hyundai2
            case "3571" ://hyundai3
            case "3572" ://hyundai4
            case "3587" ://hyundai5
                ImgName = 'p20110408_bp';
                ImgWidth = "500";
                ImgHeight = "524";
                break;
            case "3844" ://woongjin
                ImgName = 'popup_110511_wj';
                ImgWidth = "500";
                ImgHeight = "524";
                break;
            case "3942" ://khnp
            ImgName = 'popup_20120119';
            ImgWidth = "460";
            ImgHeight = "274";
                break;
            case "4022" ://jtbc
            ImgName = 'popup_120120';
            ImgWidth = "410";
            ImgHeight = "600";
                break;
		}

        Cookievalue2 = GetCookie(ImgName);
        if (Cookievalue2 == "")
        {
            tour2 = window.open("/Popup/ca/"+ImgName+".html",'event02',"top=0,left=0,width="+ImgWidth+",height="+ImgHeight+"");
            
            //한전계열 두번째 팝업
            if(Siteno == "3625" || Siteno == "3676" || Siteno == "3717" || Siteno == "3737" || Siteno == "3767")
            {
                ImgHeight = "396"; //세로
                ImgWidth = "383";  //가로
                ImgName = "popup111128_notice";   //파일이름
                tour2 = window.open("/Popup/ca/"+ImgName+".html",'event03',"top=0,left=520,width="+ImgWidth+",height="+ImgHeight+"");
            }
            
            if(tour2)
            {
                tour2.focus();
            }
        }
    }
}

function GetCookie(NameCookie)
{
    var i = document.cookie.indexOf(NameCookie + '=' );
    if (i != -1)
    {
            i += NameCookie.length + 1;
            NameEnd = document.cookie.indexOf(';', i);
            if (NameEnd == -1) {
              NameEnd = document.cookie.length;
            }
               return  unescape(document.cookie.substring(i, NameEnd));
	}
    else
    {
        return "";
    }
}


//===========사이트번호에 따른 메인플래시배너==============
var FlashImg;
function FlashBanner(Siteno)
{
    if(Siteno == '217')//한화리조트
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_217.swf';
    }
	else if( Siteno == '3511')//한화월드리조트
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_217.swf';
    }
    else if( Siteno == '138')//한미약품
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_217.swf';
    }
    else if( Siteno == '3925')//한미의약사협회
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_217.swf';
    }
	else if(Siteno == '3377')//H&D
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_2634.swf';
    }
    else if(Siteno == '2634')//네이버
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_2634.swf';
    }
    else if(Siteno == '3202')//hp
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_217.swf';
    }
    else if(Siteno == '3607')//유한양행
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_2634.swf';
    }
    else if( Siteno == '3625')//한국전력공사 kepco
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_3625.swf';
    }
    else if( Siteno == '3676')//한전원자력연료
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_3625.swf';
    }
	else if( Siteno == '3717')//한국중부발전 komipo
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_3625.swf';
    }
	else if( Siteno == '3737')//한국동서발전 ewp
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_3625.swf';
    }
	else if( Siteno == '3767')//한국수력원자력 khnp
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_3625.swf';
    }
	else if( Siteno == '3028')//갤러리아
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_217.swf';
    }
	else if( Siteno == '3844')//웅진홀딩스
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_3625.swf';
    }
    else//한화개발주(주),(주)한화갤러리아,(주)대한생명갤러리아
    {
        FlashImg='http://img.modetour.co.kr/Onlinebp/Template_01/swf/main_fla_36.swf';
    }
    return FlashImg;
}

//===============SPECIALPRODUCT 배너(공통배너)================
function SpecialBanner(Siteno)
{
    if(Siteno == '2634')//네이버
    {
        document.write('<a></a>');
    }
    else
    {
        document.write('<a href="/event/event_11/0829_jm/mode.aspx?mloc=07"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Cc_sp_best_100312.gif" alt="BEST product"></a>');
    }
}

//===============우측 이벤트 배너 4개짜리 Gu==1 위에두개 Gu==2 밑에 두개================
function RightEventBanner(Siteno,Gu)
{
    if(Siteno == "3202")//HP사이트
    {
        if(Gu  == "1")
        {
            document.write('<td class="tl"><a href="/event/event_09/0311_theme/mode.aspx?MLoc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_hotspring_3202.gif" alt="Weekend"></a></td>');
            document.write('<td class="tr"><a href="/event/event_08/0507_nighttour/mode.aspx?mloc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_night_3202.gif" alt="Night"></a></td>');
        }
        else
        {
            document.write('<td class="tl"><a href="/event/event_08/0507_family/mode.aspx?mloc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_family_3202.gif" alt="Family"></a></td>');
            document.write('<td class="tr"><a href="/event/event_11/0609_honeyfw/mode.aspx?mloc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_honeymoon_3202.gif" alt="HoneyMoon"></a></td>');
        }
    }
    else if(Siteno =="2634")//네이버여행(NHN)
    {
        if(Gu  == "1")
        {
            document.write('<td class="tl"><a href="/warehouse/info/pack/network/eurail_pass.aspx?MLoc=05040803"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_pass.gif" alt="pass"></a></td>');
            document.write('<td class="tr"><a href="/event/event_08/0507_nighttour/mode.aspx?mloc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_night.gif" alt="Night"></a></td>');
        }
        else
        {
            document.write('<td class="tl"><a href="/event/event_08/0507_family/mode.aspx?mloc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_family.gif" alt="Family"></a></td>');
            document.write('<td class="tr"><a href="/event/event_10/0115_pac/mode.aspx?mloc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_honeymoon.gif" alt="HoneyMoon"></a></td>');
        }
    }
    else//그외
    {
        if(Gu  == "1")
        {
            document.write('<td class="tl"><a href="/event/event_09/0311_theme/mode.aspx?MLoc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_hotspring.gif" alt="Weekend"></a></td>');
            document.write('<td class="tr"><a href="/event/event_08/0507_nighttour/mode.aspx?mloc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_night.gif" alt="Night"></a></td>');
        }
        else
        {
            document.write('<td class="tl"><a href="/event/event_08/0507_family/mode.aspx?mloc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_family.gif" alt="Family"></a></td>');
            document.write('<td class="tr"><a href="/event/event_11/0609_honeyfw/mode.aspx?mloc=0701"><img src="http://img.modetour.co.kr/Onlinebp/Template_01/banner/Bbb_honeymoon.gif" alt="HoneyMoon"></a></td>');
        }
    }
}
