// 플래쉬 사용가능여부 체크
var _FLADISABLED = false;

function FLA() {
	var check = null;

	document.getElementById("FLACHECK").innerHTML = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='0' height='0' id='CHECK'><param name='movie' value='https://www.adobe.com/swf/software/flash/about/ko/mini_FMA_01.swf' /></object>";

	try {
		var check = document.getElementById("CHECK").movie;

		if (typeof check == "undefined") {
			_FLADISABLED = true;
		}
	} catch (e) {
		_FLADISABLED = true;
	}
}

function ck(n) {
	for (var i = 1; i <= 7; i++) {
		document.getElementById("menu" + i).style.display = i == n ? "" : "none";
		document.getElementById("m" + i).src = _TOPDIR + "/images/main_menu0" + i + (i == n ? "a" : "") + ".gif";
	}
}

function ch(n, s) {
	for (var i = 1; i <= 7; i++) {
		if (i != s) {
			document.getElementById("m" + i).src = _TOPDIR + "/images/main_menu0" + i + (i == n ? "a" : "") + ".gif";
		}
	}
}

// flashWrite(파일경로, 가로, 세로, 아이디, 배경색, 윈도우모드)
function flashWrite(s,w,h,d,bg,t,f,l){

    var keys = new Array();
    var values = new Array();
    if(f != null && f.length > 0){keys.push("nfreq");values.push(f);}
    for(var i = 0; l != null && i < l.length; i++){
        var clkid = i + 1;
        keys.push(clkid);values.push(encode(l[i]));
    }

 var flashvars = "";
    if(keys != null && values != null && keys.length > 0 && keys.length == values.length){
        for(var i = 0; i < keys.length; i++){
            if(i > 0){ flashvars += "&"; }
            flashvars += keys[i] + "=" + values[i];
        }
    }

    var code = "";
    code  = "<object type=\"application/x-shockwave-flash\" ";
    code +=         "classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ";
    code +=         "codebase=\"https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" ";
    code +=         "width=\""+w+"\" height=\""+h+"\" id=\""+d+"\">";
    code += "<param name=\"movie\" value=\""+s+"\" />";
    code += "<param name=\"quality\" value=\"high\" />";
    //code += "<param name=\"bgcolor\" value=\"#ffffff\" />";
    code += "<param name=\"wmode\" value=\""+t+"\" />";
    code += "<param name=\"menu\" value=\"false\" />";
    code += "<param name=\"allowScriptAccess\" value=\"always\" />";
    code += "<param name=\"swliveconnect\" value=\"true\" />";

    if(flashvars.length > 0){
        code += "<param name=\"FlashVars\" value=\""+flashvars+"\" />";
    }

    code += "<embed src=\""+s+"\" quality=\"high\" "
    //code +=        "bgcolor=\"#ffffff\" "
    code +=        "wmode=\""+t+"\" "
    code +=        "menu=\"false\" width=\""+w+"\" height=\""+h+"\" "
    code +=        "type=\"application/x-shockwave-flash\" "

    if(flashvars.length > 0){
        code +=    "FlashVars=\""+flashvars+"\" ";
    }

    code +=        "pluginspage=\"https://www.macromedia.com/go/getflashplayer\"> "
    code += "</embed>"
    code += "</object>"

	document.write (code);
 }

function GNB(num) {
	switch (num) {
		case 0 : // HOME
			document.location.href = _TOPDIR + "/";
			break;
		case 011 : // 로그인
			document.location.href = _TOPDIR + "https://www.finaldata.co.kr/Member/?s=LOGIN&r=" + (location.pathname.substr(_TOPDIR.length + 1, 6) == "Member" ? _TOPDIR + "/" : escape(location.pathname + location.search));
			break;

		case 'Post' : // q&a 리스트에서 로그인시
			document.location.href = _TOPDIR + "https://www.finaldata.co.kr/Member/?s=LOGIN&r=" + escape(location.pathname + location.search+"&m=Post");
			break;

		case 012 : // 로그아웃
			if (confirm("로그아웃하시겠습니까?") == true) {
				document.location.href = _TOPDIR + "/Member/?s=LOGOUT&r=" + (location.pathname.substr(_TOPDIR.length + 1, 6) == "Member" ? _TOPDIR + "/" : escape(location.pathname + location.search));
			}
			break;

		case 021 :
			document.location.href = _TOPDIR + "https://www.finaldata.co.kr/Member/?s=AGREEMENT";// 회원가입
			break;
		case 022 :
			document.location.href = _TOPDIR + "https://www.finaldata.co.kr/Member/?s=MODIFY";// 회원수정
			break;
		case 023 :
			document.location.href = _TOPDIR + "https://www.finaldata.co.kr/Member/?s=SEARCH";// 아이디/패스워드 찾기
			break;
		case 024 :
			document.location.href = _TOPDIR + "https://www.finaldata.co.kr/Member/?s=FRSEARCH";// 아이디/패스워드 찾기 (디지털증거분석솔루션)
			break;
		case 025 :
			document.location.href = _TOPDIR + "https://www.finaldata.co.kr/Member/?s=MEMBEROUT";// 회원탈퇴
			break;
		
		case 031 :
			document.location.href = "mailto:help@finaldata.com";// Contact US
			break;
		case 041 :
			
			document.location.href = _TOPDIR + "http://www.finaldata.com";//document.location.href = "#";// 영문
			break;
		case 051 :
			document.location.href = _TOPDIR + "/ETC/?s=PROTECTION";// 개인정보보호정책
			break;
		case 061 :
			document.location.href = _TOPDIR + "/ETC/?s=AGREEMENT";// 이용약관
			break;
		case 071 :
			document.location.href = _TOPDIR + "/ETC/?s=SITEMAP";// 사이트맵
			break;
		case 081 :
			document.location.href = _TOPDIR + "/ETC/?s=EMAIL";// 이메일 무단수집거부
			break;		
	}
}


//***** sub01 company(회사소개)
function company(num) {
	switch (num) {
		case 10 :
			document.location.href = _TOPDIR + "/Company/?s=COM.CEO";//CEO 인사말
			break;
		case 20 :
			document.location.href = _TOPDIR + "/Company/?s=COM.HST";//회사연혁
			break;
		case 30 :
			document.location.href = _TOPDIR + "/Company/?s=COM.ORG";//조직도
			break;
		//case 40 :
		//	document.location.href = _TOPDIR + "/Company/?s=COM.OVD";//해외 배급사
		//	break;
		//case 40 :
			//document.location.href = _TOPDIR + "/Company/?s=COM.PRT";//파트너 소개
			//break;
		case 50 :
			document.location.href = _TOPDIR + "/Company/?s=COM.LOC";//회사위치
			break;
		case 60 :
			document.location.href = _TOPDIR + "/Company/?s=COM.RCT";//채용정보
			break;
		case 70 :
			document.location.href = _TOPDIR + "/Company/?s=COM.CAR";//포상 및 인증 경력
			break;
		case 80 :
			document.location.href = _TOPDIR + "/Company/?s=NEWS.KOR";//FINALDATA News
			break;
		case 90 :
			document.location.href = _TOPDIR + "/Company/?s=TESTIMONIAL.KOR";//감사장
			break;
		case 100 :
			document.location.href = _TOPDIR + "/Company/?s=STOCKHOLDER.KOR";//주주게시판
			break;
	}
}

//***** sub02 products(제품소개)
function products(num, c, n) {
	var add = "";

	if (c) {
		add += "&c=" + c;
	}

	if (n) {
		add += "&n=" + n;
	}

	if (add != "") {
		document.location.href = _TOPDIR + "/Products/?s=PRD" + add;//제품소개
	} else {
		switch (num) {
			case 10 :
				document.location.href = _TOPDIR + "/Products/?s=PRD&c=1";//제품소개
				break;
			case 20 :
				document.location.href = _TOPDIR + "/Products/?s=PRD&c=2";//제품소개
				break;
			case 30 :
				document.location.href = _TOPDIR + "/Products/?s=PRD&c=3";//제품소개
				break;
			case 40 :
				document.location.href = _TOPDIR + "/Products/?s=PRD&c=4";//제품소개
				break;
			case 50 :
				document.location.href = _TOPDIR + "/Products/?s=PRD&c=5";//제품소개
				break;
			case 60 :
				document.location.href = _TOPDIR + "/Products/?s=PRD&c=15";//제품소개
				break;
			case 70 :
				document.location.href = _TOPDIR + "/Products/?s=PRD.WHY";//Why FINALDATA
				break;
			case 71 :
				document.location.href = _TOPDIR + "/Products/?s=PRD.WHY&c=1";//필요성
				break;
			case 72 :
				document.location.href = _TOPDIR + "/Products/?s=PRD.WHY&c=2";//장점
				break;
			case 73 :
				document.location.href = _TOPDIR + "/Products/?s=PRD.WHY&c=3";//서버운영/관리의 필수요소
				break;
			case 74 :
				document.location.href = _TOPDIR + "/Products/?s=PRD.WHY&c=4";//백업/데이터복구
				break;
			case 75 :
				document.location.href = _TOPDIR + "/Products/?s=PRD.WHY&c=5";//주요활용방안
				break;
			case 76 :
				document.location.href = _TOPDIR + "/Products/?s=PRD.WHY&c=6";//도입기업
				break;
			case 77 :
				document.location.href = _TOPDIR + "/Products/?s=PRD.WHY&c=7";//복구사례
				break;
			case 78 :
				document.location.href = _TOPDIR + "/Products/?s=PRD.WHY&c=8";//응용사례
				break;
		}
	}
}


//***** sub03 디지털증거분석 솔루션 Forum
function forum(num) {
	switch (num) {
		case 10 :
			//document.location.href = _TOPDIR + "/Forum/?s=FRM.FF1";//운영자 인사말
			document.location.href = _TOPDIR + "/Forum/?s=FRM.FF2";//Forensics 소개
			break;
		case 11 :
			document.location.href = _TOPDIR + "/Forum/?s=FRM.FF2";//Forensics 소개
			break;
		case 12 :
			document.location.href = _TOPDIR + "/Forum/?s=DOWNLOAD.FF.KOR";//다운로드
			break;
		case 13 :
			document.location.href = _TOPDIR + "/Forum/?s=QNA.FF.KOR";//Q/A
			break;
		case 20 :
			//document.location.href = _TOPDIR + "/Forum/?s=FRM.MF1";//운영자 인사말
			document.location.href = _TOPDIR + "/Forum/?s=MOBILETRAND.KOR";//핸드폰 최근 동향 정보
			break;
		case 21 :
			document.location.href = _TOPDIR + "/Forum/?s=MOBILETRAND.KOR";//핸드폰 최근 동향 정보
			break;
		case 22 :
			document.location.href = _TOPDIR + "/Forum/?s=FRM.MF2";//Mobile Forensics 소개
			break;
		case 23 :
			document.location.href = _TOPDIR + "/Forum/?t=S&s=SUPPORT";//통합 지원 리스트 및 다운로드
			break;
		case 231 :
			document.location.href = _TOPDIR + "/Forum/?t=S&s=SUPPORT";// Official Release Download
			break;
		case 232 :
			document.location.href = _TOPDIR + "/Forum/?t=I&s=SUPPORT";// All Download
			break;
		case 24 :
			document.location.href = _TOPDIR + "/Forum/?s=QNA.MF.KOR";//Q/A
			break;
		case 25 :
			document.location.href = _TOPDIR + "/Forum/?s=TECHNICALINFO.KOR";//Technical Infomation
			break;
	}
}


//***** sub04 제품구매
function buy(num) {
	switch (num) {
		case 10 :
			document.location.href = _TOPDIR + "/Buy/?s=BUY.GUI";//제품구매안내
			break;
		case 20 :
			document.location.href = _TOPDIR + "/Buy/?s=BUY.DIS";//국내판매업체
			break;
		case 30 :
			document.location.href = _TOPDIR + "/Buy/?s=PURCHASE";//기업용제품구매
			break;
		case 40 :
			document.location.href = _TOPDIR + "/Buy/?s=BUY.UPG";//업그레이드안내
			break;
	}
}

//***** sub05 다운로드
function download(num, c) {
	var add = "";

	if (c) {
		add += "&c=" + c;
	}

	switch (num) {
		case 10 :
			document.location.href = _TOPDIR + "/Download/?s=DEMO" + add;//데모버전 다운로드
			break;
		case 20 :
			document.location.href = _TOPDIR + "/Download/?s=MANUAL" + add;//매뉴얼 다운로드
			break;
		case 30 :
			document.location.href = _TOPDIR + "/Download/?s=PATCH" + add;//패치 다운로드
			break;
	}
}

//***** sub06 고객지원
function customer(num, c) {
	var add = "";

	if (c) {
		add += "&c=" + c;
	}

	switch (num) {
		case 10 :
			document.location.href = _TOPDIR + "/Customer/?s=FAQ.MYF" + add;//내게맞는 FINALDATA
			break;
		case 20 :
			document.location.href = _TOPDIR + "/Customer/?s=FAQ.NRM" + add;//FAQ
			break;
		case 30 :
			document.location.href = _TOPDIR + "/Customer/?s=QNA.CS.KOR";//Q/A
			break;
		case 40 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.LIC";//License
			break;
		case 50 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=1";//데이터 복구란?
			break;
		case 51 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=2";//데이터 손실의 원인
			break;
		case 52 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=3";//데이터 손실의 피해
			break;
		case 53 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=4";//FINALDATA의 장점
			break;
		case 54 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=5";//서버운영 / 관리의 필수요소
			break;
		case 55 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=6";//백업 / 데이터 복구
			break;
		case 56 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=7";//FINALDATA의 주요 활용방안
			break;
		case 57 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=8";//도입기업 리스트
			break;
		case 58 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=9";//복구사례
			break;
		case 59 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.RCV&c=10";//응용사례
			break;
		case 60 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.TEC&c=1";//파일관리 메커니즘
			break;
		case 61 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.TEC&c=2";//FINALDATA 복구로직
			break;
		case 62 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.TEC&c=3";//복구율 향상을 위한 사전설치
			break;
		case 63 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.TEC&c=4";//효율적인데이터보존방법
			break;
		case 64 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.TEC&c=5";//UNIX 파일시스템
			break;
		case 65 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.TEC&c=6";//컴퓨터 포렌식의 개념
			break;
		case 70 :
			document.location.href = _TOPDIR + "/Customer/?s=CUS.TRM";//용어설명
			break;
	}
}

//***** sub07 복구 서비스
function service(num, c) {
	var add = "";

	if (c) {
		add += "&c=" + c;
	}

	switch (num) {
		//복구 서비스
		case 10 :
			//document.location.href = _TOPDIR + "/Service/?s=SVC.HCV&c=1";//복구 서비스
			document.location.href = _TOPDIR + "/Service/?s=FAQ.RCV.KOR";//FAQ

			break;
		//QNA
		case 20 :
			document.location.href = _TOPDIR + "/Service/?s=QNA.RCV.KOR";//Q&A
			break;
			
		//FAQ
		case 50 :
			document.location.href = _TOPDIR + "/Service/?s=FAQ.RCV.KOR";//FAQ
			break;
		//QNA
		case 60 :
			document.location.href = _TOPDIR + "/Service/?s=QNA.RCV.KOR";//Q&A
			break;

			/*
		case 11 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.HCV&c=2";//데이터 손실의 원인
			break;
			
			
		case 20 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.RCV&c=1";//복구 서비스
			break;
		case 21 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.RCV&c=2";//데이터 손실의 원인
			break;
		case 22 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.RCV&c=3";//데이터 손실시 응급조치스
			break;
		case 23 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.RCV&c=4";//하드디스크 복구
			break;
		case 24 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.RCV&c=5";//서버 / RAID 구성
			break;
		case 25 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.RCV&c=6";//DB 복구
			break;
		case 26 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.RCV&c=7";//파일 / 암호 복구
			break;
		case 27 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.RCV&c=8";//파일 / 암호 복구
			break;

		//복구 의뢰
		case 30 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.REQ&c=1";//데이터 복구
			break;
		case 31 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.REQ&c=2";//복구 의뢰
			break;
		case 32 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.REQ&c=3";//복구현황조회
			break;
		case 40 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.LOC";//복구센터
			break;
		case 50 :
			document.location.href = _TOPDIR + "/Service/?s=FAQ.RCV.KOR" + add;//FAQ
			break;
		case 60 :
			document.location.href = _TOPDIR + "/Service/?s=QNA.RCV.KOR";//Q/A 게시판
			break;

		//복구 센터
		case 40 :
			document.location.href = _TOPDIR + "/Service/?s=SVC.LOC";//데이터 복구
			break;


			*/
	}
}

//////////////////////
// 2007-05-29 
// 모든개체 가져오기
// ////////////////////
function GetObject(ObjectId) {
	 if (document.getElementById && document.getElementById(ObjectId)) {
	  return document.getElementById(ObjectId);
	 } else if (document.getElementByName && document.getElementByName(ObjectId)) {
	  return document.getElementByName(ObjectId);
	 } else if (document.all && document.all(ObjectId)) {
	  return document.all(ObjectId);
	 } else if (document.layers && document.layers[ObjectId]) {
	  return document.layers[ObjectId];
	 } else {
	  return false;
	 }
}