//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/operator.asp";
		}else if(dep2 == 4){//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){//pictures
			document.location.href = "/festival/pictures.asp";
			//alert('Exhibition');
		}else if(dep2 == 5){//additional_event
			document.location.href = "/festival/additional_event.asp";
			//alert('Venue');
		}else if(dep2 == 6){//Venue
			//document.location.href = "";
			alert('Venue');
		}

	}else if (dep1 == 3){//Judges 2010
		document.location.href = "/judges/chair.asp";
		if(dep2 == 1){//Preliminary Judges
			document.location.href = "/judges/chair.asp";
		}else if(dep2 == 2){//Final Judges
			document.location.href = "/judges/offline.asp";
		}else if(dep2 == 3){//Final Judges
			document.location.href = "/judges/online.asp";
		}
	}else if (dep1 == 4){//Entries 2010
		document.location.href = "/vricks/entries/finalists_2011.asp";
		if(dep2 == 1){//Enter Now
			document.location.href = "/vricks/entries/finalists_2011.asp";
		}else if(dep2 == 2){//Categories
			document.location.href = "/vricks/entries/hotlive_2011.asp";
		}else if(dep2 == 3){//How to Enter
			//alert("The deadline for entries for AD STARS 2011 is now here. We will open AD STARS 2012 entries shortly. Thank you");
			document.location.href = "/vricks/entries/enter_now.asp";
		}else if(dep2 == 4){//Categories
			document.location.href = "/entries/howtoenter.asp";
		}else if(dep2 == 5){//Rules & Regulations
			document.location.href = "/entries/category.asp";
		}else if(dep2 == 6){//Weekly Hot
			document.location.href = "/entries/rules.asp";
		}else if(dep2 == 7){//Finalists 
			alert("준비중 입니다.");
			return false;
			//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 = "/package/accommodations.asp";
			
		}
	}else if (dep1 == 7){//PR Room
		document.location.href = "/prroom/notice.asp";
		if(dep2 == 1){//News & notice
			document.location.href = "/prroom/notice.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=2011";
		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(dep2 == 4){//AD STARS 2011
			document.location.href = "/archive/archive.asp?y=2011";
		}
	}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 = "/" + country + "/store/trophy.asp";
		}
	}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";
		}
	}else if (dep1 == 12){//mypage
		document.location.href = "/member/mypage_mydetail.asp";
		if(dep2 == 1){
			document.location.href = "/member/mypage_myentries.asp";
		}else if(dep2 == 2){
			document.location.href = "/member/mypage_myreservation_list.asp";
		}else if (dep2 == 3){
			document.location.href = "/member/mypage_mydetail.asp";
		}
	}else if (dep1 == 13){//Idea & Insight
		document.location.href = "/prroom/insight_list.asp";
		if(dep2 == 1){
			document.location.href = "/prroom/insight_list.asp";
		}else if(dep2 == 2){
			document.location.href = "/prroom/insight_write.asp";
		}
	}else if (dep1 == 14){//Promoto Yourself
		document.location.href = "/prroom/yourself_list.asp";
		if(dep2 == 1){
			document.location.href = "/prroom/yourself_list.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){
		alert("The deadline for entries for AD STARS 2011 is now here. We will open AD STARS 2012 entries shortly. Thank you");
		//document.location.href = "/vricks/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){
		alert("The deadline for entries for AD STARS 2011 is now here. We will open AD STARS 2012 entries shortly. Thank you.");
		//document.location.href = "/vricks/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 goJudge2011(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/preliminary1.swf";
				changeVal = "selected=1&xmlPath=/include/preliminary1_list.xml";
				break;
			case 2 :
				changeSwf = "/flash/ko/preliminary2.swf";
				changeVal = "selected=2&xmlPath=/include/preliminary2_list.xml";
				break;
			case 3 :
				changeSwf = "/flash/ko/preliminary3.swf";
				changeVal = "selected=3&xmlPath=/include/preliminary3_list.xml";
				break;
			case 4 :
				changeSwf = "/flash/ko/preliminary4.swf";
				changeVal = "selected=4&xmlPath=/include/preliminary4_list.XML";
				break;
			case 5 :
				changeSwf = "/flash/ko/preliminary5.swf";
				changeVal = "selected=5&xmlPath=/include/preliminary5_list.XML";
				break;
			case 6 :
				changeSwf = "/flash/ko/preliminary6.swf";
				changeVal = "selected=6&xmlPath=/include/preliminary6_list.XML";
				break;
			case 7 :
				changeSwf = "/flash/ko/preliminary7.swf";
				changeVal = "selected=7&xmlPath=/include/preliminary7_list.XML";
				break;
			case 8 :
				changeSwf = "/flash/ko/preliminary8.swf";
				changeVal = "selected=8&xmlPath=/include/preliminary8_list.XML";
				break;
			case 9 :
				changeSwf = "/flash/ko/preliminary9.swf";
				changeVal = "selected=9&xmlPath=/include/preliminary9_list.XML";
				break;
			case 10 :
				changeSwf = "/flash/ko/preliminary10.swf";
				changeVal = "selected=10&xmlPath=/include/preliminary10_list.XML";
				break;
			case 11 :
				changeSwf = "/flash/ko/preliminary11.swf";
				changeVal = "selected=11&xmlPath=/include/preliminary11_list.XML";
				break;
			case 12 :
				changeSwf = "/flash/ko/preliminary12.swf";
				changeVal = "selected=12&xmlPath=/include/preliminary12_list.XML";
				break;
			case 13 :
				changeSwf = "/flash/ko/preliminary13.swf";
				changeVal = "selected=13&xmlPath=/include/preliminary13_list.XML";
				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 goJudge2011_2(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/finaljudge01.swf";
				changeVal = "selected=1&xmlPath=/include/finaljudge01.xml";
				break;
			case 2 :
				changeSwf = "/flash/ko/finaljudge02.swf";
				changeVal = "selected=2&xmlPath=/include/finaljudge02.xml";
				break;
			case 3 :
				changeSwf = "/flash/ko/finaljudge03.swf";
				changeVal = "selected=3&xmlPath=/include/finaljudge03.xml";
				break;
			case 4 :
				changeSwf = "/flash/ko/finaljudge04.swf";
				changeVal = "selected=4&xmlPath=/include/finaljudge04.xml";
				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){
		document.location.href="/judges/online_view.asp?sel="+sel+"&idx=" + idx;
}

function goJudgeView_2(sel, idx){
	document.location.href="/judges/offline_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 = "/vricks/entries/hotlive_2011.asp"
}

function myPageBtn(n,num){

	if (num == "1")
	{
		document.location.href = "/entries/howtoenter.asp";
	}else if (num == "2")
	{
		document.location.href = "/entries/rules.asp";
	}else if (num == "3")
	{
		document.location.href = "/vricks/entries/hotlive_2011.asp";
	}
}
