﻿/*
FLASH FUNCTION DEFINITION
*/
function menu(d1,d2){
	//alert(d1+","+d2);
	var d1, d2;
	if(d1=='0'){//메인
		document.location.href='/';
	}else{
		switch (d1){
		case 1 ://About KPR
			document.location.href='/about/greeting.asp';
			switch (d2){
			case 1 ://Greeting
				document.location.href='/about/greeting.asp';
				break;
			case 2 : //Overview
				document.location.href='/about/overview.asp';
				break;
			case 3 : //Awards
				document.location.href='/about/awards.asp';
				break;
			case 4 : //Organization
				document.location.href='/about/organization.asp';
				break;
			case 5 : //Partner Ship
				document.location.href='/about/partnership.asp';
				break;
			case 6 : //Contact Us
				document.location.href='/about/contact_us.asp';
				break;
			}
			break;

		case 2 : //Case Study
			document.location.href='/case/case_study.asp';
			switch (d2){
			case 1 : //Case Study
				document.location.href='/case/case_study.asp';
				break;
			}
			break;

		case 3 ://Strength
			document.location.href='/strength/key.asp';
			switch (d2){
			case 1 ://Key Strengths
				document.location.href='/strength/key.asp';
				break;
			case 2 : //Vision & Core Values
				document.location.href='/strength/vision.asp';
				break;
			}
			break;

		case 4 ://Clients
			document.location.href='/clients/current.asp';
			switch (d2){
			case 1 ://Current Clients
				document.location.href='/clients/current.asp';
				break;
			case 2 : //KPR Experience
				document.location.href='/clients/experience.asp';
				break;
			}
			break;

		case 5 ://News
			document.location.href='/news/news.asp';
			switch (d2){
			case 1 ://KPR News
				document.location.href='/news/news.asp';
				break;
			case 2 : //Clients News Release
				document.location.href='/news/clients_news.asp';
				break;
			case 3 : //Visual PR
				document.location.href='/news/visual_pr.asp';
				break;
			}
			break;

		case 6 : //Recruit
			document.location.href='/recruit/recruit_info.asp';
			switch (d2){
			case 1 : //Q&A
				document.location.href='/recruit/recruit_info.asp';
				break;
			case 2 : //Q&A
				document.location.href='/recruit/recruit.asp';
				break;
			}
			break;
		}
	}
}

//Head
function goMain() { //메인
	document.location.href='/';
}
function gMenu(num) {
	var d1, d2;
	if (num=="1") { //ENGLISH
		document.location.href='/eng/';
	}
	else if (num=="2") { //CONTACT US
		document.location.href='/about/contact_us.asp';
	}
	else if (num=="3") { //SITE MAP
		document.location.href='/sitemap/sitemap.asp';
	}
}


// 메인
function studyMoreGo() { //case study - more버튼
	document.location.href='/case/case_study.asp';
}
function studyGo(idx) {
	document.location.href='/case/case_view.asp?idx='+idx;
}
function newsMoreGo() {
	document.location.href='/news/news.asp';
}
function videoPRGo(idx) {
	window.open('/news/visual_popup.asp?idx='+idx, 'popupName', 'width=468,height=572');
}
function KPRNewsGo(idx) {
	document.location.href='/news/news_view.asp?idx='+idx;
}
function ClientNewsGo(idx) {
	document.location.href='/news/cnews_view.asp?idx='+idx;
}
function awardMoreGo() {
	document.location.href='/about/awards.asp';
}
function awardGo(idx) {
	window.open('/about/awards_popup.asp?idx='+idx, 'popupName', 'width=380,height=405');
}
function contents4Go(idx) {
//alert("a")
//플래시 안에서 바로 이동하기로 함
}


// 퀵메뉴
//function menu(d1,d2) {
	//alert(d1+","+d2);
//	if (d1=='1' && d2=='2') { //Overview
//		document.location.href='/about/overview.asp';
//	}
//	else if (d1=='4' && d2=='1') { //Current Clients
//		document.location.href='/clients/current.asp';
//	}
//	else if (d1=='2' && d2=='1') { //Case Studies
//		document.location.href='/case/case_study.asp';
//	}
//}
function pdfDownLoad() { //pdfDownLoad
	pars = "mode=kor";

	new Ajax.Request(
		"/flash/data/quickmenudown.asp",
		{
			parameters : pars,
			onSuccess : function (req){
				returnvalue = req.responseText
				if (returnvalue != ""){
					window.open('/UploadFactory/QUICK/'+returnvalue,'','');
				}
			},
			onFailure : function (req){
				//
			}
		}
	);
}

function pdfDownLoad2() { //pdfDownLoad
	pars = "mode=eng";

	new Ajax.Request(
		"/flash/data/quickmenudown.asp",
		{
			parameters : pars,
			onSuccess : function (req){
				returnvalue = req.responseText
				if (returnvalue != ""){
					window.open('/UploadFactory/QUICK/'+returnvalue,'','');
				}
			},
			onFailure : function (req){
				//
			}
		}
	);
}

function quickMenuMove() { //위로
	document.location.href='#navi';
}

// footer
function goPrivacy() { //개인정보보호정책 425x400
	var ele = document.getElementById("privacy");
	ele.href = "/etc/privacy.asp";
	return hs.htmlExpand(ele, { contentId: 'aaa',objectType: 'ajax', outlineType : null, align: 'center', preserveContent: false, width: 425, targetX: 'top 375px'} );
}
