/* 2011-02-07 flash update */
// main quickEvent
function quickEvent(num){
	var r_url = "";
	var tgt = "";
	if (num == 0){
		r_url = "http://211.59.8.170:9098/event/20110131/index.asp";
		tgt = "_blank";
	}else if (num == 1){
		//document.location.href="/event/event_view.asp?flag=ing&seq=122";		
		//r_url = "http://cornfrost.kellogg.co.kr/confrost/confrost.asp";
		r_url = "http://cornfrost.kellogg.co.kr/event/20111130/index.asp";
		tgt = "_blank";
	}else if (num == 2){
		document.location.href="/event/event_view.asp?flag=ing&seq=125";
	}

	if (tgt != ""){
		window.open(r_url);
	}else{
		if (r_url != "") document.location.href =  r_url;
	}	
}
// main quickFamily
function quickFamily(num){
	if (num == 1){
		document.location.href = "/life/family_list.asp";
	}
	/* 2011-11-01 dbÀÌÀü */
	if (num == 2){
		document.location.href = "/customer/privacy_agreement.asp";
	}
	/* // 2011-11-01 dbÀÌÀü */
}
//main visual
function goEvent(num){
	if (num == 1){
		document.location.href="/event/event_view.asp?flag=ing&seq=125";
	}if (num == 2){
		//document.location.href="/event/event_view.asp?flag=ing&seq=122";
		quickEvent(1);
	}
	/*
	if (num == 1){
		quickEvent(0,"_blank");
	}else if(num == 2){
		hiddenfrm.document.location.href="/include/tracking_proc.asp?st=0&ad=mainflash&ty=cx110304";
		document.location.href="/event/event_view.asp?flag=ing&seq=115";
	}
	*/
}

// main newProduct
function newProduct(num){
	var tgt = "";
	if (num == 1){
		r_url = "http://specialk.kellogg.co.kr/index.asp";
		//r_url = "http://grainstory.kellogg.co.kr/";
		tgt = "_blank";
	}else if (num == 2){
		r_url = "http://grainstory.kellogg.co.kr/";
		tgt = "_blank";
	}else if (num == 3){
		r_url = "http://specialk.kellogg.co.kr/re_story/red_crunch.asp";
		tgt = "_blank";
	}

	if (tgt != ""){
		window.open(r_url);
	}else{
		if (r_url != "") document.location.href =  r_url;
	}	
}

function getProduct(num){
	var r_url = {
		1 : "http://www.chex.co.kr/product/product_02.asp",		//chex
		2 : "http://www.chex.co.kr/product/product_03.asp",		//chex
		3 : "http://www.chex.co.kr/product/product_01.asp",		//chex
		4 : "http://cornfrost.kellogg.co.kr/confrost/confrost.asp",		//cornfrost
		5 : "http://cornfrost.kellogg.co.kr/confrost/confrost.asp",		//cornfrost
		6 : "http://cornfrost.kellogg.co.kr/confrost/confrost.asp",		//cornfrost
		7 : "http://grainstory.kellogg.co.kr/",							//grainstory
		8 : "http://grainstory.kellogg.co.kr/",							//grainstory
		9 : "http://grainstory.kellogg.co.kr/",							//grainstory
		10 : "http://grainstory.kellogg.co.kr/",						//grainstory
		11 : "http://grainstory.kellogg.co.kr/",						//grainstory
		12 : "http://grainstory.kellogg.co.kr/",						//grainstory
		13 : "http://specialk.kellogg.co.kr/re_story/info.asp",			//special K
		14 : "http://crunchynut.kellogg.co.kr/",						//crunchynut
		15 : "http://crunchynut.kellogg.co.kr/",						//crunchynut
		16 : "http://www.kellogg.co.kr/product/cornflakes/product.asp",	//cornflakes
		17 : "http://www.kellogg.co.kr/product/frootring/product.asp",	//frootring
		18 : "http://www.kellogg.co.kr/product/cocopops/product.asp",	//cocopops
		19 : "http://specialk.kellogg.co.kr/re_story/red_crunch.asp"	//special K radcrunch
	}
	//alert(r_url[num]);
	window.open(r_url[num]);
}

function GlobalLink(num){
	var fnc=true;
	var r_url = {
		menu01 : "/company/principle.asp",			// ÄÌ·Î±× ¼Ò°³
		menu0101 : "/company/principle.asp",		// ±â¾÷ÀÌ³ä
		menu0102 : "/company/companyinfo.asp",		// È¸»ç °³¿ä
		menu0103 : "/company/history.asp",			// È¸»ç ¿¬Çõ
		menu0104 : "/company/recruit.asp",			// ÀÎÀç Ã¤¿ë
		menu010401 : "/company/welfare.asp",		// º¹¸®ÈÄ»ý
		menu010402 : "/company/organization.asp",	// ºÎ¼­¼Ò°³
		menu010403 : "/company/recruit.asp",		// Ã¤¿ë°ø°í
		menu0105 : "/company/process.asp",			// Á¦Á¶°øÁ¤
		menu0106 : "/company/location.asp",			// ¿À½Ã´Â ±æ
		
		menu02 : "/products/serial.asp",			// ÄÌ·Î±× Á¦Ç°
		menu0201 : "/products/serial.asp",			// ½Ã¸®¾ó
		menu0202 : "/products/healthsnack.asp",		// °Ç°­½º³Ø
		
		menu03 : "/life/tip_list.asp",				// ÄÌ·Î±× ¶óÀÌÇÁ
		menu0301 : "/life/tip_list.asp",			// ÄÌ·Î±× »ýÈ° Tip
		menu0302 : "/life/family_list.asp",			// ÄÌ·Î±× ÆÐ¹Ð¸®

		menu04 : "/playground/gameroom.asp",		// ÄÌ·Î±× ³îÀÌÅÍ
		menu0401 : "javascript:GamePop('Summer');",
		menu0402 : "javascript:GamePop('block');",
		menu0403 : "javascript:GamePop('bomb');",
		menu0404 : "javascript:GamePop('puzzle');",
		menu0405 : "javascript:GamePop('star');",
		
		/*
		menu05 : "/event/wishball.asp",				// ÀÌº¥Æ®
		menu0501 : "/event/wishball.asp",			// À§½Ãº¼ ÀÌº¥Æ®
		*/
		menu05 : "/event/event.asp?flag=ing",				// ÀÌº¥Æ®
		menu0501 : "javascript:void(window.open('/event/wishball_popup.asp','wishball','toolbar=no,scrollbars=yes,width=810,height=1100'));",			// À§½Ãº¼ ÀÌº¥Æ®

		menu0502 : "/event/event.asp?flag=ing",		// ÁøÇàÁßÀÎ ÀÌº¥Æ®
		menu0503 : "/event/event.asp?flag=end",		// Áö³­ ÀÌº¥Æ®
		menu0504 : "/event/event_prize.asp",		// ´çÃ·ÀÚ ¹ßÇ¥
		
		menu06 : "/member/member_login.asp",		// ·Î±×ÀÎ
		menu0601 : "/member/member_login.asp",		// ·Î±×ÀÎ
		menu0602 : "/member/member_contract.asp",	// È¸¿ø°¡ÀÔ
		menu0603 : "/member/member_idpwfind.asp",	// ID PW Ã£±â
		menu0604 : "/member/member_modify.asp",		// È¸¿ø°¡ÀÔ¼öÁ¤
		menu0605 : "/member/member_joinout.asp",	// È¸¿øÅ»Åð
		
		menu07 : "/customer/notice_list.asp",
		menu0701 : "/customer/notice_list.asp",
		menu0702 : "/customer/qna.asp",
		menu0703 : "/customer/privacy.asp",
		menu0704 : "/customer/agreement.asp",
		menu0706 : "/customer/privacy_agreement.asp",	// 2011-10-28 ¾à°üµ¿ÀÇ Ãß°¡
		menu0705 : "/customer/sitemap.asp",
		
		menu08 : "/nutrition/nutrition01.asp",
		menu0801 : "/nutrition/nutrition01.asp",
		menu0802 : "/nutrition/nutrition02.asp",
		menu0803 : "/nutrition/nutrition03.asp",
		menu0804 : "/nutrition/nutrition04.asp",
		menu0805 : "/nutrition/nutrition05.asp"
	}
	document.location.href = r_url[num];
}

// sub quick banner
function evt_quick(num){
	if (num == 1){
		GlobalLink("menu0801");
	}
	if (num == 2){
		window.open('/event/evt1006_toystory/pop_cuu.asp','UCC','toolbar=no,scrollbars=no,menubar=no,width=400,height=430');
	}
	if (num == 3){		
		quickEvent(2);
	}
	if (num == 4){
		quickEvent(1);
		//quickEvent(0,'_blank');		
	}
	if (num == 5){
		/*
		hiddenfrm.document.location.href="/include/tracking_proc.asp?st=0&ad=leftbanner&ty=cx110304";
		document.location.href="/event/event_view.asp?flag=ing&seq=117";
		*/
	}
}

/* // 2011-02-07 flash update */


//Kellogg 
function main() { //Kellogg
	document.location.href="/index.asp"; }


function kgLogout (){
	document.location.href="/member/flashLogout.asp"; 
}

function kgReload (){
	document.location.reload();
}

function join() { //È¸¿ø°¡ÀÔ
	GlobalLink("menu0602");
}
function idpw() { //ID/PW Ã£±â
	GlobalLink("menu0603");
}
function infor() { //È¸¿øÁ¤º¸¼öÁ¤
	GlobalLink("menu0604");
}
//¸ÞÀÎ Á¦Ç°
document.write('<span id="cornflake1" href="#"></span>');
function getProduct0() {//ÄÜÇª·¹ÀÌÅ©
	//window.open('');
	//alert('ÄÜÇª·¹ÀÌÅ©');
	var popobj = document.getElementById("cornflake1");
	popobj.href = "/products/layerpopup.asp?pop=cornflake";
	hs.htmlExpand(popobj, { objectType: 'ajax', outlineType : null, align: 'center', preserveContent: false, width:488, height:965} );
}

