//-----------------------------플래쉬 메뉴 클릭시 링크 경로 설정------------------------------------------------------//

var urlName = "http://" + location.hostname;

var DEFAULT_HOME = "http://"+location.host+"";
//var DEFAULT_HOME = "http://"+location.host+"/leoinnovision";

//window.status = "Finished";	//	하단 로딩바 설정

//var page_0_0_0 = "/index.asp";															//	home

var page_0_1_0 = "/siteguide/leoSite_guide.asp";												//	sitemap

var page_0_2_0 = "/contact/leoContact_us.asp";												//	contact us

//	기업 소개
var page_1_1_0 = "/company/leoCom_vision.asp";												//	기업비젼
var page_1_4_1 = "/company/vision/leoCom_vision.asp";												//	기업정신
var page_1_4_2 = "/company/vision/leoCom_mission.asp";											//	임무수행 
var page_1_4_3 = "/company/vision/leoCom_finance.asp";												//	재무관리
var page_1_4_4 = "/company/vision/leoCom_learning.asp";											//	학습성장

var page_1_2_0 = "/company/leoCom_history.asp";												//	기업연혁

var page_1_3_0 = "/company/leoCom_structure.asp";											//	기업구조

var page_1_4_0 = "/company/leoCom_ceo.asp";													//	CEO인사말

var page_1_5_0 = "/company/leoCom_map.asp";													//	찾아오시는 길

//	군수지원 / 제품 소개
var page_2_1_0 = "/sci/leoSci_main.asp";												//	개 요

var page_2_2_0 = "/sci/leoSci_part.asp";												//	부품지원

var page_2_3_0 = "/sci/leoSci_aftermarket.asp";									//	AfterMarket

var page_2_4_0 = "/sci/leoSci_waveGuide.asp";									//	Waveguide - 도파관
var page_2_4_1 = "/sci/waveGuide/leoSci_waveGuide.asp";					//	도파관
var page_2_4_2 = "/sci/waveGuide/leoSci_product.asp";						//	주요품목
var page_2_4_3 = "/sci/waveGuide/leoSci_catalog.asp";						//	카탈로그
var page_2_4_4 = "/sci/waveGuide/leoSci_wgRequest.asp";					//	견적문의

var page_2_5_0 = "/sci/leoSci_connector.asp"										//Connector		
var page_2_5_1 = "/sci/connector/leoSci_connector.asp"
var page_2_5_2 = "/sci/connector/leoSci_connectorPart.asp"
var page_2_5_3 = "/sci/connector/leoSci_connectorCatalog.asp"
var page_2_5_4 = "/sci/connector/leoSci_connectorRequest.asp"

var page_2_6_0 = "/sci/leoSci_board.asp";											//	군수지원게시판

//	단종솔루션
var page_3_1_0 = "/sol/leoSol_solution.asp";										//	개 요

var page_3_2_0 = "/sol/leoSol_pbl.asp";												//	PBL솔루션
var page_3_2_1 = "/sol/pbl/leoSol_pbl.asp";												//	PBL솔루션
var page_3_2_2 = "/sol/pbl/leoSol_smart.asp";											//	smart란
var page_3_2_3 = "/sol/pbl/leoSol_score.asp";											//	기 능

var page_3_3_0 = "/sol/leoSol_solveIt.asp";											//	단종관리솔루션
var page_3_3_1 = "/sol/solve/leoSol_solveIt.asp";											//	단종관리솔루션
var page_3_3_2 = "/sol/solve/leoSol_operation.asp";										//	운용개념
var page_3_3_3 = "/sol/solve/leoSol_pblp.asp";												//	기 능

var page_3_4_0 = "/sol/leoSol_board.asp";											//	게시판

//	무인정찰기
var page_4_1_0 = "/uav/leoUav_uav.asp";											//	개 요

var page_4_2_0 = "/uav/leoUav_raven.asp";											//	대대급

var page_4_3_0 = "/uav/leoUav_wasp.asp";											//	초소형

var page_4_4_0 = "/uav/leoUav_go.asp";												//	고고도

var page_4_5_0 = "/uav/leoUav_board.asp";											//	게시판

//	뉴스센터
var page_5_1_0 = "/news/leoNews_boardList.asp";									//	뉴스기사

var page_5_2_0 = "/news/leoSci_boardList.asp";										//	군수지원게시판

var page_5_3_0 = "/news/leoSol_boardList.asp";										//	단종솔루션게시판

var page_5_4_0 = "/news/leoUav_boardList.asp";										//	무인정찰기게시판

//-----------------------------플래쉬 메뉴 클릭시 링크 경로 설정 종료------------------------------------------------------//

//-----------------------------플래쉬 메뉴 활성화 및 로케이션 표시용 설정 시작------------------------------------------------------//
/**	최종 depth 메뉴 별로  폴더 생성할것
		플래쉬 전달 변수 구하기
		추가시 case "/폴더명" : 부분에 값설정 추가
		para[0] :  //1depth No값
		para[1] :  //2depth No값
		para[2] :  //3depth No값
		para[3] :  //로케이션

	case "/sample":		<=소문자로 입력														//샘플			
			para[0] = "1";																	//1depth No
			para[1] = "1";  																//2depth No
			para[2] = "0";																	//3depth No
			para[3] = "Home > Sample";											//로케이션
		break;

**/

//var LOCATION_SPLIT_CHAR = "<img src='/200909/images/common/arrow.gif' width='13' height='5'>";		//로케이션 구분자

function getMenuNum(strURLDir) {

//	alert("여기 온 건가");
//	alert(strURLDir);

	var para = new Array();
//	var gu = LOCATION_SPLIT_CHAR;

	switch (strURLDir) 	{
	case "/":																	//메인
			para[0] = "0";													//1depth No
			para[1] = "0";  												//2depth No
			para[2] = "0";													//3depth No
			para[3] = "Home ";										//로케이션
			break;
	case "/leoinnovision" :						//나이스그룹
			para[0] = "2";
			para[1] = "0";
			para[2] = "0";
			para[3] = "";
			break;
	case "/sci" :					//군수지원
		para[0] = "2";
		para[1] = "0";
		para[2] = "0";
		para[3] = "";
		break;

	case "/sol" :					//단종솔루션
			para[0] = "3";
			para[1] = "0";
			para[2] = "0";
			para[3] = "";
			break;
	case "/uav" :								//무인정찰기
			para[0] = "4";
			para[1] = "0";
			para[2] = "0";
			para[3] = "";
			break;
	case "/news" :								//뉴스센터
			para[0] = "5";
			para[1] = "0";
			para[2] = "0";
			para[3] = "";
			break;
	default : 
			para[0] = "0";
			para[1] = "0";
			para[2] = "0";
			para[3] = "Home ";											//로케이션	
	}
	return para;
}

//-----------------------------플래쉬 메뉴 활성화 및 로케이션 표시용 설정 종료------------------------------------------------------//

/*=========================================================설정 변수 값 종료===============================================*/


//플래쉬 변수 저장용 클래스
function setFlashVar() {
	this.numA = "0";
	this.numB = "0";
	this.numC = "0";
	this.locName = "Home";

	this.setVarsValue = function (arrArg) {
		this.numA = arrArg[0];
		this.numB  = arrArg[1];
		this.numC  = arrArg[2];
		this.locName  = arrArg[3];
	}
	this.setNumA = function (argNumA) {
		this.numA = argNumA;
	}

	this.setNumB = function (argNumB) {
		this.numB = argNumB;
	}

	this.setNumC = function (argNumC) {
		this.numC = argNumC;
	}

	this.setLocName = function (argNumLocName) {
		this.locName = argNumLocName;
	}

	this.getNumA = function () {
		return this.numA;
	}

	this.getNumB = function () {
		return this.numB;
	}

	this.getNumC = function () {
		return this.numC;
	}

	this.getLocName = function () {
		return this.locName;
	}
}

//URL에서 디렉토리명까지 구하기(/test/test.asp => /test)
function getURLDirName() {
	var pageUrl = window.location.pathname;			//현재 페이지 url
	pageUrl = pageUrl.replace(/\/+/gi, "/");			// /가 여려번 겹쳤을 경우 

//	alert(pageUrl);

	//파일명을 제외한 디렉토리명 구하기 ( /test/index.asp => /test)
	if (pageUrl.lastIndexOf("/") > 1) {
	 strDirName = pageUrl.substring(0, pageUrl.lastIndexOf("/"));
	 strDirName = strDirName.toLowerCase();			//소문자로 변경
	} else {	//메인
	  strDirName = pageUrl.substring(0,1);
	}
//	alert(strDirName)
	return strDirName;
}

//--------------------현재 페이지 번호 설정 시작----------------------------------------//
var PAGE_URL_DIR  = getURLDirName();											//디렉토리 명 구하기
var FLASH_FLASH_ARRVAR = getMenuNum(PAGE_URL_DIR);				//플래쉬 전달 변수 받기
//alert(FLASH_FLASH_ARRVAR);
var objFlashVars = new setFlashVar();												//플래쉬 저장 객체 생성
objFlashVars.setVarsValue(FLASH_FLASH_ARRVAR);							//파라메터 값 셋팅

//alert(PAGE_URL_DIR);
//--------------------현재 페이지 번호 설정 종료----------------------------------------//

//로케이션 표시 함수 호출되는 부분에서 <span id="LOCATION_SPAN"></span>
function printPageLocation(){
	try 	{
		document.write(objFlashVars.getLocName());
	}	catch (e)	{
//		alert(e.message);
		return;
	}
}


//플래쉬에서 메뉴 클릭시 호출
function pageURL(i,j,k) {
//alert(i);
	try 	{
		var szHref = "page_" + i +"_"+ j +"_"+ k;
		var pageVal = eval(szHref);

		if (pageVal == "")
		{
			alert("서비스 준비중입니다.");		
		}
		//else if (pageVal == page_7_0_0)
		//{
		//	window.open(DEFAULT_HOME2+"/newsletter/newsletter.asp","newsletter","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=650,height=400");
		//}
		//else if (pageVal == page_4_0_0 || pageVal == page_4_1_0 || pageVal == page_4_2_0)
		//{
		//	window.location.href=DEFAULT_HOME2 + pageVal;
		//}
		else if (i >= 9)
		{
			window.open(pageVal);
		}
		else
//		
		{
//			alert("a");
//			alert(DEFAULT_HOME + pageVal);
//			location.href=DEFAULT_HOME + pageVal;
			window.location.href=DEFAULT_HOME + pageVal;
		}
	}	catch (e)	{
		alert(e.message);
	}
}

//플래쉬에서 메뉴 클릭시 호출(업로드 View Page에서...)
function upPageURL(i,j,k){

	try 	{
		var szHref = "page_" + i +"_"+ j +"_"+ k;
		var pageVal = eval(szHref);

		if (pageVal == "")
		{
			alert("서비스 준비중입니다.");		
		}
		else if (i >= 9)
		{
			window.open(pageVal);
		}
		else
		{
			window.location.href=DEFAULT_HOME + pageVal + "?tab=upload";
		}
	}	catch (e)	{
		alert(e.message);
	}
}

// 플래쉬 메뉴 표시
function flash_xmlmenu_write(strSrc, strW, strH, kind) {
	var	numA = 0;  
	var	numB = 0;
	var	numC = 0;  

	try 				{
		if (typeof(objFlashVars) == "object") {
			numA  = objFlashVars.getNumA();			//1depth No
			numB  = objFlashVars.getNumB();			//2depth No
			numC  = objFlashVars.getNumC();			//3depth No	
		}
	}		catch (e)	{
			numA = 0;  
			numB = 0;
			numC = 0;  
	}

	strSrc += "?numA=" + numA + "&numB=" + numB + "&numC=" + numC;
	document.write('<Object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" WIDTH="'+strW+'" HEIGHT="'+strH+'" id="flash' + kind + '" ALIGN="">');
	document.write('<PARAM NAME=movie VALUE="'+strSrc+'"> ');
	document.write('<PARAM NAME=menu VALUE=false> ');
	document.write('<PARAM NAME=quality VALUE=high> ');
	document.write('<PARAM NAME=wmode VALUE=transparent> ');
	document.write('<PARAM NAME=bgcolor VALUE=#CCCCCC> ');
	document.write('<PARAM NAME=allowScriptAccess VALUE=always> ');
	document.write('<EMBED src="'+strSrc+'" menu=false quality=high wmode=transparent bgcolor=#CCCCCC  WIDTH="'+strW+'" HEIGHT="'+strH+'" NAME="company_flash_sub_v1" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always"></EMBED>');
	document.write('</OBJECT>');
}

//============================================================================
//	AUTHOR : 허정호
// DATE				: 09.12.10
// DESCRIPTION	: subContents에서 플래쉬를 로딩한다.
// lo: source url
// w: source width
// h: source height
// t: wmode ("" none, transparent, opaque ...)

function view_flash1(url,width,height,t)
{
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='" + width + "' height='" + height + "'>");
	document.write("<param name='movie' value='" + url + "'>");
	document.write("<param name='wmode' value='" + t + "'>");
	document.write("<param name='quality' value='high'>");
	document.write("<embed src='" + url + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "' Wmode='"+t+"'></embed></object>");
}


//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.18
// DESCRIPTION : Menu URL Link

function go_leo(go){
	var go;

	if(go == "home"){location.href="http://www.leoinnovision.com";}														
	else if(go == "siteguide"){pageURL('0', '1', '0');}
	else if(go == "contact"){pageURL('0', '2', '0');}

	else if(go == "vision"){pageURL('1', '1', '0');}

	else if(go == "history"){pageURL('1', '2', '0');}
	else if (go == "structure"){pageURL('1', '3', '0');}
	else if(go == "ceo"){pageURL('1', '4', '0');}
	else if(go == "map"){pageURL('1', '5', '0');}

	else if(go == "sci"){pageURL('2', '1', '0');}
	else if(go == "part"){pageURL('2', '2', '0');}
	else if(go == "market"){pageURL('2', '3', '0');}
	else if(go == "guide"){pageURL('2', '4', '0');}

	else if(go == "connector"){pageURL('2', '5', '0');}	

	else if(go == "sciBoard1"){pageURL('2', '6', '0');}
	//	군수지원에서 게시판
	else if(go == "uploadSci1"){upPageURL('2', '6', '0');}

	else if(go == "sol"){pageURL('3', '1', '0');}
	else if(go == "pbl"){pageURL('3', '2', '0');}
	else if(go == "smart01"){pageURL('3', '2', '2');}
	else if(go == "smart02"){pageURL('3', '2', '3');}
	else if(go == "solve"){pageURL('3', '3', '0');}
	else if(go == "app01"){pageURL('3', '3', '2');}
	else if(go == "app02"){pageURL('3', '3', '3');}
	else if(go == "solBoard1"){pageURL('3', '4', '0');}
	//단종솔루션에서 게시판
	else if(go == "uploadSol1"){upPageURL('3', '4', '0');}

	else if(go == "uav"){pageURL('4', '1', '0');}
	else if(go == "raven"){pageURL('4', '2', '0');}
	else if(go == "wasp"){pageURL('4', '3', '0');}
	else if(go == "go"){pageURL('4', '4', '0');}
	else if(go == "uavBoard1"){pageURL('4', '5', '0');}
	//무인정찰기에서 게시판
	else if(go == "uploadUav1"){upPageURL('4', '5', '0');}

	else if(go == "newsBoard"){pageURL('5', '1', '0');}
	else if(go == "sciBoard"){pageURL('5', '2', '0');}
	else if(go == "solBoard"){pageURL('5', '3', '0');}
	else if(go == "uavBoard"){pageURL('5', '4', '0');}

	//업로드 상세페이지에서 클릭시
	else if(go == "uploadNews"){upPageURL('5', '1', '0');}
	else if(go == "uploadSci"){upPageURL('5', '2', '0');}
	else if(go == "uploadSol"){upPageURL('5', '3', '0');}
	else if(go == "uploadUav"){upPageURL('5', '4', '0');}

/*	else if(go == "newsBoard"){location.href='./leoNews_boardList.asp?page=newsBoard'; }
	else if(go == "sciBoard"){ location.href='./leoSci_boardList.asp?page=sciBoard'; }
	else if(go == "solBoard"){location.href='./leoSol_boardList.asp?page=solBoard'; }
	else if(go == "uavBoard"){location.href='./leoUav_boardList.asp?page=uavBoard'; }
*/

//	else if(go == "eng"){ location.href='http://www.leoinnovision.com/eng';}
	else if(go == "eng"){alert('Service is getting ready.');}
	else{alert("서비스 준비중입니다.");}
}

//============================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.30
//  DESCRIPTION : Top Navigation
//	use Function : ReadCookie(), SaveCookie(), RefreshStaticMenu(), ToggleAnimate(), InitializeStaticMenu(), 

//var stmnLEFT = 400; // 왼쪽 여백 (메뉴가 왼쪽에서 10픽셀 떨어진 곳에 보여집니다) 
//var stmnGAP1 = 10; // 위쪽 여백 (메뉴가 위에서 10픽셀 떨어진 곳에 보여집니다) 
//var stmnGAP2 = 10; // 스크롤시 브라우저 위쪽과 떨어지는 거리 
//var stmnBASE = 150; // 스크롤 시작위치 

var stmnLEFT = 1000; // 왼쪽 여백 (메뉴가 왼쪽에서 10픽셀 떨어진 곳에 보여집니다) 
var stmnGAP1 = 300; // 위쪽 여백 (메뉴가 위에서 10픽셀 떨어진 곳에 보여집니다) 
var stmnGAP2 = 200; // 스크롤시 브라우저 위쪽과 떨어지는 거리 
var stmnBASE = 300; // 스크롤 시작위치 
var stmnActivateSpeed = 200; 
var stmnScrollSpeed = 10; 

var stmnTimer; 

function ScrollTOP() {
    window.scrollTo(0,0);
}

function ReadCookie(name){ 
	var label = name + "="; 
	var labelLen = label.length; 
	var cLen = document.cookie.length; 
	var i = 0; 

	while (i < cLen) { 
					var j = i + labelLen; 

					if (document.cookie.substring(i, j) == label) { 
									var cEnd = document.cookie.indexOf(";", j); 
									if (cEnd == -1) cEnd = document.cookie.length; 

									return unescape(document.cookie.substring(j, cEnd)); 
					} 

					i++; 
	} 

	return ""; 
} 

function SaveCookie(name, value, expire){ 
	var eDate = new Date(); 
	eDate.setDate(eDate.getDate() + expire); 
	document.cookie = name + "=" + value + "; expires=" +  eDate.toGMTString()+ "; path=/"; 
	} 

	function RefreshStaticMenu() 
	{ 
	var stmnStartPoint, stmnEndPoint, stmnRefreshTimer; 

	stmnStartPoint = parseInt(STATICMENU.style.top, 10); 
	stmnEndPoint = document.body.scrollTop + stmnGAP2; 
	if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1; 

	stmnRefreshTimer = stmnActivateSpeed; 

	if ( stmnStartPoint != stmnEndPoint ) { 
					stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 ); 
					STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount ); 
					stmnRefreshTimer = stmnScrollSpeed; 
	} 

	stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer); 
} 

function ToggleAnimate(){ 
	if (ANIMATE.checked) { 
					RefreshStaticMenu(); 
					SaveCookie("ANIMATE", "true", 300); 
	} 
	else { 
					clearTimeout(stmnTimer); 
					STATICMENU.style.top = stmnGAP1; 
					SaveCookie("ANIMATE", "false", 300); 
	} 
} 

function InitializeStaticMenu(){ 
	STATICMENU.style.left = stmnLEFT; 

			 if (ReadCookie("ANIMATE") == "false") { 
					ANIMATE.checked = false; 
					STATICMENU.style.top = document.body.scrollTop + stmnGAP1; 
	} 
	else { 
					ANIMATE.checked = true; 
					STATICMENU.style.top = document.body.scrollTop + stmnBASE; 
					RefreshStaticMenu(); 
	}	
} 


//============================================================================
//	AUTHOR : 허정호
// DATE				: 09.12.11
// DESCRIPTION	: iframe 높이 자동 조절 함수

function resizeHeight(fr){
	fr = typeof fr == 'string' ? document.getElementById(fr) : fr;
	fr.setExpression('height', subContent.document.body.scrollHeight);
}

//============================================================================
//	AUTHOR : 허정호
// DATE				: 09.12.10
// DESCRIPTION	: 플래쉬를 로딩한다.
// lo: source url
// w: source width
// h: source height
// t: wmode ("" none, transparent, opaque ...)

function view_flash(url,width,height,t)
{
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='" + width + "' height='" + height + "'>");
	document.write("<param name='movie' value='" + url + "'>");
	document.write("<param name='wmode' value='" + t + "'>");
	document.write("<param name='quality' value='high'>");
	document.write("<embed src='" + url + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "' Wmode='"+t+"'></embed></object>");
}

//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.17
// DESCRIPTION : Contact Us 유효검사

function chk_contactUs(){

	if(document.contactus.last_name.value == ""){
		alert("성을 입력해 주세요.");
		document.contactus.last_name.focus();
		return false;
	};

	if(document.contactus.first_name.value == ""){
		alert("이름을 입력해 주세요.");
		document.contactus.first_name.focus();
		return false;
	};

	if(document.contactus.company.value == ""){
		alert("회사명/직위를 입력해 주세요.");
		document.contactus.company.focus();
		return false;
	};

	if(document.contactus.email.value == ""){
		alert("이메일을 입력해 주세요.");
		document.contactus.email.focus();
		return false;
	};

	if(document.contactus.subject.value == ""){
		alert("제목을 입력해 주세요.");
		document.contactus.subject.focus();
		return false;
	};
	
}

//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.17
// DESCRIPTION : 행 추가

function addRow() {
	var oRow = frmRFQ.insertRow();
	oRow.onmouseover=function(){frmRFQ.clickedRowIndex=this.rowIndex};
	var oCell1 = oRow.insertCell();
	var oCell2 = oRow.insertCell();
	var oCell3 = oRow.insertCell();
	var oCell4 = oRow.insertCell();
	var oCell5 = oRow.insertCell();

	document.frm.totalNumber.value =  frmRFQ.rows.length - 1;
	//alert(document.frm.totalNumber.value);

	oCell1.innerHTML = "<CENTER><INPUT name='part_n1' type='text' style='width:95%; height:19; background-color:white ;border:1 solid  #DEDEDE; font-family:돋움,돋움체,arial,verdana; font-size:10pt;' size='42'></CENTER>";
	oCell2.innerHTML = "<CENTER><INPUT name='desc1'  type='text' style='width:95%; height:19; background-color:white ;border:1 solid  #DEDEDE; font-family:돋움,돋움체,arial,verdana; font-size:10pt;' size='42'></CENTER>";
	oCell3.innerHTML = "<CENTER><INPUT name='qty1' type='text' style='width:95%; height:19; background-color:white ;border:1 solid  #DEDEDE; font-family:돋움,돋움체,arial,verdana; font-size:10pt;' size='42'></CENTER>";
	oCell4.innerHTML = "<CENTER><INPUT name='uploadFile' type='file' onchange='submitForm(this);' style='width:95%; height:19;' size='42'></CENTER>";
	oCell5.innerHTML = "<CENTER><IMG src='./sci/images/wg_form_100.png' name='frmRFQ_delRow' width='18' height='17' onClick='delRow();'></CENTER>";

	document.recalc();
}


//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.17
// DESCRIPTION : 행 삭제

function delRow() {
	frmRFQ.deleteRow(frmRFQ.clickedRowIndex);
	document.frm.totalNumber.value =  frmRFQ.rows.length - 1;
	//alert(document.frm.totalNumber.value);
}


//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.17
// DESCRIPTION : 업로드 파일 확장자 체크 및 전송 함수
function submitForm(frmValue){
	var filepath = frmValue.value;
	var filename=("file:///"+filepath.replace(/ /gi,"%20").replace(/\\/gi,"/")).split("/");
	var extname2 = filename[filename.length-1].split(".")
	var extname = extname2[extname2.length-1].toLowerCase();

	if (extname == "zip") return true;
	else if (extname == "txt") return true;
	else if (extname == "pdf") return true;
	else if (extname == "jpg") return true;
	else if (extname == "gif") return true;
	else if (extname == "bmp") return true;
	else if (extname == "hwp") return true;
	else if (extname == "doc") return true;
	else {
//			alert("Please check the file extension.");
		alert("파일 확장자를 확인해 주세요.\n\n[zip,txt,pdf,jpg,gif,bmp,hwp,doc 파일만 가능합니다.]");
		document.frm.reset();
		return false;
	}
}



//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.17
// DESCRIPTION : 견적 요청 유효 검사

function chk_WaveGuide(){
	if(document.frm.first_name.value == ""){
		alert("담당자명을 입력해주세요.");
		document.frm.first_name.focus();
		return false;
	}

	if(document.frm.company.value == ""){
		alert("회사명을 입력해주세요.");
		document.frm.company.focus();
		return false;
	}

	if(document.frm.email.value == ""){
		alert("이메일을 입력해주세요.");
		document.frm.email.focus();
		return false;
	}

	if(document.frm.phone.value == ""){
		alert("전화번호를 입력해주세요.");
		document.frm.phone.focus();
		return false;
	}
	
	if(document.frm.part_n1.value == ""){
		alert("견적요청 정보의 제품번호를 입력해주세요");
		document.frm.part_n1.focus();
		return false;
	}

	if(document.frm.desc1.value == ""){
		alert("견적요청 정보의 사양 및 부가설명을 입력해주세요.");
		document.frm.desc1.focus();
		return false;
	}

	if(document.frm.qty1.value == "" || document.frm.qty1.value == "0"){
		alert("견적요청 정보의 수량을 입력해주세요");
		document.frm.qty1.focus();
		return false;
	}

}



//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.18
// DESCRIPTION : 검색 유효 검사

function leo_boardSearch(form){

	var form, i;
	var sword = form.keyWord.value;
		
	if (sword == ""){
		alert("검색단어를 입력해주세요.");
		form.keyWord.focus();
		return false;
	}

	for(i=0;i<sword.length;i++){
	/*	검색 단어 길이 검사는 한자리 이상으로...*/
	if(sword.length>0 && sword.length<3){
			alert("모든 키워드는 2자 이상 입력해 주세요.");
			form.keyWord.focus();
			form.keyWord.select();
			return false;
		}

	//키워드 특수문자 체크
		ret = sword.charCodeAt(i);	 //	 -- 특수 기호 제어 ' - ' : 45, '*' : 42	 은 제외
		if ((ret<10)||(ret>10&&13>ret)||(ret>13&&ret<32)||(ret>32&&ret<42)||(ret<44&&ret>42)||(ret>57&&ret<65)||(ret>90&&ret<95)||(ret>95&&ret<97)||(ret>122&&ret<181)||(ret>182&&ret<955)||(ret>956&&ret<12592)){
			alert("문자와 숫자만 입력 가능합니다.");
			form.keyWord.focus();
			form.keyWord.select();
			return false;
		}
	}
}

//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.19
// DESCRIPTION : 검색 유효 검사

function resultProcess(form, type){
	var form;
	var type;
	
	if(form.writeTitle.value == ""){
		alert("Title을 입력해 주세요.");
		form.writeTitle.focus();
		return false;
	}
	
	if(form.writeContents.value == ""){
		alert("Contents를 입력해 주세요.");
		form.writeContent.focus();
		return false;
	}

/*
	if(form.file.value == ""){
		alert("파일을 선택해주세요.");
		form.file.focus();
		return false;
	}

	if(type == "notice"){
		if(form.writeContents.value == ""){
			alert("Contents를 입력해 주세요.");
			form.writeTitle.focus();
			return false;
		}
	}	
*/
}

//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.27
// DESCRIPTION : password 유효검사

function passCheck(form){
	var form;

	if(form.passBtn.value == ""){
		alert("PASSWORD를 입력해 주세요.");
		form.passBtn.focus();
		return false;
	}
}

//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.27
// DESCRIPTION : 삭제 경고 함수

function boardDel(kind, num){
var num;
var kind;

	if(confirm("정말 삭제하시겠습니까?")){
		location.href='./Leo_boardDelProcess.asp?num='+num+"&kind="+kind;
	}
}


//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.14
// DESCRIPTION : score 탭 버튼 액션

function scoreTabOnOff(btn){
	var btn;		//	태그 아이디

	if(btn == "pbl_score01"){

		//	탭 이미지
		document.getElementById(btn).style.backgroundImage = 'url(../images/03sol_pbl_score_over_01.png)';
		document.getElementById("pbl_score02").style.backgroundImage = 'url(../images/03sol_pbl_score_out_02.png)';
		document.getElementById("pbl_score03").style.backgroundImage = 'url(../images/03sol_pbl_score_out_03.png)';
		document.getElementById("pbl_score04").style.backgroundImage = 'url(../images/03sol_pbl_score_out_04.png)';
		document.getElementById("pbl_score05").style.backgroundImage = 'url(../images/03sol_pbl_score_out_05.png)';

		//	탭 내용
		document.getElementById("score_supply").style.display= "block";
		document.getElementById("scrore_cots").style.display= "none";
		document.getElementById("scrore_obsolescence").style.display= "none";
		document.getElementById("scrore_readiness").style.display= "none";
		document.getElementById("scrore_end").style.display= "none";
	}else if(btn == "pbl_score02"){
		//	탭 이미지
		document.getElementById("pbl_score01").style.backgroundImage = 'url(../images/03sol_pbl_score_out_01.png)';
		document.getElementById(btn).style.backgroundImage = 'url(../images/03sol_pbl_score_over_02.png)';
		document.getElementById("pbl_score03").style.backgroundImage = 'url(../images/03sol_pbl_score_out_03.png)';
		document.getElementById("pbl_score04").style.backgroundImage = 'url(../images/03sol_pbl_score_out_04.png)';
		document.getElementById("pbl_score05").style.backgroundImage = 'url(../images/03sol_pbl_score_out_05.png)';

		//	탭 내용
		document.getElementById("score_supply").style.display= "none";
		document.getElementById("scrore_cots").style.display= "block";
		document.getElementById("scrore_obsolescence").style.display= "none";
		document.getElementById("scrore_readiness").style.display= "none";
		document.getElementById("scrore_end").style.display= "none";
	}else if(btn == 'pbl_score03'){
		//	탭 이미지
		document.getElementById("pbl_score01").style.backgroundImage = 'url(../images/03sol_pbl_score_out_01.png)';
		document.getElementById("pbl_score02").style.backgroundImage = 'url(../images/03sol_pbl_score_out_02.png)';
		document.getElementById(btn).style.backgroundImage = 'url(../images/03sol_pbl_score_over_03.png)';
		document.getElementById("pbl_score04").style.backgroundImage = 'url(../images/03sol_pbl_score_out_04.png)';
		document.getElementById("pbl_score05").style.backgroundImage = 'url(../images/03sol_pbl_score_out_05.png)';

		//	탭 내용
		document.getElementById("score_supply").style.display= "none";
		document.getElementById("scrore_cots").style.display= "none";
		document.getElementById("scrore_obsolescence").style.display= "block";
		document.getElementById("scrore_readiness").style.display= "none";
		document.getElementById("scrore_end").style.display= "none";
	}else if(btn == 'pbl_score04'){
		//	탭 이미지
		document.getElementById("pbl_score01").style.backgroundImage = 'url(../images/03sol_pbl_score_out_01.png)';
		document.getElementById("pbl_score02").style.backgroundImage = 'url(../images/03sol_pbl_score_out_02.png)';
		document.getElementById("pbl_score03").style.backgroundImage = 'url(../images/03sol_pbl_score_out_03.png)';
		document.getElementById(btn).style.backgroundImage = 'url(../images/03sol_pbl_score_over_04.png)';
		document.getElementById("pbl_score05").style.backgroundImage = 'url(../images/03sol_pbl_score_out_05.png)';

		//	탭 내용
		document.getElementById("score_supply").style.display= "none";
		document.getElementById("scrore_cots").style.display= "none";
		document.getElementById("scrore_obsolescence").style.display= "none";
		document.getElementById("scrore_readiness").style.display= "block";
		document.getElementById("scrore_end").style.display= "none";
	}else if(btn == 'pbl_score05'){
		//	탭 이미지
		document.getElementById("pbl_score01").style.backgroundImage = 'url(../images/03sol_pbl_score_out_01.png)';
		document.getElementById("pbl_score02").style.backgroundImage = 'url(../images/03sol_pbl_score_out_02.png)';
		document.getElementById("pbl_score03").style.backgroundImage = 'url(../images/03sol_pbl_score_out_03.png)';
		document.getElementById("pbl_score04").style.backgroundImage = 'url(../images/03sol_pbl_score_out_04.png)';
		document.getElementById(btn).style.backgroundImage = 'url(../images/03sol_pbl_score_over_05.png)';

		//	탭 내용
		document.getElementById("score_supply").style.display= "none";
		document.getElementById("scrore_cots").style.display= "none";
		document.getElementById("scrore_obsolescence").style.display= "none";
		document.getElementById("scrore_readiness").style.display= "none";
		document.getElementById("scrore_end").style.display= "block";
	}
}

//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.15
// DESCRIPTION : 단종관리 탭 버튼 액션

function solveTabOnOff(btn){
	var btn;	//	태그 아이디
	
	if(btn == "solve_tab01"){
		
		//	LEFT MENU IMAGE
		document.getElementById('leftMenu_pbl').style.backgroundImage = 'url(./sol/images/solution_rollout_02.png)';
		document.getElementById('leftMenu_smart01').style.backgroundImage = 'url(./sol/images/solution_rollout_03.png)';
		document.getElementById('leftMenu_smart02').style.backgroundImage = 'url(./sol/images/solution_rollout_04.png)';
		document.getElementById('leftMenu_solve').style.backgroundImage = 'url(./sol/images/solution_rollover_06.png)';
		document.getElementById('leftMenu_app01').style.backgroundImage = 'url(./sol/images/solution_rollout_07.png)';
		document.getElementById('leftMenu_app02').style.backgroundImage = 'url(./sol/images/solution_rollout_04.png)';
		document.getElementById('leftMenu_solBoard').style.backgroundImage = 'url(./sol/images/soloution_rollout_06.png)';

		//	탭 이미지
		document.getElementById(btn).style.backgroundImage = 'url(./sol/images/03sol_leoparts_tab01_over.png)';
		document.getElementById("solve_tab02").style.backgroundImage = 'url(./sol/images/03sol_leoparts_tab02_out.png)';
		document.getElementById("solve_tab03").style.backgroundImage = 'url(./sol/images/03sol_leoparts_tab03_out.png)';

		//	탭 내용
		document.getElementById("solve_01").style.display= "block";
		document.getElementById("solve_02").style.display= "none";
		document.getElementById("solve_03").style.display= "none";
	}else if(btn == "solve_tab02"){

		//	LEFT MENU IMAGE
		document.getElementById('leftMenu_pbl').style.backgroundImage = 'url(./sol/images/solution_rollout_02.png)';
		document.getElementById('leftMenu_smart01').style.backgroundImage = 'url(./sol/images/solution_rollout_03.png)';
		document.getElementById('leftMenu_smart02').style.backgroundImage = 'url(./sol/images/solution_rollout_04.png)';
		document.getElementById('leftMenu_solve').style.backgroundImage = 'url(./sol/images/solution_rollout_06.png)';
		document.getElementById('leftMenu_app01').style.backgroundImage = 'url(./sol/images/solution_rollover_07.png)';
		document.getElementById('leftMenu_app02').style.backgroundImage = 'url(./sol/images/solution_rollout_04.png)';
		document.getElementById('leftMenu_solBoard').style.backgroundImage = 'url(./sol/images/soloution_rollout_06.png)';

		//	탭 이미지
		document.getElementById("solve_tab01").style.backgroundImage = 'url(./sol/images/03sol_leoparts_tab01_out.png)';
		document.getElementById(btn).style.backgroundImage = 'url(./sol/images/03sol_leoparts_tab02_over.png)';
		document.getElementById("solve_tab03").style.backgroundImage = 'url(./sol/images/03sol_leoparts_tab03_out.png)';

		//	탭 내용
		document.getElementById("solve_01").style.display= "none";
		document.getElementById("solve_02").style.display= "block";
		document.getElementById("solve_03").style.display= "none";
	}else if(btn == "solve_tab03"){

		//	LEFT MENU IMAGE
		document.getElementById('leftMenu_pbl').style.backgroundImage = 'url(./sol/images/solution_rollout_02.png)';
		document.getElementById('leftMenu_smart01').style.backgroundImage = 'url(./sol/images/solution_rollout_03.png)';
		document.getElementById('leftMenu_smart02').style.backgroundImage = 'url(./sol/images/solution_rollout_04.png)';
		document.getElementById('leftMenu_solve').style.backgroundImage = 'url(./sol/images/solution_rollout_06.png)';
		document.getElementById('leftMenu_app01').style.backgroundImage = 'url(./sol/images/solution_rollout_07.png)';
		document.getElementById('leftMenu_app02').style.backgroundImage = 'url(./sol/images/solution_rollover_04.png)';
		document.getElementById('leftMenu_solBoard').style.backgroundImage = 'url(./sol/images/soloution_rollout_06.png)';

		//	탭 이미지
		document.getElementById("solve_tab01").style.backgroundImage = 'url(./sol/images/03sol_leoparts_tab01_out.png)';
		document.getElementById("solve_tab02").style.backgroundImage = 'url(./sol/images/03sol_leoparts_tab02_out.png)';
		document.getElementById(btn).style.backgroundImage = 'url(./sol/images/03sol_leoparts_tab03_over.png)';

		//	탭 내용
		document.getElementById("solve_01").style.display= "none";
		document.getElementById("solve_02").style.display= "none";
		document.getElementById("solve_03").style.display= "block";
	}

}

//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.15
// DESCRIPTION : 단종관리솔루션 기능 탭 버튼 액션

function pblpTabOnOff(btn){
	var btn;		//	태그 아이디

	if(btn == "solve_pblp01"){

		//	탭 이미지
		document.getElementById(btn).style.backgroundImage = 'url(../images/03sol_leoparts_pblp_over_01.png)';
		document.getElementById("solve_pblp02").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_02.png)';
		document.getElementById("solve_pblp03").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_03.png)';
		document.getElementById("solve_pblp04").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_04.png)';

		//	탭 내용
		document.getElementById("solve_parts").style.display= "block";
		document.getElementById("solve_bom").style.display= "none";
		document.getElementById("solve_life").style.display= "none";
		document.getElementById("solve_procurement").style.display= "none";
	
	}else if(btn == "solve_pblp02"){
		//	탭 이미지
		document.getElementById("solve_pblp01").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_01.png)';
		document.getElementById(btn).style.backgroundImage = 'url(../images/03sol_leoparts_pblp_over_02.png)';
		document.getElementById("solve_pblp03").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_03.png)';
		document.getElementById("solve_pblp04").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_04.png)';

		//	탭 내용
		document.getElementById("solve_parts").style.display= "none";
		document.getElementById("solve_bom").style.display= "block";
		document.getElementById("solve_life").style.display= "none";
		document.getElementById("solve_procurement").style.display= "none";

	}else if(btn == 'solve_pblp03'){
		//	탭 이미지
		document.getElementById("solve_pblp01").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_01.png)';
		document.getElementById("solve_pblp02").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_02.png)';
		document.getElementById(btn).style.backgroundImage = 'url(../images/03sol_leoparts_pblp_over_03.png)';
		document.getElementById("solve_pblp04").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_04.png)';

		//	탭 내용
		document.getElementById("solve_parts").style.display= "none";
		document.getElementById("solve_bom").style.display= "none";
		document.getElementById("solve_life").style.display= "block";
		document.getElementById("solve_procurement").style.display= "none";

	}else if(btn == 'solve_pblp04'){
		//	탭 이미지
		document.getElementById("solve_pblp01").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_01.png)';
		document.getElementById("solve_pblp02").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_02.png)';
		document.getElementById("solve_pblp03").style.backgroundImage = 'url(../images/03sol_leoparts_pblp_out_03.png)';
		document.getElementById(btn).style.backgroundImage = 'url(../images/03sol_leoparts_pblp_over_04.png)';

		//	탭 내용
		document.getElementById("solve_parts").style.display= "none";
		document.getElementById("solve_bom").style.display= "none";
		document.getElementById("solve_life").style.display= "none";
		document.getElementById("solve_procurement").style.display= "block";
	}
}


//======================================================================
//	AUTHOR : 허정호
//	DATE : 2009.12.18
// DESCRIPTION : 뉴스 기사 탭 버튼 액션

function newsTabOnOff(btn){
	var btn;	//	태그 아이디

	if(btn == "news_tab01"){

		//	탭 이미지
		document.getElementById(btn).style.backgroundImage = 'url(../news/images/05news_tab01_over.png)';
		document.getElementById("news_tab02").style.backgroundImage = 'url(../news/images/05news_tab02_out.png)';

		//	탭 내용
		document.getElementById("news_01").style.display= "block";
		document.getElementById("news_02").style.display= "none";		

	}else if(btn == "news_tab02"){
		//	탭 이미지
		document.getElementById("news_tab01").style.backgroundImage = 'url(../news/images/05news_tab01_out.png)';
		document.getElementById(btn).style.backgroundImage = 'url(../news/images/05news_tab02_over.png)';

		//	탭 내용
		document.getElementById("news_01").style.display= "none";
		document.getElementById("news_02").style.display= "block";		
	}
}

//======================================================================
//	AUTHOR : 허정호
//	DATE : 2010.01.02
// DESCRIPTION : 새창 열기

function new_window(p){
	var p;

//	window.open(p,"new", "width=1024, height=768, left=30, top=30, scrollbars=no,titlebar=no,status=no,resizable=no,fullscreen=no");
	window.open(p,"", "");
}


function popup_movie(dir, width, height, auto){ 
	clientWidth = screen.width; 
	clientHeight = screen.height; 

	win = window.open("", "" , "width="+width+", height="+height+", scrollbars=no, resizable=no, left="+((clientWidth/2)-(width/2))+",top="+((clientHeight/2)-(height/2))+""); 
	win.document.writeln("<html>"); 
	win.document.writeln("<head>"); 
	win.document.writeln("<title>PLAY</title>"); 
	win.document.writeln("</head>"); 
	win.document.writeln("<body style = 'margin:0px;'>"); 
	win.document.writeln("<table border = '0' cellpadding = '0' cellspacing = '0'>"); 
	win.document.writeln(" <tr>"); 
	win.document.writeln(" <td align = 'center'><embed autostart = '"+auto+"' src = '"+dir+"' width = '"+width+"' height = '"+height+"' ShowControls = 'true' showstatusbar = '1' volume = '-1'></embed></td>"); 
	win.document.writeln(" </tr>"); 
	win.document.writeln("</table>"); 
	win.document.writeln("</body>"); 
	win.document.writeln("</html>"); 

}