/*firefox css plus start*/
var writeCode1;
var writeCode2;

writeCode1 = window.navigator.appName;
writeCode2 = window.navigator.appVersion;

if(writeCode1 == 'Netscape')
{
	document.write('<link rel="stylesheet" type="text/css" href="/_common/css/ff.css" />');
}
/*firefox css plus end*/

/*footer link*/
function footerMove(url)
{
	location.href = url;
}

/*ÁÂÃø Å¾¹öÆ°*/
/*flashLeftDiv start*/
var stmnLEFT = 0; // ¿ÞÂÊ ¿©¹é
var stmnGAP1 = 270; // left¸Þ´º À§ÂÊ ¿©¹é
var stmnGAP3 = 120; // top¹öÆ° À§ÂÊ ¿©¹é
var stmnGAP2 = 0; // ½ºÅ©·Ñ½Ã ºê¶ó¿ìÀú À§ÂÊ°ú ¶³¾îÁö´Â °Å¸®
var stmnBASE = 270; // ½ºÅ©·Ñ ½ÃÀÛÀ§Ä¡
var stmnActivateSpeed = 10;
var stmnScrollSpeed = 10;
var stmnTimer;

function RefreshStaticMenu1()
{
var stmnStartPoint1, stmnStartPoint2, stmnEndPoint1, stmnEndPoint2, stmnEndPoint3, stmnRefreshTimer;

stmnStartPoint1 = parseInt(document.getElementById('flashLeftDiv').style.top, 10);
stmnStartPoint2 = parseInt(document.getElementById('skyscraper2').style.top, 10);
stmnEndPoint1 = document.body.scrollTop + stmnGAP2;
stmnEndPoint2 = document.body.scrollTop + stmnGAP2;

//È­¸é ³Ñ¾î °¡´Â ºÎºÐ endpoint
stmnStartPoint3 = document.body.scrollTop + document.getElementById('flashImgDiv').clientHeight;
stmnEndPoint3 = document.getElementById('maeilSite').clientHeight;

if (stmnEndPoint1 < stmnGAP1) stmnEndPoint1 = stmnGAP1;
if (stmnEndPoint2 < stmnGAP3) stmnEndPoint2 = stmnGAP3;

stmnRefreshTimer = stmnActivateSpeed;

	if ( stmnStartPoint1 != stmnEndPoint1 && stmnStartPoint3 < stmnEndPoint3) {
					stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint1 - stmnStartPoint1 ) / 15 );
					document.getElementById('flashLeftDiv').style.top = parseInt(document.getElementById('flashLeftDiv').style.top, 10) + ( ( stmnEndPoint1<stmnStartPoint1 ) ? -stmnScrollAmount : stmnScrollAmount );
					stmnRefreshTimer = stmnScrollSpeed;
	}
	if(stmnStartPoint3 > stmnEndPoint3)
	{
		document.getElementById('flashLeftDiv').style.top = document.getElementById('maeilSite').clientHeight - document.getElementById('flashImgDiv').clientHeight - 80;
	}

	if ( stmnStartPoint2 != stmnEndPoint2 ) {
					stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint2 - stmnStartPoint2 ) / 15 );
					document.getElementById('skyscraper2').style.top = parseInt(document.getElementById('skyscraper2').style.top, 10) + ( ( stmnEndPoint2<stmnStartPoint2 ) ? -stmnScrollAmount : stmnScrollAmount );
					stmnRefreshTimer = stmnScrollSpeed;
	}

	//bg line
	if(stmnStartPoint1 != stmnEndPoint1)
	{
		stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint1 - stmnStartPoint1 ) / 15 );
		document.getElementById('flashLine').style.height = parseInt(document.getElementById('flashLeftDiv').style.top, 10) + ( ( stmnEndPoint1<stmnStartPoint1 ) ? -stmnScrollAmount : stmnScrollAmount ) + 50;
		stmnRefreshTimer = stmnScrollSpeed;
	}

	//alert(stmnRefreshTimer);

	stmnTimer = setTimeout ("RefreshStaticMenu1();", stmnRefreshTimer);

}
/*
var testSetTimeOutCount = 0;
function testSetTimeOut() {
	testSetTimeOutCount++;
	alert("testSetTimeOut È£Ãâ " + testSetTimeOutCount + " ¹øÂ°");
	setTimeout ("testSetTimeOut()", 1000);
}
testSetTimeOut();
*/

function InitializeStaticMenu(){

	document.getElementById('flashLeftDiv').style.top = document.body.scrollTop + stmnBASE;
	document.getElementById('skyscraper2').style.top = document.body.scrollTop + stmnBASE;
	RefreshStaticMenu1();
}

// Áö¿ªº°¼öÃâÇ°¸ñ
function viewProduct(val){

	document.getElementById('exportProduct1').style.display = 'none';
	document.getElementById('exportProduct2').style.display = 'none';
	document.getElementById('exportProduct3').style.display = 'none';
	document.getElementById('exportProduct4').style.display = 'none';

	document.getElementById('exportProduct'+val).style.display = 'block';
}

//var viewMemoSizeMax = 0;
/*»ó¼¼º¸±â ÅÇ ¸Þ¸ð Div Size*/
function viewMemoSize(div,num) {

	/*for (var i=0;i<=num;i++)
	{
		if(viewMemoSizeMax<document.getElementById(div+i).style.height) viewMemoSizeMax = document.getElementById(div+i).clientHeight;
	}
	for (var i=0;i<=num;i++)
	{
		document.getElementById(div+i).style.height = viewMemoSizeMax;
	}*/

	if(num>0)	var memoDiv1		= document.getElementById(div+'1');
	if(num>1)	var memoDiv2		= document.getElementById(div+'2');
	if(num>2)	var memoDiv3		= document.getElementById(div+'3');
	
	if(num>0){
		var memoDivHeight1	= memoDiv1.clientHeight;
		//if(memoDivHeight1>viewMemoSizeMax) viewMemoSizeMax = memoDivHeight1;
	}

	if(num>1){
		var memoDivHeight2	= memoDiv2.clientHeight;
		//if(memoDivHeight2>viewMemoSizeMax) viewMemoSizeMax = memoDivHeight2;
	}

	if(num>2){
		var memoDivHeight3	= memoDiv3.clientHeight;
		//if(memoDivHeight3>viewMemoSizeMax) viewMemoSizeMax = memoDivHeight3;
	}

	/*if(num>0)	memoDiv1.style.height = viewMemoSizeMax;
	if(num>1)	memoDiv2.style.height = viewMemoSizeMax;
	if(num>2)	memoDiv3.style.height = viewMemoSizeMax;*/
}
/*ÁÂÃø ¸Þ´º ³ôÀÌ °è»ê*/
function windowResizeHandler() {

	var leftHeight = document.getElementById('flashLeftDiv').clientHeight + stmnGAP1;
	var contHeight = document.getElementById('maeilContents').clientHeight + 141;

	if(leftHeight>contHeight) document.getElementById('maeilContents').style.height = leftHeight - 141;

	/*var conHeight = document.getElementById('maeilSite').clientHeight;
	var scrollHeight = document.body.scrollTop;
	var screenHeight = document.body.clientHeight;
	var banconHeight = conHeight / 2;

	if(document.getElementById('maeilContents').clientHeight < 680)
	{
		document.getElementById('maeilContents').style.height = 680;
		document.getElementById('flashLeftDiv').style.height = 680;
		document.getElementById('flashImgDiv').style.height = 680;
	}
	document.getElementById('flashLine').style.height = banconHeight;
	document.getElementById('flashLine').style.marginTop = banconHeight - 300;

	if(screenHeight + scrollHeight > conHeight)
	{
		return false;
	}
	else
	{
		document.getElementById('flashLeftDiv').style.height = document.body.clientHeight - 55;
		document.getElementById('flashImgDiv').style.height = document.getElementById('maeilContents').clientHeight + 350;

		document.getElementById('flashLine').style.height = document.getElementById('maeilSite').clientHeight / 2;
		document.getElementById('flashLine').style.marginTop = document.getElementById('maeilSite').clientHeight / 2 - 300;
	}*/
}
//window.onresize = windowResizeHandler;

// ÆË¾÷Ã¢ »çÀÌÁî ¸ÂÃß±â
function popupSize(obj){

	var objSize = document.getElementById(obj).clientHeight+80;

	
}

// ÅÇ ¹öÆ° ÀÌº¥Æ® #1
function tab1BtnOver(now,total,atag)
{
	for (i=1;i<=total;i++)
	{
		document.getElementById('tab1Left'+i).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab1_bg_01.gif)';
		document.getElementById('tab1Center'+i).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab1_bg_01.gif)';
		document.getElementById('tab1right'+i).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab1_bg_01.gif)';

		document.getElementById('tab1Link'+i).className = '';
	}

	document.getElementById('tab1Left'+now).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab1_01_over.gif)';
	document.getElementById('tab1Center'+now).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab1_bg_02.gif)';
	document.getElementById('tab1right'+now).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab1_02_over.gif)';

	document.getElementById('tab1Link'+now).className = 'select';
}

// ÅÇ ¹öÆ° ÀÌº¥Æ® #2
function tab2BtnOver(now,total,atag)
{
	for (i=1;i<=total;i++)
	{
		document.getElementById('tab2Left'+i).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab2_01.gif)';
		document.getElementById('tab2Center'+i).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab2_bg_01.gif)';
		document.getElementById('tab2right'+i).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab2_02.gif)';

		document.getElementById('tab2Memo'+i).style.display = 'none';

		document.getElementById('tab2Icon'+i).className = '';
		document.getElementById('tab2Link'+i).className = '';
	}

	document.getElementById('tab2Left'+now).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab2_01_over.gif)';
	document.getElementById('tab2Center'+now).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab2_bg_02.gif)';
	document.getElementById('tab2right'+now).style.backgroundImage = 'url(/media/imgs/layout/product/img_tab2_02_over.gif)';

	document.getElementById('tab2Memo'+now).style.display = 'block';

	document.getElementById('tab2Icon'+now).className = 'tab2IconOver';
	document.getElementById('tab2Link'+now).className = 'select';
}

// ÀÌ¹ÌÁö ÅÇ ¹öÆ° ÀÌº¥Æ® #2
function tab3BtnOver(now,over)
{
	if(over=='over')
	{
		document.getElementById('tab3Left'+now).className = 'select1';
		document.getElementById('tab3Center'+now).className = 'select2';
		document.getElementById('tab3right'+now).className = 'select3';

	}
	else
	{
		document.getElementById('tab3Left'+now).className = '';
		document.getElementById('tab3Center'+now).className = '';
		document.getElementById('tab3right'+now).className = '';
	}
}

// ÀÌ¹ÌÁö ÅÇ ¹öÆ° ÀÌº¥Æ® #Ãß¾ïÀÇ ÀÎ¼â±¤°í
function tab4BtnOver(now,first,total,over,divImg)
{
	var imgSrc1;
	var imgSrc2;
	var cutImgSrc;

	if(over=='over')
	{
		for(var i=1; i<=total ; i++)
		{
			document.getElementById('depth1Div'+i).style.display = 'none';
		}

		imgSrc1 = document.getElementById('tabMenu'+first).src;
		cutImgSrc = imgSrc1.split("_over.gif");
		imgSrc2 =  cutImgSrc[0]+'.gif';

		document.getElementById('tabMenu'+first).src = imgSrc2;

		document.getElementById('tabMenu'+now).src = '/media/eng'+ divImg +'_over.gif';

		document.getElementById('depth1Div'+now).style.display = 'block';
		

	}
	else
	{
		for(var i=1; i<=total ; i++)
		{
			document.getElementById('depth1Div'+i).style.display = 'none';
		}

		imgSrc1 = document.getElementById('tabMenu'+first).src;
		cutImgSrc = imgSrc1.split(".gif");
		imgSrc2 =  cutImgSrc[0]+'_over.gif';

		document.getElementById('tabMenu'+now).src = '/media/eng'+ divImg +'.gif';
		document.getElementById('tabMenu'+first).src = imgSrc2;
		document.getElementById('depth1Div'+first).style.display = 'block';
	}
}

// ÀÌ¹ÌÁö ·Ñ¿À¹ö
function imgOver(obj,imgUrl,imgName,over){

	if(over=='over')
	{
		obj.src = imgUrl + imgName + '_over.gif';
	}
	else
	{
		obj.src = imgUrl + imgName + '.gif';
	}
}

// °Ô½ÃÆÇ ·Ñ¿À¹ö½Ã »ö»ó º¯È­
function listImgBorder(obj){

	if(obj.className=='productImg')
	{
		obj.className = 'productImgOver';
	}
	else
	{
		obj.className = 'productImg';
	}
}
function listImgBorder1(obj,over){

	if(over == 'over')
	{
		obj.style.borderColor = '#00baf2';
	}
	else
	{
		obj.style.borderColor = '#84888b';
	}
}
function boardTrColor(ac,obj,cn){

	if(ac=='over')
	{
		if(cn)
		{
			obj.className = 'pointRowOver1';
		}
		else
		{
			obj.className = 'pointRowOver2';
		}
	}
	else
	{
		if(cn=='pointRowOver1')
		{
			obj.className = 'pointRow';
		}
		else
		{
			obj.className = '';
		}
	}
}

//»ùÇÃ½ÅÃ» »õÃ¢
function popupApplicationSample() {
	window.open ("http://www.urii.com/helpdesk/qna/question_add.jsp?bbsId=34","","");
}

//·Î±×ÀÎ ÆË¾÷
function popupLogin() {
	openWinCenter ("/member/member_login.jsp","popupLogin","width=450, height=300");
}

//ÇÁ·ÐÆ® ¸Þ´º ÀÌµ¿ ÇÔ¼ö
function goFrontMenu(menuCode) {
	var goUrl = "";
	switch (menuCode) {
		//Home
		case "EM000000" :
			goUrl = "/eng/home/";
			break;
		case "EM00000000" :
			goUrl = "/eng/home/";
			break;

		//About Maeil------------------------------------------------
		case "EM01000000" :		// CEO¡¯s Message
			goUrl = "/eng/about/ceo_message.jsp";
			break;
		case "EM01010000" :		// CEO¡¯s Message
			goUrl = "/eng/about/ceo_message.jsp";
			break;
		case "EM01020000" :		// Management Philosophy - Vision & Mission
			goUrl = "/eng/about/biz_vision.jsp";
			break;
		case "EM01020100" :		// Management Philosophy - Vision & Mission
			goUrl = "/eng/about/biz_vision.jsp";
			break;
		case "EM01020200" :		// Management Philosophy - Middle & Short Term Goal
			goUrl = "/eng/about/biz_goal.jsp";
			break;
		case "EM01030000" :		// History
			goUrl = "/eng/about/history.jsp";
			break;
		case "EM01040000" :		// Business Area - Products of Maeil
			goUrl = "/eng/about/work_product.jsp";
			break;
		case "EM01040100" :		// Business Area - Products of Maeil
			goUrl = "/eng/about/work_product.jsp";
			break;
		case "EM01040200" :		// Business Area - Maeil¡¯s Affiliated Company
			goUrl = "/eng/about/work_affiliate.jsp";
			break;
		case "EM01050000" :		// Global Maeil - submain
			goUrl = "/eng/about/world_main.jsp";
			break;
		case "EM01050100" :		// Global Maeil - Maeil's Export History
			goUrl = "/eng/about/world_exportHistory.jsp";
			break;
		case "EM01050200" :		// Global Maeil - Maeil's Export Status
			goUrl = "/eng/about/world_exportPresent.jsp";
			break;
		case "EM01050300" :		// Global Maeil - Contries & Products
			goUrl = "/eng/about/work_exportProduct.jsp";
			break;
		case "EM01050400" :		// Global Maeil - Technical Cooperation
			goUrl = "/eng/about/world_technicalHistory.jsp";
			break;
		case "EM01050500" :		// Global Maeil - MAEIL`S IMPORT BUSINESS
			goUrl = "/eng/about/import_business.jsp";
			break;
		case "EM01060000" :		// Corporate Identity - CI Introduction
			goUrl = "/eng/about/ci_introduce.jsp";
			break;
		case "EM01060100" :		// Corporate Identity - CI Introduction
			goUrl = "/eng/about/ci_introduce.jsp";
			break;
		case "EM01060200" :		// Corporate Identity - Identifier
			goUrl = "/eng/about/ci_identifier.jsp";
			break;
		case "EM01060300" :		// Corporate Identity - Usage Guide
			goUrl = "/eng/about/ci_guide.jsp";
			break;
		case "EM01070000" :		// Philanthropy
			goUrl = "/eng/about/philanthrop.jsp";
			break;
		case "EM01080000" :		// Maeil Central Research Laboratory
			goUrl = "/eng/about/research_center.jsp";
			break;
		case "EM01090000" :		// Factories
			goUrl = "/eng/about/manufacture_plant.jsp";
			break;
		//------------------------------------------------About Maeil

		//Investor Relations------------------------------------------------
		case "EM02000000" :		// Corporate Information - Businesses
			goUrl = "/eng/investor/biz_present.jsp";
			break;
		case "EM02010000" :		// Corporate Information - Businesses
			goUrl = "/eng/investor/biz_present.jsp";
			break;
		case "EM02010100" :		// Corporate Information - Businesses
			goUrl = "/eng/investor/biz_present.jsp";
			break;
		/*case "EM02010200" :		// Corporate Information - The Articles of Incorporation 
			goUrl = "/eng/investor/biz_statute_01.jsp";
			break;
		case "EM02010202" :		// Corporate Information - The Articles of Incorporation 
			goUrl = "/eng/investor/biz_statute_02.jsp";
			break;
		case "EM02010203" :		// Corporate Information - The Articles of Incorporation 
			goUrl = "/eng/investor/biz_statute_03.jsp";
			break;
		case "EM02010204" :		// Corporate Information - The Articles of Incorporation 
			goUrl = "/eng/investor/biz_statute_04.jsp";
			break;
		case "EM02010205" :		// Corporate Information - The Articles of Incorporation 
			goUrl = "/eng/investor/biz_statute_05.jsp";
			break;
		case "EM02010206" :		// Corporate Information - The Articles of Incorporation 
			goUrl = "/eng/investor/biz_statute_06.jsp";
			break;
		case "EM02010207" :		// Corporate Information - The Articles of Incorporation 
			goUrl = "/eng/investor/biz_statute_07.jsp";
			break;
		case "EM02010300" :		// Corporate Information - Board of Directors
			goUrl = "/eng/investor/biz_council.jsp";
			break; */
		case "EM02010200" :		// Corporate Information - Stockholders Composition
			goUrl = "/eng/investor/biz_stockholders.jsp";
			break;
		case "EM02010400" :		// Corporate Information - Organization
			goUrl = "/eng/investor/biz_organChart.jsp";
			break;
		case "EM02010500" :		// Corporate Information - Subsidiaries
			goUrl = "/eng/investor/biz_relationship_01.jsp";
			break;
		case "EM02010601" :		// Corporate Information - Subsidiaries
			goUrl = "/eng/investor/biz_relationship_01.jsp";
			break;
		case "EM02010602" :		// Corporate Information - Subsidiaries
			goUrl = "/eng/investor/biz_relationship_02.jsp";
			break;
		case "EM02010603" :		// Corporate Information - Subsidiaries
			goUrl = "/eng/investor/biz_relationship_03.jsp";
			break;
		case "EM02010604" :		// Corporate Information - Subsidiaries
			goUrl = "/eng/investor/biz_relationship_04.jsp";
			break;
		case "EM02010605" :		// Corporate Information - Subsidiaries
			goUrl = "/eng/investor/biz_relationship_05.jsp";
			break;
		case "EM02010606" :		// Corporate Information - Subsidiaries
			goUrl = "/eng/investor/biz_relationship_06.jsp";
			break;
		case "EM02020000" :		// Financial Information - Balance Sheet
			goUrl = "/eng/investor/fn_balanceSheet.jsp";
			break;
		case "EM02020100" :		// Financial Information - Balance Sheet
			goUrl = "/eng/investor/fn_balanceSheet.jsp";
			break;
		case "EM02020200" :		// Financial Information - Income Statement
			goUrl = "/eng/investor/fn_profitLoss.jsp";
			break;
		case "EM02020300" :		// Financial Information - Cash Flow Statement
			goUrl = "/eng/investor/fn_cashFlow.jsp";
			break;
		case "EM02020400" :		// Financial Information - BalanceDivisional Performance
			goUrl = "/eng/investor/fn_quarterStatement.jsp";
			break;
		case "EM02030000" :		// IR Activities - IR Information
			goUrl = "/eng/investor/ir_pds.jsp";
			break;
		case "EM02030100" :		// IR Activities - IR Information
			goUrl = "/eng/investor/ir_pds.jsp";
			break;
		//------------------------------------------------Investor Relations

		//Products------------------------------------------------
		case "EM03000000" :		// Baby Foods
			goUrl = "/eng/products/baby_foods.jsp";
			break;
		case "EM03010000" :		// Baby Foods
			goUrl = "/eng/products/baby_foods.jsp";
			break;
		case "EM03020000" :		// Milk
			goUrl = "/eng/products/milk.jsp";
			break;
		case "EM03030000" :		// Yogurts
			goUrl = "/eng/products/yogurts.jsp";
			break;
		case "EM03040000" :		// Beverage
			goUrl = "/eng/products/beverages.jsp";
			break;
		case "EM03050000" :		// Soybean milk
			goUrl = "/eng/products/soybean_milk.jsp";
			break;
		case "EM03060000" :		// Cheese
			goUrl = "/eng/products/cheese.jsp";
			break;
		case "EM03070000" :		// Nutritional Meals for the Pregnant
			goUrl = "/eng/products/pregnant.jsp";
			break;
		case "EM03080000" :		// Imported Products
			goUrl = "/eng/products/imported.jsp";
			break;
		case "EM03090000" :		// Oil Products
			goUrl = "/eng/products/oil.jsp";
			break;
		//------------------------------------------------Products

		//Press Center------------------------------------------------
		case "EM04000000" :		// Corporate Films 
			goUrl = "/eng/press/corporate_films.jsp";
			break;
		case "EM04010000" :		// Corporate Films 
			goUrl = "/eng/press/corporate_films.jsp";
			break;
		case "EM04020000" :		// Maeil Brochure 
			goUrl = "/eng/press/maeil_brochure.jsp";
			break;
		case "EM04030000" :		// TV CF
			goUrl = "/eng/press/tv_cf.jsp";
			break;
		//------------------------------------------------Press Center

		case "EM05000000" :		// Site Map
			goUrl = "/eng/utility/sitemap.jsp";
			break;
		case "EM05010000" :		// Site Map
			goUrl = "/eng/utility/sitemap.jsp";
			break;
		case "EM06000000" :		// Contact Us
			goUrl = "/eng/utility/contact_us.jsp";
			break;
		case "EM06010000" :		// Contact Us
			goUrl = "/eng/utility/contact_us.jsp";
			break;

		case "EM00000001" :		// KOREA
			window.open ("/", "", "");
			return;
		case "EM00000002" :		// CYBER FACTORY TOUR
			window.open ("/eng/about/pop_factory.jsp", "popup", "width=650, height=574");
			return;

		default :
			alert("ÁË¼ÛÇÕ´Ï´Ù.\n\nÆäÀÌÁö¸¦ ÁØºñÁßÀÔ´Ï´Ù. [" + menuCode + "]");
			return;
	}
	location.href = goUrl;
}

// ´Þ·Â
function showCalendar(kiki,div,y,m) {

	var now_date = new Date();
	var now_y = now_date.getFullYear();
	var now_m = now_date.getMonth()+1;
	var now_d = now_date.getDate();

	if(y<now_y)
	{
		alert('ÀÌ¹Ì Áö³­ ³âµµ ÀÔ´Ï´Ù.');
		document.getElementById(div).style.display='none';
	}
	if(y>now_y+1)
	{
		alert('´õÀÌ»ó ³âµµ¸¦ ³Ñ±æ¼ö ¾ø½À´Ï´Ù.');
		document.getElementById(div).style.display='none';
	}

	if(kiki!=1)
	{
		var y = now_y;
		var m = now_m;
		var d = now_d;
	}

	if(now_m==m)
	{
		var d = now_d;
	}

	var prev_m = m-1;
	var next_m = m+1;

	if(next_m==13)
	{

		next_m=1;
	}
	if(prev_m==0)
	{

		prev_m=12;
	}
	var eMon = new Array ("","Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec");

	//<p style="text-align:center;font-size:10px;font-weight:bold;font-family:tahoma;"><a href="javascript:showCalendar(1,\''+div+'\','+(m==1?(y-1)+','+12:y+','+(m-1))+')">¢¸</a> '+y+'&nbsp;&nbsp;<span style="font-size:16px;">'+m+'</span>&nbsp;&nbsp;'+eMon[m]+' <a href="javascript:showCalendar(1,\''+div+'\','+(m==12?(y+1)+','+1:y+','+(m+1))+')">¢º</a></p>';
	var text1	 = '<center><div style="width:100px;text-align:center">';
	text1		+= '	<p style="float:left;padding-top:2px;margin-top:5px;margin-right:3px;"><a href="javascript:showCalendar(1,\''+div+'\','+(m==1?(y-1)+','+12:y+','+(m-1))+')"><img src="/media/imgs/layout/table/ico_arr_01.gif" /></a></p>';
	text1		+= '	<p style="float:left;margin-top:5px;margin-right:5px;text-align:center;font-size:10px;font-weight:bold;font-family:tahoma;">'+y+'</p>';
	text1		+= '	<p style="float:left;width:25px;text-align:center;font-size:18px;font-weight:bold;font-family:tahoma;">'+m+'</p>';
	text1		+= '	<p style="float:right;padding-top:2px;margin-top:5px;margin-left:3px;"><a href="javascript:showCalendar(1,\''+div+'\','+(m==12?(y+1)+','+1:y+','+(m+1))+')"><img src="/media/imgs/layout/table/ico_arr_02.gif" /></a></p>';
	text1		+= '	<p style="float:right;margin-top:5px;text-align:center;font-size:10px;font-weight:bold;font-family:tahoma;">'+eMon[m]+'</p>';
	text1		+= '</div></center>';
    text1		+= '<table cellspacing="1" cellpadding="0" width="209" align="center">';
	text1		+= '<tr align="center">';
	text1		+= '	<td width="29" height="19" style="font-size:10px;font-family:tahoma;color:#ffffff;background-color:#ff7e47">SUN</td>';
	text1		+= '	<td width="29" style="font-size:10px;font-family:tahoma;color:#ffffff;background-color:#cbd1d6">MON</td>';
	text1		+= '	<td width="29" style="font-size:10px;font-family:tahoma;color:#ffffff;background-color:#cbd1d6">TUE</td>';
	text1		+= '	<td width="29" style="font-size:10px;font-family:tahoma;color:#ffffff;background-color:#cbd1d6">WED</td>';
	text1		+= '	<td width="29" style="font-size:10px;font-family:tahoma;color:#ffffff;background-color:#cbd1d6">THU</td>';
	text1		+= '	<td width="29" style="font-size:10px;font-family:tahoma;color:#ffffff;background-color:#cbd1d6">FRI</td>';
	text1		+= '	<td width="29" style="font-size:10px;font-family:tahoma;color:#ffffff;background-color:#cbd1d6">SAT</td>';

	var text2 = '</tr></table>';

    var d1 = (y+(y-y%4)/4-(y-y%100)/100+(y-y%400)/400 +m*2+(m*5-m*5%9)/9-(m<3?y%4||y%100==0&&y%400?2:3:4))%7;

	for (i = 0; i < 42; i++) {
        if (i%7==0)
		{
			text1 += '</tr>\n<tr>';
		}

		var check;

		if(i%7)
		{
			if (i==d+3)
			{
				check = 'class="today"';
			}
			else
			{
				check = '';
			}
		}

        if (i < d1 || i >= d1+(m*9-m*9%8)/8%2+(m==2?y%4||y%100==0&&y%400?28:29:30))
		{
            text1 += '<td height="19" align="center" style="background-color:#faf9fa"> </td>';
		}
		else
		{
            text1 += '<td height="19" onmouseover="this.style.backgroundColor=\'#231f20\'" onmouseout="this.style.backgroundColor=\'#faf9fa\'" style="cursor:hand;font-size:9px;font-family:tahoma;background-color:#faf9fa" align="center" '+check+' onclick="javascript:calendarClick('+y+','+m+','+(i+1-d1)+',\''+div+'\')" >' + (i+1-d1) + '</td>';
		}
    }
    document.getElementById(div).innerHTML = text1 + text2;
}
function calendarClick(y,m,d,div){

	var now_date = new Date();

	//if(div == 'calendarDiv1') searchFrom.searchDate1.value=y+'-'+m+'-'+d;
	var frm = window.document.forms["frmMeetingRequest"];

	frm.meeting_year.selectedIndex = y - now_date.getFullYear();
	frm.meeting_month.selectedIndex = m-1;
	frm.meeting_day.selectedIndex = d-1;

	document.getElementById(div).style.display='none';
}

function goPage(page) {
	var f=window.document.forms["frmPaging"];
	f.intPage.value = page;
	f.submit();
}
function goList() {
	var f=window.document.forms["frmPaging"];
	f.intPage.value = "1";
	f.searchField.value = "";
	f.searchWord.value = "";
	f.submit();
}
function goSearch() {
	var f=window.document.forms["frmBoardSearch"];
	if (checkSerchWord(f.searchWord)) {
		f.intPage.value = "1";
		f.submit();
	}
}

//Active Designer ¿¡µðÅÍ Ãâ·Â (ÇÁ·ÐÆ®¿ë ¾²±âÆû / ÆÄÀÏÃ·ºÎ ºÒ°¡)
function showFrontWriteWebEditor(editorID, width, height) {
	var clsid =  "6C3894B9-2EFA-45ce-AEF0-E458B845E0AD";
	var version = "2,5,1,22";
	var cab = "/_common/tweditor/tweditor.cab";
	var env = "/_common/tweditor/front_env.xml";
	var applyinitdata = 1;//apply:1
	var editmode = 0;//edit:0

	var key = "NkVERkJGNEVGQkU5QTgzMTIyMEIwQUQ2OUVDNTZBODNGMjRERDdDOTdEMDQwNTVGNkQyRUU5QTNBRDc4N0MzRkVCMTgzMzg2NDQ0MUVBNDlGOUQ1ODAxRDIyQkIzNUQ0MTM2NDlFMzM3MUFFMEFGRUI5NTMzNjBEMEM5MzRBNjFGMTVENTk1MzVFMkEwOTZGRjY2MzA2NTA3OUMwNEIxQjMyQTE3Q0UxQjJCRDcxN0U2NkNGREU5RjY1QjU3M0U1Q0RGODBDNUNCNzQwMUE3MjlDQkQ4MkM5MjkxQ0IxNjBCREM0ODBCQzk0RkM5Q0ExMkYwMDQ0MDk2RUU2NDU3MTM3QzgzQzNEMUJFRDhDRTcyRjcxMkJDODNBODJDQjAyQjRFN0I4N0Q3NzZCQkI2RjQ0RTYwRDMxNTJBRURBN0E0Qjk1NUZCRTM4RjAwQTNDMzA4MTkxNUJFNTRDNkQzRURFRjBDN0MwMEEwNkZFNzYxQUZDRjlCMTU2NjgwNTYwRkMzRTgwQkNGQ0JFRTQ0OTQyQjZCRUZCMDcxMTc1NEY2NUUyQzhGOUE0MzYxOUY1QTE2RjFDOUMyNjMxODM3MTUxN0Y1MDNCQzAzNEY1NUM3RDE3NzBFNjMxNDRGM0FBQjY5Q0YwQ0M4N0RERDFGOTY4MkVDOUEyM0FBMzFFNTQ1QUQ5RTM1QTZDMDhFODU0AA==";

	document.write('<object ID="'+editorID+'" width="' + width + '" height="' + height + '" CLASSID="CLSID:'+clsid+'" CODEBASE="'+cab+'#version='+version+'" >');
	document.write('<PARAM name="InitFile" value="'+env+'"/>');
	document.write('<PARAM name="ApplyInitData" VALUE="'+applyinitdata+'"/>');
	document.write('<PARAM name="Mode" VALUE="'+editmode+'"/>');
	document.write('<PARAM name="LicenseKey" value="'+key+'">');
	document.write('</object>');

	if (true) {
		document.write('<script language="JScript" FOR="'+editorID+'" EVENT="OnKeyDown(event)">');
		document.write('	if (!event.shiftKey && event.keyCode == 13)');
		document.write('	{');
		document.write('		document.'+editorID+'.InsertHtml("<br>");');
		document.write('		event.returnValue = true;');
		document.write('	}');
		document.write('	if (event.shiftKey && event.keyCode == 13)');
		document.write('	{');
		document.write('		document.'+editorID+'.InsertHtml("<p>");');
		document.write('		event.returnValue = true;');
		document.write('	}');
		document.write('</script>');
	}
}

//Active Designer ¿¡µðÅÍ Ãâ·Â (ÇÁ·ÐÆ®¿ë ¼öÁ¤Æû / ÆÄÀÏÃ·ºÎ ºÒ°¡)
function showFrontModifyWebEditor(editorID, formName, previousInputName, width, height) {
	var clsid =  "6C3894B9-2EFA-45ce-AEF0-E458B845E0AD";
	var version = "2,5,1,22";
	var cab = "/_common/tweditor/tweditor.cab";
	var env = "/_common/tweditor/front_env.xml";
	var applyinitdata = 1;//apply:1
	var editmode = 0;//edit:0

	var key = "NkVERkJGNEVGQkU5QTgzMTIyMEIwQUQ2OUVDNTZBODNGMjRERDdDOTdEMDQwNTVGNkQyRUU5QTNBRDc4N0MzRkVCMTgzMzg2NDQ0MUVBNDlGOUQ1ODAxRDIyQkIzNUQ0MTM2NDlFMzM3MUFFMEFGRUI5NTMzNjBEMEM5MzRBNjFGMTVENTk1MzVFMkEwOTZGRjY2MzA2NTA3OUMwNEIxQjMyQTE3Q0UxQjJCRDcxN0U2NkNGREU5RjY1QjU3M0U1Q0RGODBDNUNCNzQwMUE3MjlDQkQ4MkM5MjkxQ0IxNjBCREM0ODBCQzk0RkM5Q0ExMkYwMDQ0MDk2RUU2NDU3MTM3QzgzQzNEMUJFRDhDRTcyRjcxMkJDODNBODJDQjAyQjRFN0I4N0Q3NzZCQkI2RjQ0RTYwRDMxNTJBRURBN0E0Qjk1NUZCRTM4RjAwQTNDMzA4MTkxNUJFNTRDNkQzRURFRjBDN0MwMEEwNkZFNzYxQUZDRjlCMTU2NjgwNTYwRkMzRTgwQkNGQ0JFRTQ0OTQyQjZCRUZCMDcxMTc1NEY2NUUyQzhGOUE0MzYxOUY1QTE2RjFDOUMyNjMxODM3MTUxN0Y1MDNCQzAzNEY1NUM3RDE3NzBFNjMxNDRGM0FBQjY5Q0YwQ0M4N0RERDFGOTY4MkVDOUEyM0FBMzFFNTQ1QUQ5RTM1QTZDMDhFODU0AA==";

	document.write('<object ID="'+editorID+'" width="' + width + '" height="' + height + '" CLASSID="CLSID:'+clsid+'" CODEBASE="'+cab+'#version='+version+'" >');
	document.write('<PARAM name="InitFile" value="'+env+'"/>');
	document.write('<PARAM name="ApplyInitData" VALUE="'+applyinitdata+'"/>');
	document.write('<PARAM name="Mode" VALUE="'+editmode+'"/>');
	document.write('<PARAM name="LicenseKey" value="'+key+'">');
	document.write('</object>');

	document.write('<script type="text/jscript" for="' + editorID + '" event="OnControlInit()">');
	document.write('	document.' + editorID + '.HtmlValue = document.forms["' + formName + '"].' + previousInputName + '.value');
	document.write('</script>');

	if (true) {
		document.write('<script type="text/jscript" for="'+editorID+'" event="OnKeyDown(event)">');
		document.write('	if (!event.shiftKey && event.keyCode == 13)');
		document.write('	{');
		document.write('		document.'+editorID+'.InsertHtml("<br>");');
		document.write('		event.returnValue = true;');
		document.write('	}');
		document.write('	if (event.shiftKey && event.keyCode == 13)');
		document.write('	{');
		document.write('		document.'+editorID+'.InsertHtml("<p>");');
		document.write('		event.returnValue = true;');
		document.write('	}');
		document.write('</script>');
	}
}

//»óÇ° °Ë»ö
function searchProductFromFlash(searchWord) {
	if (searchWord.length < 2) {
		alert("°Ë»ö¾î¸¦ ÇÑ ÀÚ ÀÌ»ó ÀÔ·ÂÇÏ¼¼¿ä.");
	} else if (searchWord.length > 10) {
		alert("°Ë»ö¾î¸¦ 10ÀÚ ÀÌ³»·Î ÀÔ·ÂÇÏ¼¼¿ä.");
	} else if (searchWord.indexOf("'")>=0) {
		alert("ÀÛÀº µû¿ÈÇ¥(')°¡ Æ÷ÇÔµÈ ´Ü¾î´Â °Ë»öÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
	} else if (searchWord.indexOf("\"")>=0) {
		alert("Å« µû¿ÈÇ¥(\")°¡ Æ÷ÇÔµÈ ´Ü¾î´Â °Ë»öÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
	} else {
		document.write ('<form name="frmSearchProduct">');
		document.write ('<input name="searchWord" type="hidden" value="">');
		document.write ('</form>');
		var f=window.document.forms["frmSearchProduct"];
		f.searchWord.value = searchWord;
		f.action = "/product/product_search.jsp";
		f.submit();
	}
}

// FAQ
function qnaView(num){

	var prevFrom = document.getElementById('qngPrev');
	var prevNum = prevFrom.prevNum1.value;

	if(prevNum>0)
	{
		document.getElementById('qnaTr' + prevNum + '_2').style.display='none';
		document.getElementById('qnaTr' + prevNum + '_1').className = '';
	}

	document.getElementById('qngPrev').prevNum1.value = num;
	document.getElementById('qnaTr' + num + '_1').style.display='block';
	document.getElementById('qnaTr' + num + '_2').style.display='block';
	document.getElementById('qnaTr' + num + '_1').className = 'qnaSelect';
}

//°øÀå¼Ò°³ ÀÌ¹ÌÁö
function changeImg(obj,img,url,total){

	document.getElementById(img).src = '/media/imgs/maeil_media/'+url;

	for(var i = 1;i<=total;i++)
	{
		document.getElementById('changeTd'+i).className = '';
	}
	obj.className = 'over';
}

/*¸µÅ© Á¡¼± ¾ø¾Ö±â*/
function bluring(){
	
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;

/*¹è°æÀÌ¹ÌÁö ±ôºýÀÌ´Â Çö»ó Á¦°Å*/
try {	document.execCommand('BackgroundImageCache', false, true);} catch(e) {}
/*¹è°æÀÌ¹ÌÁö ±ôºýÀÌ´Â Çö»ó Á¦°Å*/