﻿function topNaviOut() {
	$("#header").css({
		"overflow": "hidden"
	});
    $("#topNavi").css({
        "position": "static"
    });
}
function topNaviOver() {
	$("#header").css({
		"overflow": "visible"
	});
    $("#topNavi").css({
        "position" : "absolute"
    });
}

function main() {
    location.href = "/main/";
}

function goProduct() {
    location.href = '/yoplait_introduce/product/product.asp';
}

function GoProduct() {
    location.href = '/yoplait_introduce/product/product.asp';
}

function goBrand() {
    location.href = '/yoplait_introduce/product/';
}

function yoNews() {
    location.href = '/yoplait_introduce/news/list.asp';
}

function popPlayer() {
    location.href = '/yoplait_introduce/product/?category=cf';
}

function newYoplait() {
    location.href = '/yoplait_introduce/product/product.asp?num=9';
}

function yoplady() {
    //location.href = 'http://www.yoplady.com/';
    window.open("http://www.yoplady.com/", "", "");
}
/* 로그인 문제로 메인과 헤더로 옴김
function goUtilMenu(index) {
    switch (index) {
        case 1:
            location.href = "/yo_members/login/login.asp?referer=" + document.URL;
            break;
        case 2:
            window.open("https://member.bing.co.kr/","","status=0, toolbar=0, menubar=0, width=713, height=850 ");
            break;
        case 3:
            location.href = "/my_yoplait/";
            break;
        case 4:
            location.href = "/yo_members/login/logout_ok.asp";
            break;
        case 5:
            window.open("https://voc.bing.co.kr:442/pop_qna.asp?QNA_SITE=요플레", "", "status=0, toolbar=0, menubar=0");
            break;
        case 6:
            location.href = "/yoplait_introduce/news/list.asp";
            break;
    }
}
*/

function brandInt(index) {
    switch (index) {
        case 1:
            $("#contentFlashWrap".empty()).html(
                flashWrite3("/flash/brandBiCon.swf", "675", "404", "Transparent", "Transparent", "contentFlash", "/flash/")
            );
            break;
        case 2:
            $("#contentFlashWrap").empty().html(
                flashWrite3("/flash/brandHistory.swf", "675", "404", "Transparent", "Transparent", "contentFlash", "/flash/")
            );
            break;
        case 3:
			$("#contentFlashWrap").empty();
			$.ajax({
				type: 'GET'
				, url: '/yoplait_introduce/product/cf_list.asp'
				, data: ''
				, cache: false
				, success: function(html) {
					$("#contentFlashWrap").html(html);
				}
			});
            break;
        case 4:
			$("#contentFlashWrap").empty();
			$.ajax({
				type: 'GET'
				, url: '/yoplait_introduce/product/news_list.asp'
				, data: ''
				, cache: false
				, success: function(html) {
					$("#contentFlashWrap").html(html);
				}
			});
            break;
    }
}

//function productView() 제품소개 페이지에 정의됨

//function goList() 제품소개 페이지에 정의됨
    


function menu(d1, d2) {
    if (d1 == 1) {
        if (d2 == null) {
            location.href = "/yoplait_introduce/";
        }
        else if (d2 == 1) {
            location.href = "/yoplait_introduce/";
        }
        else if (d2 == 2) {
            location.href = "/yoplait_introduce/news/list.asp";
        }
    }

    else if (d1 == 2) {
        if (d2 == null) {
            location.href = "/yo_kitchen/";
        }
        else if (d2 == 1) {
            location.href = "/yo_kitchen/recipe/list.asp";
        }
        else if (d2 == 2) {
        location.href = "/yo_kitchen/kitchen/list.asp";
        }
        else if (d2 == 3) {
            location.href = "/yo_kitchen/quiz/list.asp";
        }
        else if (d2 == 4) {
        location.href = "/yo_kitchen/scrap/list.asp";
        }
    }

    else if (d1 == 3) {
		/*
        if (d2 == null) {
            //location.href = "/yo_cooking_class/";
			goAlert();
        }
        else if (d2 == 1) {
            //location.href = "/yo_cooking_class/guide/guide.asp";
			goAlert();
        }
        else if (d2 == 2) {
        //location.href = "/yo_cooking_class/review/view.asp?seq=22";
            //location.href = "/yo_cooking_class/review/view.asp";
			goAlert();
        }
        else if (d2 == 3) {
        //location.href = "/yo_cooking_class/recipe/view.asp?seq=13";
            //location.href = "/yo_cooking_class/recipe/view.asp";
			goAlert();
        }
        else if (d2 == 4) {
			//location.href = "/yo_cooking_class/postscript/list.asp";
			goAlert();
        }
		*/
		if(d2 == null || d2 == 1 || d2 == 2 || d2 == 3 || d2 == 4){
			goAlert();
		}
    }

    else if (d1 == 4) {

       if (d2 == null) {
            location.href = "/yo_plady/";
        }   
        else if (d2 == 1) {
            location.href = "/yo_plady/introduct/introduction.asp";
        }
        else if (d2 == 2) {
            location.href = "/yo_plady/challenge/challenge_main.asp";
        }
        else if (d2 == 3) {
            location.href = "/yo_plady/old_active/old_action.asp";
        }
    }

    else if (d1 == 5) {
        if (d2 == null) {
            location.href = "/yo_event/";
        }
        else if (d2 == 1) {
            location.href = "/yo_event/ongoing/list.asp";
        }
        else if (d2 == 2) {
            location.href = "/yo_event/past/list.asp";
        }
        else if (d2 == 3) {
            location.href = "/yo_event/winner/list.asp";
        }
    }

    else if (d1 == 6) {
        if (d2 == null) {
            location.href = "/yo_members/";
        }
        else if (d2 == 1) {
            location.href = "/yo_members/login/login.asp?referer=" + document.URL;
        }
        else if (d2 == 2) {
        location.href = "/sso/Brand_Member_Search.asp?target=search&referer=http://www.yoplait.co.kr/yo_members/login/login.asp";  
        //window.open("/sso/ssoGate.asp?target=search&referer=", "", "status=0, toolbar=0, menubar=0");
        }
        else if (d2 == 3) {
        window.open("https://member.bing.co.kr/", "", "status=0, toolbar=0, menubar=0, width=713, height=850");
        }
        else if (d2 == 4) {
            location.href = "/yo_members/policy/";
        }
        else if (d2 == 5) {
            location.href = "/yo_members/terms/";
        }
    }

    else if (d1 == 7) {
        if (d2 == null) {
            location.href = "/my_yoplait/";
        }
        else if (d2 == 1) {
        window.open("/sso/Brand_Member_Modify.asp?target=myinfo&referer=", "", "status=0, toolbar=0, menubar=0");
        }
        else if (d2 == 2) {
        location.href = "/my_yoplait/event/list.asp";
        }
        else if (d2 == 3) {
        location.href = "/my_yoplait/scrap/list.asp";
        }
        else if (d2 == 4) {
        //window.open("/sso/popup.asp", "", "status=0, toolbar=0, menubar=0, width=713, height=850 ");
            location.href = "/my_yoplait/qna/"
        }
        else if (d2 == 5) {
        window.open("/sso/ssoGate.asp?target=out&referer=", "", "status=0, toolbar=0, menubar=0");
        }
    }
}

function footer(index) {
    switch (index) {
        case 1:
            location.href = "/yo_members/policy/";
            break;
        case 2:
            location.href = "/yo_members/terms/";
            break;
        case 3:
            window.open("http://new.sstrust.net/cgi-bin/cert-seal4?code=00799a0374e5abdc4a12b8186c73b3", "", "status=0, toolbar=0,, menubar=0, width=531, height=840");
            break;
        case 4:
            //window.open("/sso/popup.asp", "", "status=0, toolbar=0, menubar=0, width=713, height=850 ");
            location.href = "/my_yoplait/qna/";
            break;
    }
}

function family(index) {
    switch (index) {
        case 1:
            //blankForm.referer.value = "http://www.bing.co.kr";
            window.open("/sso/Brand_Member_SessionKeep.asp?referer=http://www.bing.co.kr"); //통합로그인 문제 때문에 나중에 작업
            break;
        case 2:
            //blankForm.referer.value = "http://www.metacone.co.kr";
            window.open("/sso/Brand_Member_SessionKeep.asp?referer=http://www.metacone.co.kr/");
            break;
        case 3:
            //blankForm.referer.value = "http://www.summercrush.co.kr";
            window.open("/sso/Brand_Member_SessionKeep.asp?referer=http://www.summercrush.co.kr/index.asp");
            break;
        case 4:
            //blankForm.referer.value = "http://www.bingba.co.kr";	
            window.open("/sso/Brand_Member_SessionKeep.asp?referer=http://www.bingba.co.kr/2009/main.asp");
            break;
        case 5:
            window.open("http://www.cledor.co.kr/");
            break;
        case 6:
            window.open("http://www.mypapa.co.kr/");
            //window.open("/sso/Brand_Member_SessionKeep.asp?referer=http://www.mypapa.co.kr/");
            break;
        case 7:
            window.open("http://www.acafela.co.kr/v2_index.asp");
            break;
        case 8:
            //blankForm.referer.value = "http://www.yomamte.co.kr";	
            window.open("/sso/Brand_Member_SessionKeep.asp?referer=http://www.yomamte.co.kr/");
            break;
        case 9:
            //blankForm.referer.value = "http://www.yomamte.co.kr";
            //window.open("/sso/Brand_Member_SessionKeep.asp?referer=http://www.icemelona.com/main.asp");
            window.open("http://www.icemelona.com/main.asp");
            break;
        blankForm.action = "https://member.bing.co.kr/sso/ssoLoginProcess.asp";
        blankForm.submit();	
    }
}

/* 팝업 플레이어 용 */
function playerStop() {
    hideLayerPopup("layerPopupWrap");
}

function goCF(num) {
    locaton.href = '/yoplait_introduce/product/?category=cf';
}


function goAlert() {
		alert('보다 나은 서비스를 \r\n제공해 드리기위해 준비중에 있습니다.\r\n조금만 기다려 주세요.^^');
}
