//menu( "국가코드",활성화 코드값 )
//국가별 페이지 일 경우
//document.location.href = "/" + country + "/국가폴더 이하 경로";
function menu(country,dep1,dep2){
	if (dep1 == 1){//AD STARS
		document.location.href = "/" + country + "/adstars/adstars.asp";
		if(dep2 == 1){//What is AD STARS
			document.location.href = "/" + country + "/adstars/adstars.asp";
		}else if(dep2 == 2){//Greetings
			document.location.href = "/" + country + "/adstars/greetings.asp";
		}else if(dep2 == 3){//Contact us
			document.location.href = "/" + country + "/adstars/contactus.asp";
		}
	}else if (dep1 == 2){//Festival 2010
		document.location.href = "/festival/festival.asp";
		if(dep2 == 1){//Festival at a glance
			document.location.href = "/festival/festival.asp";
		}else if(dep2 == 2){//Seminars
			document.location.href = "/festival/seminar.asp";
		}else if(dep2 == 3){//Beach AD Night
			document.location.href = "/festival/beach_adnight.asp";
			//alert('Beach AD Night');
		}else if(dep2 == 4){//Exhibition
			document.location.href = "/festival/pictures.asp";
			//alert('Exhibition');
		}else if(dep2 == 5){//Venue
			//document.location.href = "";
			alert('Venue');
		}
	}else if (dep1 == 3){//Judges 2010
		document.location.href = "/judges/online.asp";
		if(dep2 == 1){//Preliminary Judges
			document.location.href = "/judges/online.asp";
		}else if(dep2 == 2){//Final Judges
			document.location.href = "/judges/offline.asp";
		}
	}else if (dep1 == 4){//Entries 2010
		document.location.href = "/entries/hotlive.asp";
		if(dep2 == 1){//Enter Now
			document.location.href = "/entries/hotlive.asp";
		}else if(dep2 == 2){//How to Enter
			document.location.href = "/entries/enter_now.asp";
		}else if(dep2 == 3){//Categories
			document.location.href = "/entries/howtoenter.asp";
		}else if(dep2 == 4){//Rules & Regulations
			document.location.href = "/entries/category.asp";
		}else if(dep2 == 5){//Weekly Hot
			document.location.href = "/entries/rules.asp";
		}else if(dep2 == 6){//Finalists 
			document.location.href = "/entries/finalists.asp";
			//alert('Entry FAQ /Q&A');
		}
	}else if (dep1 == 5){//Young Stars 2010
		document.location.href = "/" + country + "/youngstars/youngstars.asp";
		if(dep2 == 1){//Resister Now
			document.location.href = "/" + country + "/youngstars/youngstars.asp";
		}else if(dep2 == 2){//Registration Package
			document.location.href = "/" + country + "/youngstars/youngstar_info.asp";
			//alert('Coming Soon');
		}else if(dep2 == 3){//Where to eat
			document.location.href = "/" + country + "/youngstars/youngstar_apply.asp";
			//alert('Coming Soon');
		}else if(dep2 == 4){//Where to go
			document.location.href = "/" + country + "/youngstars/internship_program.asp";
			//alert('Coming Soon');
		}else if(dep2 == 5){//Where to stay & how to  get  around
			document.location.href = "/" + country + "/youngstars/youngstar_faq.asp";
			//alert('Coming Soon');
		}
	}else if (dep1 == 6){//Delegates 2010
		document.location.href = "/delegates/package.asp";
		if(dep2 == 1){//Registration Package
			document.location.href = "/delegates/package.asp";
			//alert('Resister Now');
		}else if(dep2 == 2){//Restaurant & Bar
			document.location.href = "/package/restaurant_bar.asp";
			//alert('Registration Package');
		}else if(dep2 == 3){//Venue Information
			document.location.href = "/package/venue_information.asp";
			//alert('Where to eat');
		}else if(dep2 == 4){//Tour  Information
			document.location.href = "/package/tour_information.asp";
		}else if(dep2 == 5){//Where to stay & how to  get  around
			//document.location.href = "";
			alert('Where to stay & how to  get  around');
		}
	}else if (dep1 == 7){//PR Room
		document.location.href = "/prroom/news.asp";
		if(dep2 == 1){//News & notice
			document.location.href = "/prroom/news.asp";
		}else if(dep2 == 2){//Press release
			document.location.href = "/prroom/press.asp";
		}else if(dep2 == 3){//e-News letter
			document.location.href = "/prroom/Newsletter.asp";
		}else if(dep2 == 4){//Downloads
			document.location.href = "/" + country + "/prroom/download.asp";
		}
	}else if (dep1 == 8){//Archive
		document.location.href = "/archive/archive.asp?y=2010";
		if(dep2 == 1){//AD STARS 2010
			document.location.href = "/archive/archive.asp?y=2010";
		}else if(dep2 == 2){//AD STARS 2009
			document.location.href = "/archive/archive.asp?y=2009";
		}else if(dep2 == 3){//AD STARS 2008
			document.location.href = "/archive/archive.asp?y=2008";
		}
	}else if (dep1 == 9){//Support
		document.location.href = "/Volunteer/sponsorship.asp";
		if(dep2 == 1){//Representatives
			//document.location.href = "";
			alert('Representatives');
		}else if(dep2 == 2){//Sponsorship
			document.location.href = "/Volunteer/sponsorship.asp";
		}else if(dep2 == 3){//Volunteer
			document.location.href = "/Volunteer/info.asp";
			//alert('Coming Soon');
		}else if(dep2 == 4){//FAQ
			document.location.href = "/" + country + "/support/faq.asp";
		}
	}else if (dep1 == 10){//AD Stars Store
		document.location.href = "/" + country + "/store/annual.asp";
		if(dep2 == 1){//Awards Annual
			document.location.href = "/" + country + "/store/annual.asp";
		}else if(dep2 == 2){//Trophies
			//document.location.href = "";
			alert('Trophies');
		}
	}else if (dep1 == 11){//event
		document.location.href = "/event/adis.asp";
		if(dep2 == 1){//Awards Annual
			document.location.href = "/event/adis.asp";
		}else if(dep2 == 2){//Trophies
			document.location.href = "/event/iam.asp";
		}
	}
}

//goUtilMenu("국가코드",1~8);
//1.Sign in
//2.Join Us
//3.Find account
//4.Sign out
//5.My page
//6.Sitemap

function goUtilMenu(country,menu){
	if(menu == 1){
		document.location.href = "/member/signin.asp";
	}else if(menu == 2){
		document.location.href = "/member/join.asp";
	}else if(menu == 3){
		document.location.href = "/member/find_account.asp";
	}else if(menu == 4){
		document.location.href = "/member/signinProc.asp?mode=OUT";
	}else if(menu == 5){
		document.location.href = "/member/mypage_mydetail.asp";
	}else if(menu == 6){
		document.location.href = "/etc/sitemap.asp";
	}else if(menu == 7){
		document.location.href = "/";
	}
	
}

//footerBt("국가코드",1~8);
//1.문화체육관광부
//2.부산광역시
//3.kobaco
//4.KFAA
//5.KAA
//6.한국광고협의회
//7.부산상공회의소
//8.(이건뭥미..??)

function footerBt(country,menu){
	if(menu == 1){
		//alert("문화체육관광부");
		window.open("http://www.mcst.go.kr");
	}else if(menu == 2){
		//alert("부산광역시");
		window.open("http://www.busan.go.kr/");
	}else if(menu == 3){
		//alert("kobaco");
		window.open("http://www.kobaco.co.kr/");
	}else if(menu == 4){
		//alert("KFAA");
		window.open("http://www.kfaa.org/");
	}else if(menu == 5){
		//alert("KAA");
		window.open("http://www.kaa.or.kr/");
	}else if(menu == 6){
		//alert("한국광고협의회");
		window.open("http://www.kaaa.co.kr/");
	}else if(menu == 7){
		//alert("부산상공회의소");
		window.open("http://www.pcci.or.kr/");
	}else if(menu == 8){
		//alert("(이건뭥미..??)");
		window.open("http://ciaf.cnadtop.com/english/");
	}
}

//policy("국가코드",1~2);
//1.privacy
//2.legal

function policy(country,menu){
	if(menu == 1){
		//alert("privacy");
	}else if(menu == 2){
		//alert("legal");
	}
}

//mainBt("국가코드",1~8);
//1.Enter Now
//2.How to enter
//3.Categories
//4.Rules

function mainBt(country,menu){
	if(menu == 1){
		document.location.href = "/entries/enter_now.asp";
	}else if(menu == 2){
		document.location.href = "/entries/howtoenter.asp";
	}else if(menu == 3){
		document.location.href = "/entries/category.asp";
	}else if(menu == 4){
		document.location.href = "/entries/rules.asp";
	}
}

//goLeftUtil("국가코드",1~3)
//1.ENTER NOW
//2.HOW TO ENTRY
//3.FESTIVAL PROGRAM

function goLeftUtil(country,menu){
	if(menu == 1){
		document.location.href = "/entries/enter_now.asp";
	}else if(menu == 2){
		document.location.href = "/entries/howtoenter.asp";
	}else if(menu == 3){
		//alert("FESTIVAL PROGRAM");
		document.location.href = "/" + country + "/festival/festival.asp";
	}
}

//lang("국가코드",1~8);
//1.한국어
//2.English
//3.日本語
//4.中文
//5.español

function lang(country,menu){
	var pathname = location.pathname;
	pathname = pathname.substring(3, pathname.length);

	var before_lang = GetCookie("lang");
	var langMsg = "";

	if (before_lang == "ko"){
		langMsg = "지금 언어를바꾸시면 등록하신 정보가 삭제됩니다. 언어를 바꾸시겠습니까?";
	}else{
		langMsg = "If you switch languages, registered information will be deleted. Would you like to change the language?";
	}

	if(menu == 1){
		if(country != "ko"){
			SetCookie_noexpires("lang","ko");
			//document.location.href = "/";

			if(pathname.substring(0, 7) == "legates") {
				if(confirm(langMsg)) {
					document.location.replace("/delegates/package.asp");
				}else{
					SetCookie_noexpires("lang",before_lang);
					return;
				}
			} else if(pathname.substring(0, 1) != "/") {
				document.location.replace(window.document.URL);
			} else {
				document.location.replace("/ko" + pathname);
			}
		}
	}else if(menu == 2){
		if(country != "en"){
			SetCookie_noexpires("lang","en");
			//document.location.href = "/";
			if(pathname.substring(0, 7) == "legates") {
				if(confirm(langMsg)) {
					document.location.replace("/delegates/package.asp");
				}else{
					SetCookie_noexpires("lang",before_lang);
					return;
				}
			} else if(pathname.substring(0, 1) != "/") {
				document.location.replace(window.document.URL);
			} else {
				document.location.replace("/en" + pathname);
			}
		}
	}else if(menu == 3){
		if(country != "jp"){
			SetCookie_noexpires("lang","jp");
			//document.location.href = "/";
			if(pathname.substring(0, 7) == "legates") {
				if(confirm(langMsg)) {
					document.location.replace("/delegates/package.asp");
				}else{
					SetCookie_noexpires("lang",before_lang);
					return;
				}
			} else if(pathname.substring(0, 1) != "/") {
				document.location.replace(window.document.URL);
			} else {
				document.location.replace("/jp" + pathname);
			}
		}
	}else if(menu == 4){
		if(country != "cn"){
			SetCookie_noexpires("lang","cn");
			//document.location.href = "/";
			if(pathname.substring(0, 7) == "legates") {
				if(confirm(langMsg)) {
					document.location.replace("/delegates/package.asp");
				}else{
					SetCookie_noexpires("lang",before_lang);
					return;
				}
			} else if(pathname.substring(0, 1) != "/") {
				document.location.replace(window.document.URL);
			} else {
				document.location.replace("/cn" + pathname);
			}
		}
	}else if(menu == 5){
		if(country != "es"){
			SetCookie_noexpires("lang","es");
			//document.location.href = "/";
			if(pathname.substring(0, 7) == "legates") {
				if(confirm(langMsg)) {
					document.location.replace("/delegates/package.asp");
				}else{
					SetCookie_noexpires("lang",before_lang);
					return;
				}
			} else if(pathname.substring(0, 1) != "/") {
				document.location.replace(window.document.URL);
			} else {
				document.location.replace("/es" + pathname);
			}
		}
	}
}

function main(){
	document.location.href = "/";
}

function coc(country,menu){
	//document.location.href = "/entries/category.asp";
	window.open('/entries/category.asp?#craft','','');
}

function goJudge2010(n, gubun){
	var onlineList = document.getElementById("onlineList");
	var online_list = document.getElementById("online_list");
	var changeSwf = "";
	var changeVal = "";

	if(gubun == true){
		switch(n){
			case 1 :
				changeSwf = "/flash/ko/online_list01.swf";
				changeVal = "selected=1&xmlPath=/include/list1.asp";
				break;
			case 2 :
				changeSwf = "/flash/ko/online_list02.swf";
				changeVal = "selected=2&xmlPath=/include/list2.asp";
				break;
			case 3 :
				changeSwf = "/flash/ko/online_list03.swf";
				changeVal = "selected=3&xmlPath=/include/list3.asp";
				break;
			case 4 :
				changeSwf = "/flash/ko/online_list04.swf";
				changeVal = "selected=4&xmlPath=/include/list4.asp";
				break;
			case 5 :
//				alert("Coming Soon!!!");
				changeSwf = "/flash/ko/online_list05.swf";
				changeVal = "selected=5&xmlPath=/include/list5.asp";
				break;
			case 6 :
				changeSwf = "/flash/ko/online_list06.swf";
				changeVal = "selected=6&xmlPath=/include/list6.asp";
				break;
			case 7 :
				changeSwf = "/flash/ko/online_list07.swf";
				changeVal = "selected=7&xmlPath=/include/list7.asp";
				break;
			case 8 :
				changeSwf = "/flash/ko/online_list08.swf";
				changeVal = "selected=8&xmlPath=/include/list8.asp";
				break;
			default  :
				changeSwf = "/flash/ko/online_list01.swf";
				changeVal = "selected=1&xmlPath=/include/list1.asp";
				break;
		}

		online_list.FlashVars = changeVal;
		online_list.movie     = changeSwf;
//		onlineList.innerHtml = flashWrite(changeSwf,'620','580','online_list','ffffff',changeVal,'transparent');
	}else{
		document.onLine.judgSel.value = n;
		document.onLine.submit();
//		document.location.replace("/judges/online.asp?judgSel="+n+"&gubun=" + gubun;);
	}
}

function goJudgeView(sel, idx){
	if(sel > 10){
		document.location.href="/judges/offline_view.asp?sel="+sel+"&idx=" + idx;
	}else{
		document.location.href="/judges/online_view.asp?sel="+sel+"&idx=" + idx;
	}
}
/* 메인에 enter now 버튼 */
function enterNow(){
	document.location.href = "/Delegates/registration_package.asp";
}

/* 상단메뉴 */
function goEvent(){
	document.location.href = "/event/event.asp";
}

/* 서브 FINALISTS VIEW */
function finalistsView(){
	document.location.href = "/entries/finalists.asp";
}