function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  var fwo=window.open(theURL,winName,features);
  fwo.focus();
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function chkBadString(chkstr){
	var str=chkstr.toUpperCase();
	var rtnVal=0;
	for(var i=0;i<str.length;i++){
		if(str.charAt(i)<"A" || str.charAt(i)>"Z"){
			if(str.charAt(i)<"0" || str.charAt(i)>"9"){
				rtnVal=1;
			}
		}
	}
	return rtnVal;
}

function selectbox_hidden(layer_id)
{
	var ly = eval(layer_id);

	// ·¹ÀÌ¾î ÁÂÇ¥
	var ly_left  = ly.offsetLeft;
	var ly_top    = ly.offsetTop;
	var ly_right  = ly.offsetLeft + ly.offsetWidth;
	var ly_bottom = ly.offsetTop + ly.offsetHeight;

	// ¼¿·ºÆ®¹Ú½ºÀÇ ÁÂÇ¥
	var el;

	for (i=0; i<document.forms.length; i++) {
		for (k=0; k<document.forms[i].length; k++) {
			el = document.forms[i].elements[k];
			if (el.type == "select-one") {
				var el_left = el_top = 0;
				var obj = el;
				if (obj.offsetParent) {
					while (obj.offsetParent) {
						el_left += obj.offsetLeft;
						el_top  += obj.offsetTop;
						obj = obj.offsetParent;
					}
				}
				el_left  += el.clientLeft;
				el_top    += el.clientTop;
				el_right  = el_left + el.clientWidth;
				el_bottom = el_top + el.clientHeight;

				// ÁÂÇ¥¸¦ µûÁ® ·¹ÀÌ¾î°¡ ¼¿·ºÆ® ¹Ú½º¸¦ Ä§¹üÇßÀ¸¸é ¼¿·ºÆ® ¹Ú½º¸¦ hidden ½ÃÅ´
				if ( (el_left >= ly_left && el_top >= ly_top && el_left <= ly_right && el_top <= ly_bottom) ||
					(el_right >= ly_left && el_right <= ly_right && el_top >= ly_top && el_top <= ly_bottom) ||
					(el_left >= ly_left && el_bottom >= ly_top && el_right <= ly_right && el_bottom <= ly_bottom) ||
					(el_left >= ly_left && el_left <= ly_right && el_bottom >= ly_top && el_bottom <= ly_bottom) )
					el.style.visibility = 'hidden';
			}
		}
	}
}

function selectbox_visible()
{
	for (i=0; i<document.forms.length; i++) {
		for (k=0; k<document.forms[i].length; k++) {
			el = document.forms[i].elements[k];
			if (el.type == "select-one" && el.style.visibility == 'hidden')
				el.style.visibility = 'visible';
		}
	}
}

var target;																	// È£ÃâÇÑ ObjectÀÇ ÀúÀå
var stime;
//document.write("<div id=minical oncontextmenu='return false' ondragstart='return false' onselectstart='return false' style=\"background:buttonface; margin:0; padding:0;margin-top:0;border-top:1 solid buttonshadow;border-left: 1 solid buttonshadow;border-right: 1 solid buttonshadow;border-bottom:1 solid buttonshadow;width:160;display:none;position: absolute; z-index: 99\"></div>");


// ÇöÀç ³¯Â¥¸¦ yyyymmdd ·Î ¼¼ÆÃÇÔ
var strNow;
strNow = new Date();

var strCurrentDate;

// strCurrentDate = YYYYMMDD(20040525) Çü½Ä
strCurrentDate = strNow.getFullYear().toString() + day2((strNow.getMonth()+1).toString()) + day2(strNow.getDate().toString());


var strSelectDate="";
var strFromDate="";
var strToDate="";


function Calendar(obj) {														// jucke

	var now = obj.value.split("-");
	var x, y;


	target = obj;																// Object ÀúÀå;

	if(target.name == "todate" && strFromDate == "")
	{
		alert("ÀÔ½ÇÀÏ ¸ÕÀú ¼±ÅÃÇÏ¿© ÁÖ¼¼¿ä..");
		return false;
	}


	x = (document.layers) ? loc.pageX : event.clientX;
	y = (document.layers) ? loc.pageY : event.clientY;


	minical.style.pixelTop	= y + 10;
	minical.style.pixelLeft	= x - 150;
	minical.style.display = (minical.style.display == "block") ? "none" : "block";

	if (now.length == 3) {
		Show_cal(now[0],now[1],now[2]);											// ³Ñ¾î¿Â °ªÀ» ³â¿ùÀÏ·Î ºÐ¸®
	} else {
		now = new Date();
		Show_cal(now.getFullYear(), now.getMonth()+1, now.getDate());			// ÇöÀç ³â/¿ù/ÀÏÀ» ¼³Á¤ÇÏ¿© ³Ñ±è.
	}

}

function doOver() {																// ¸¶¿ì½º°¡ Ä®·»´ÙÀ§¿¡ ÀÖÀ¸¸é
	var el = window.event.srcElement;
	cal_Day = el.title;

	if (cal_Day.length > 7) {													// ³¯ÀÚ °ªÀÌ ÀÖÀ¸¸é.
		el.style.borderTopColor = el.style.borderLeftColor = "buttonhighlight";
		el.style.borderRightColor = el.style.borderBottomColor = "buttonshadow";
	}
	window.clearTimeout(stime);													// Clear
}

function doClick() {															// ³¯ÀÚ¸¦ ¼±ÅÃÇÏ¿´À» °æ¿ì
	cal_Day = window.event.srcElement.title;
	window.event.srcElement.style.borderColor = "red";							// Å×µÎ¸® »öÀ» »¡°£»öÀ¸·Î
	if (cal_Day.length > 7) {													// ³¯ÀÚ °ªÀÌÀÖÀ¸¸é



		//if(strCurrentDate > cal_Day.replace(/\-/g, "") )
		//{
		//	var strErrMsg;
		//	strErrMsg = "ÇöÀç³¯Â¥(" + strNow.getFullYear().toString() + "." + day2((strNow.getMonth()+1).toString()) + "." + day2(strNow.getDate().toString()) + ") º¸´Ù ÀÌÀü³¯Â¥¸¦ ¼±ÅÃÇÒ ¼ö ¾ø½À´Ï´Ù.";
		//	alert(strErrMsg);
		//	return false;
		//}

		if(target.name == "frdate")
		{
			strFromDate = cal_Day.replace(/\-/g, "");
			target.value=cal_Day;													// °ª ¼³Á¤
		}
		else
		{
			strToDate = cal_Day.replace(/\-/g, "");

			if(strFromDate > strToDate)
			{
				alert("ÀÔ½ÇÀÏº¸´Ù ÀÌÈÄ¸¦ ¼±ÅÃÇÏ¿© ÁÖ¼¼¿ä");
				return false;
			}

			target.value=cal_Day;													// °ª ¼³Á¤

		}
	}
	minical.style.display='none';												// È­¸é¿¡¼­ Áö¿ò
}

function doOut() {
	var el = window.event.fromElement;
	cal_Day = el.title;

	if (cal_Day.length > 7) {
		el.style.borderColor = "white";
	}
	//stime=window.setTimeout("minical.style.display='none';", 200);
}

function day2(d) {																// 2ÀÚ¸® ¼ýÀÚ·á º¯°æ
	var str = new String();

	if (parseInt(d) < 10) {
		str = "0" + parseInt(d);
	} else {
		str = "" + parseInt(d);
	}
	return str;
}

function Show_cal(sYear, sMonth, sDay) {
	var Months_day = new Array(0,31,28,31,30,31,30,31,31,30,31,30,31)
	var Weekday_name = new Array("ÀÏ", "¿ù", "È­", "¼ö", "¸ñ", "±Ý", "Åä");
	var intThisYear = new Number(), intThisMonth = new Number(), intThisDay = new Number();
	document.all.minical.innerHTML = "";
	datToday = new Date();													// ÇöÀç ³¯ÀÚ ¼³Á¤


	intThisYear = parseInt(sYear);
	intThisMonth = parseInt(sMonth);
	intThisDay = parseInt(sDay);


	if (intThisYear == 0) intThisYear = datToday.getFullYear();				// °ªÀÌ ¾øÀ» °æ¿ì
	if (intThisMonth == 0) intThisMonth = parseInt(datToday.getMonth())+1;	// ¿ù °ªÀº ½ÇÁ¦°ª º¸´Ù -1 ÇÑ °ªÀÌ µÅµ¹·Á Áø´Ù.
	if (intThisDay == 0) intThisDay = datToday.getDate();

	switch(intThisMonth) {
		case 1:
				intPrevYear = intThisYear -1;
				intPrevMonth = 12;
				intNextYear = intThisYear;
				intNextMonth = 2;
				break;
		case 12:
				intPrevYear = intThisYear;
				intPrevMonth = 11;
				intNextYear = intThisYear + 1;
				intNextMonth = 1;
				break;
		default:
				intPrevYear = intThisYear;
				intPrevMonth = parseInt(intThisMonth) - 1;
				intNextYear = intThisYear;
				intNextMonth = parseInt(intThisMonth) + 1;
				break;
	}

	NowThisYear = datToday.getFullYear();										// ÇöÀç ³â
	NowThisMonth = datToday.getMonth()+1;										// ÇöÀç ¿ù
	NowThisDay = datToday.getDate();											// ÇöÀç ÀÏ

	datFirstDay = new Date(intThisYear, intThisMonth-1, 1);						// ÇöÀç ´ÞÀÇ 1ÀÏ·Î ³¯ÀÚ °´Ã¼ »ý¼º(¿ùÀº 0ºÎÅÍ 11±îÁöÀÇ Á¤¼ö(1¿ùºÎÅÍ 12¿ù))
	intFirstWeekday = datFirstDay.getDay();										// ÇöÀç ´Þ 1ÀÏÀÇ ¿äÀÏÀ» ±¸ÇÔ (0:ÀÏ¿äÀÏ, 1:¿ù¿äÀÏ)

	intSecondWeekday = intFirstWeekday;
	intThirdWeekday = intFirstWeekday;

	datThisDay = new Date(intThisYear, intThisMonth, intThisDay);				// ³Ñ¾î¿Â °ªÀÇ ³¯ÀÚ »ý¼º
	intThisWeekday = datThisDay.getDay();										// ³Ñ¾î¿Â ³¯ÀÚÀÇ ÁÖ ¿äÀÏ

	varThisWeekday = Weekday_name[intThisWeekday];								// ÇöÀç ¿äÀÏ ÀúÀå

	intPrintDay = 1																// ´ÞÀÇ ½ÃÀÛ ÀÏÀÚ
	secondPrintDay = 1
	thirdPrintDay = 1

	Stop_Flag = 0

	if ((intThisYear % 4)==0) {													// 4³â¸¶´Ù 1¹øÀÌ¸é (»ç·Î³ª´©¾î ¶³¾îÁö¸é)
		if ((intThisYear % 100) == 0) {
			if ((intThisYear % 400) == 0) {
				Months_day[2] = 29;
			}
		} else {
			Months_day[2] = 29;
		}
	}
	intLastDay = Months_day[intThisMonth];										// ¸¶Áö¸· ÀÏÀÚ ±¸ÇÔ
	Stop_flag = 0


	Cal_HTML = "<table width='170' border='0' cellspacing='0' cellpadding='0'>"
  			+ "<tr><td height='27' valign='bottom' background='/img/bg_cal_top_01.gif'>"
  			+ "<table width='144' height='22' border='0' align='center' cellpadding='0' cellspacing='0'>"
        	+ "<tr> <td width='4'></td>"
        	+ "<td align='center'><span class='path'><strong>" + get_Yearinfo(intThisYear,intThisMonth,intThisDay) + "<span class='style3'>³â " + get_Monthinfo(intThisYear,intThisMonth,intThisDay) + "¿ù</span></strong></span></td><td width='4'>&nbsp;</td></tr></table></td></tr>"
        	+ "<tr><td height='112' valign='top' background='/img/bg_cal_bd_01.gif'>"
        	+ "<table width='150' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td height='20' align='center' valign='top' background='/img/ln_calendar.gif'>"
        	+ "<img src='/img/cal_sun.gif' width='19' height='7' hspace='1' vspace='5'>"
        	+ "<img src='/img/cal_mon.gif' width='19' height='7' hspace='1' vspace='5'>"
        	+ "<img src='/img/cal_tue.gif' width='19' height='7' hspace='1' vspace='5'>"
        	+ "<img src='/img/cal_wed.gif' width='19' height='7' hspace='1' vspace='5'>"
        	+ "<img src='/img/cal_thu.gif' width='19' height='7' hspace='1' vspace='5'>"
        	+ "<img src='/img/cal_fri.gif' width='19' height='7' hspace='1' vspace='5'>"
        	+ "<img src='/img/cal_sat.gif' width='19' height='7' hspace='1' vspace='5'>"
        	+ "</td></tr>"
        	+ "<tr><td valign='top'><table width='143' border='0' align='center' cellpadding='0' cellspacing='2'>"
        	;


	for (intLoopWeek=1; intLoopWeek < 7; intLoopWeek++)
	{						// ÁÖ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÃÖ´ë 6ÁÖ
		Cal_HTML += "<TR ALIGN=RIGHT BGCOLOR=WHITE>"
		for (intLoopDay=1; intLoopDay <= 7; intLoopDay++)
		{						// ¿äÀÏ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÀÏ¿äÀÏ ºÎÅÍ
			if (intThirdWeekday > 0)
			{											// Ã¹ÁÖ ½ÃÀÛÀÏÀÌ 1º¸´Ù Å©¸é
				Cal_HTML += "<TD onClick=doClick();>";
				intThirdWeekday--;
			}
			else
			{
				if (thirdPrintDay > intLastDay)
				{								// ÀÔ·Â ³¯Â¦ ¿ù¸»º¸´Ù Å©´Ù¸é
					Cal_HTML += "<TD onClick=doClick();>";

				}
				else
				{														// ÀÔ·Â³¯Â¥°¡ ÇöÀç¿ù¿¡ ÇØ´ç µÇ¸é
					Cal_HTML += "<TD onClick=doClick(); title="+intThisYear+"-"+day2(intThisMonth).toString()+"-"+day2(thirdPrintDay).toString()+" STYLE=\"cursor:Hand;border:1px solid white;";
					if (intThisYear == NowThisYear && intThisMonth==NowThisMonth && thirdPrintDay==intThisDay)
					{
						Cal_HTML += "background-color:cyan;";
					}

					switch(intLoopDay)
					{
						case 1:													// ÀÏ¿äÀÏÀÌ¸é »¡°£ »öÀ¸·Î
							Cal_HTML += "color:red;"
							break;
						case 7:
							Cal_HTML += "color:blue;"
							break;
						default:
							Cal_HTML += "color:black;"
							break;
					}

					Cal_HTML += "\">"+thirdPrintDay;

				}
				thirdPrintDay++;

				if (thirdPrintDay > intLastDay)
				{								// ¸¸¾à ³¯Â¥ °ªÀÌ ¿ù¸» °ªº¸´Ù Å©¸é ·çÇÁ¹® Å»Ãâ
					Stop_Flag = 1;
				}
			}
			Cal_HTML += "</TD>";
		}
		Cal_HTML += "</TR>";
		if (Stop_Flag==1) break;
	}

	Cal_HTML += "</TABLE>"
			 + "</td></tr></table></td></tr><tr><td height='9' valign='top'><img src='/img/bg_cal_bot_01.gif' width='172' height='9'></td></tr></table>";


	document.all.minical.innerHTML = Cal_HTML;
}

function get_Yearinfo(year,month,day) {											// ³â Á¤º¸¸¦ ÄÞº¸ ¹Ú½º·Î Ç¥½Ã
	var min = parseInt(year) - 10;
	var max = parseInt(year) + 10;
	var i = new Number();
	var str = new String();

	str = "<SELECT onChange='Show_cal(this.value,"+month+","+day+");' ONMOUSEOVER=doOver();>";
	for (i=min; i<=max; i++) {
		if (i == parseInt(year)) {
			str += "<OPTION VALUE="+i+" selected ONMOUSEOVER=doOver();>"+i+"</OPTION>";
		} else {
			str += "<OPTION VALUE="+i+" ONMOUSEOVER=doOver();>"+i+"</OPTION>";
		}
	}
	str += "</SELECT>";
	return str;
}


function get_Monthinfo(year,month,day) {										// ¿ù Á¤º¸¸¦ ÄÞº¸ ¹Ú½º·Î Ç¥½Ã
	var i = new Number();
	var str = new String();

	str = "<SELECT onChange='Show_cal("+year+",this.value,"+day+");' ONMOUSEOVER=doOver();>";
	for (i=1; i<=12; i++) {
		if (i == parseInt(month)) {
			str += "<OPTION VALUE="+i+" selected ONMOUSEOVER=doOver();>"+i+"</OPTION>";
		} else {
			str += "<OPTION VALUE="+i+" ONMOUSEOVER=doOver();>"+i+"</OPTION>";
		}
	}
	str += "</SELECT>";
	return str;
}


function term_OnChange(ObjTerm)
{
	if(ObjTerm.value == "")
		return false;

	if(strFromDate == "")
	{
		alert("ÀÔ½ÇÀÏÀ» ¸ÕÀú ¼±ÅÃÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		ObjTerm.selectedIndex = 0;
		return false;
	}

	document.all["todate"].value = DateAdd("d", parseInt(ObjTerm.value), document.all["frdate"].value);

	document.all["period"].value = ObjTerm.value;

}


function Changeterm(strTerm)
{
	var strIndex;
	if(strTerm == 0)
		return false;


	if(strFromDate == "")
	{
		alert("ÀÔ½ÇÀÏÀ» ¸ÕÀú ¼±ÅÃÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		document.all["term"].selectedIndex = 0;
		return false;
	}


	if(strTerm < 8 )
		strIndex = strTerm;
	else if(strTerm == 10)
		strIndex = 8;
	else if(strTerm == 30 )
		strIndex = 9;
	else if(strTerm == 60)
		strIndex = 10;
	else
		strIndex = 0;


	document.all["term"].selectedIndex = strIndex;


	document.all["todate"].value = DateAdd("d", strTerm, document.all["frdate"].value);

	document.all["period"].value = strTerm;



}

function DateAdd(Interval, Number, date) {

        var NewDate = null;
        var RtnDate = null;
        var year = null;
        var month = null;
        var day = null;
        var Ryear = null;
        var Rmonth = null;
        var Rday = null;

        //date°¡ Date °´Ã¼ÀÏ °æ¿ì
        if(date instanceof Date) {
            NewDate = date;
            year = NewDate.getYear();
            month = NewDate.getMonth();
            day = NewDate.getDate();
        }
        //date°¡ ¹®ÀÚ¿­ÀÏ°æ¿ì
        else {
            var temp = date.split("-");
            NewDate = new Date(temp[0],(temp[1]-1),temp[2]);
            year = temp[0];
            month = temp[1]-1;
            day = temp[2];
        }


        if(Interval == "y" || Interval == "Y") {
            year = parseInt(year) + Number;
        }
        else if(Interval == "m" || Interval == "M") {
            month = parseInt(month) + Number;
        }
        else if(Interval == "d" || Interval == "D") {
            day = parseInt(day) + Number;
        }

        RtnDate = new Date(year, month, day);

        Ryear = RtnDate.getYear();
        Rmonth = RtnDate.getMonth()+1;
        Rday = RtnDate.getDate();

        if(Rmonth < 10) {
            Rmonth = "0" + Rmonth;
        }

        if(Rday < 10) {
            Rday = "0" + Rday;
        }

        return Ryear + "-" + Rmonth + "-" + Rday;

    }


function DateDiff( start, end, interval, rounding ) {

	var temp = start.split("-");
    var startate = new Date(temp[0],(temp[1]-1),temp[2]);

    temp = end.split("-");
    var endtate = new Date(temp[0],(temp[1]-1),temp[2]);


	var iOut = 0;

    // Create 2 error messages, 1 for each argument.
    var startMsg = "Check the Start Date and End Date\n"
        startMsg += "must be a valid date format.\n\n"
        startMsg += "Please try again." ;

    var intervalMsg = "Sorry the dateAdd function only accepts\n"
        intervalMsg += "d, h, m OR s intervals.\n\n"
        intervalMsg += "Please try again." ;

    var bufferA = Date.parse( startate ) ;
    var bufferB = Date.parse( endtate ) ;

    // check that the start parameter is a valid Date.
    if ( isNaN (bufferA) || isNaN (bufferB) ) {
        alert( startMsg ) ;
        return null ;
    }

    // check that an interval parameter was not numeric.
    if ( interval.charAt == 'undefined' ) {
        // the user specified an incorrect interval, handle the error.
        alert( intervalMsg ) ;
        return null ;
    }

    var number = bufferB-bufferA ;

    // what kind of add to do?
    switch (interval.charAt(0))
    {
        case 'd': case 'D':
            iOut = parseInt(number / 86400000) ;
            if(rounding) iOut += parseInt((number % 86400000)/43200001) ;
            break ;
        case 'h': case 'H':
            iOut = parseInt(number / 3600000 ) ;
            if(rounding) iOut += parseInt((number % 3600000)/1800001) ;
            break ;
        case 'm': case 'M':
            iOut = parseInt(number / 60000 ) ;
            if(rounding) iOut += parseInt((number % 60000)/30001) ;
            break ;
        case 's': case 'S':
            iOut = parseInt(number / 1000 ) ;
            if(rounding) iOut += parseInt((number % 1000)/501) ;
            break ;
        default:
        // If we get to here then the interval parameter
        // didn't meet the d,h,m,s criteria.  Handle
        // the error.
        alert(intervalMsg) ;
        return null ;
    }

    return iOut ;
}


function defaultStatus(){
	var pla = document.all.plastic;
	for (var i=0;i<pla.length;i++){
		document.all.plastic[i].style.border = "1 solid #EFEFEF";
		document.all.plastic[i].style.backgroundColor = "";
	}
}

function mouseOnTD(obj)
{
	obj.style.border = "1 solid #808080";
	obj.style.backgroundColor = "#FFFFFF";
	obj.style.cursor = "hand";
}

function ClickOnTD(obj, page){
	obj.style.border = "1 solid #808080";
	obj.style.backgroundColor = "#FFFFFF";
	obj.style.cursor = "hand";
	//parent.info.location.href= page;
	location.href= page;
}

var calendar=""

function isDigit(str) {
  var reInteger = /^\d+$/

  return reInteger.test(str)
}

function CheckDate(strDate) {
  if (strDate.value.length == 0) return true
  if (strDate.value.length < 10 || strDate.value.charAt(4) != "-" || strDate.value.charAt(7) != "-") {
    alert("³¯Â¥ÀÔ·ÂÀÌ Àß¸øµÆ½À´Ï´Ù.\n\n¿¹) 2000-01-09")
//    strDate.focus()
//    strDate.select()
    return false
  }
  var yy = strDate.value.substring(0,4);
  var mm = strDate.value.substring(5,7);
  var dd = strDate.value.substring(8);

  if (!isDigit(yy) || !isDigit(mm) || !isDigit(dd)) {
    alert("³¯Â¥ÀÔ·ÂÀÌ Àß¸øµÆ½À´Ï´Ù.\n\n¿¹) 2000-01-09")
//    strDate.focus()
//    strDate.select()
    return false
  }

  var i_yy = parseInt(yy,10);
  var i_mm = parseInt(mm,10);
  var i_dd = parseInt(dd,10);

  if ( i_yy < 0 || i_mm < 1 || i_mm > 12 || i_dd < 0 || i_dd > 31 ) {
    alert("³¯Â¥ÀÔ·ÂÀÌ Àß¸øµÆ½À´Ï´Ù.\n\n¿¹) 2000-01-09")
//    strDate.focus()
//    strDate.select()
    return false
  }
  if ( i_mm==2 && i_dd > 29 ) {
    alert("³¯Â¥ÀÔ·ÂÀÌ Àß¸øµÆ½À´Ï´Ù.\n\n¿¹) 2000-01-09")
//    strDate.focus()
//    strDate.select()
    return false
  }
  if ( ( i_mm==4 || i_mm==6 || i_mm==9 || i_mm==11 ) && i_dd > 30 )  {
    alert("³¯Â¥ÀÔ·ÂÀÌ Àß¸øµÆ½À´Ï´Ù.\n\n¿¹) 2000-01-09")
//    strDate.focus()
//    strDate.select()
    return false
  }
  return true
}

function ClickDate(iDate) {
  dateField = iDate;
  if (calendar == "") {
     calendar = window.open("popup_00001.jsp","calendar","top=250,left=300,width=350,height=350,scrollbars=no,resizable=no,menubar=1")
  } else if (!calendar.closed) {
     calendar.location.reload()
     calendar.focus()
  } else {
     calendar = window.open("popup_00001.jsp","calendar","top=250,left=300,width=350,height=350,scrollbars=no,resizable=no,menubar=1")
  }
}

function ClickRegionPopup(tmp) {
  var win_project=""
  obj_project = tmp
  if (win_project == "") {
     win_project = window.open("popup_00006.jsp","win_project","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  } else if (!win_project.closed) {
     win_project.location.reload()
     win_project.focus()
  } else {
     win_project = window.open("popup_00006.jsp","win_project","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  }
}

function ClickProductClass(tmp) {
  var win_productclass=""
  obj_productclass = tmp
  if (win_productclass == "") {
     win_productclass = window.open("popup_00002.jsp","win_productclass","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  } else if (!win_productclass.closed) {
     win_productclass.location.reload()
     win_productclass.focus()
  } else {
     win_productclass = window.open("popup_00002.jsp","win_productclass","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  }
}

function ClickProductClass2(tmp) {
  var win_productclass=""
  obj_productclass = tmp
  if (win_productclass == "") {
     win_productclass = window.open("popup_00013.jsp","ClickProductClass2","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  } else if (!win_productclass.closed) {
     win_productclass.location.reload()
     win_productclass.focus()
  } else {
     win_productclass = window.open("popup_00013.jsp","ClickProductClass2","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  }
}

function ClickProject(tmp,session) {
  var win_project=""
  obj_project = tmp
  if (win_project == "") {
     win_project = window.open("popup_00004.jsp?CD_AGENT="+session,"win_project","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  } else if (!win_project.closed) {
     win_project.location.reload()
     win_project.focus()
  } else {
     win_project = window.open("popup_00004.jsp?CD_AGENT="+session,"win_project","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  }
}

function PrintPopup01(key, pagename) {
    window.open(""+pagename+"_print.jsp?key="+key,"PrintPopup01","top=10,left=10,width=680,height=580,status=yes,scrollbars=yes,resizable=no,menubar=1,toolbar=0")
	return;
}

function PrintPopup02(key, key2, pagename) {
    window.open(""+pagename+"_print.jsp?key="+key+"&key2="+key2,"PrintPopup02","top=10,left=10,width=680,height=580,status=yes,scrollbars=yes,resizable=no,menubar=1")
	return;
}

function BoardPopup() {
    window.open("popup_00014.jsp","BoardPopup","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
	return;
}

function BoardPopup2() {
    window.open("Fpopup_00014.jsp","BoardPopup","top=100,left=200,width=520,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
	return;
}

function ClickDemandCo(tmp,tmp2) {
  var win_demandco=""
  obj_demandco = tmp
  if (win_demandco == "") {
     win_demandco = window.open("Fpopup_00002.jsp?session_value6="+tmp2,"win_demandco","top=100,left=200,width=600,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  } else if (!win_demandco.closed) {
     win_demandco.location.reload()
     win_demandco.focus()
  } else {
     win_demandco = window.open("Fpopup_00002.jsp?session_value6="+tmp2,"win_demandco","top=100,left=200,width=600,height=500,status=yes,scrollbars=yes,resizable=no,menubar=1")
  }
}

function socialNoConfirmA(ssn1,ssn2){
	var str1;
	var str2=2;
	var str3=0;
	for(var i=0;i<=5;i++){
		str1=ssn1.charAt(i);
		str1=parseInt(str1);
		if((i==2)&&(str1>1)){
			return false;
		}else if((i==4)&&(str1>3)){
			return false;
		}
		str3=(str1*str2)+str3;
		str2++;
	}
	for(var j=0;j<=5;j++){
		str1=ssn2.charAt(j);
		str1=parseInt(str1);
		str3=(str1*str2)+str3;
		str2++;
		if(str2>9){
			str2=2;
		}
	}
	str3=str3%11;
	str3=11-str3;
	if(str3>=10){
		str3=str3-10;
	}
	str1=ssn2.charAt(6);
	if(str1==str3){
		return true;
	}else{
		return false;
	}
}

function chkNumString(chkstr){
	var str=chkstr.toUpperCase();
	var rtnVal=0;
	for(var i=0;i<str.length;i++){
		if(str.charAt(i)<"0" || str.charAt(i)>"9"){
			rtnVal=1;
		}
	}
	return rtnVal;
}

function selectURL01(sel, targetstr)
{
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') {
     if (targetstr == 'blank') {
       window.open(sel.options[index].value, 'win1');
     } else {
       var frameobj;
       if ((frameobj = eval(targetstr)) != null)
         frameobj.location = sel.options[index].value;
     }
  }
}

// SunSil Start
function openWin(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// ±âÁ¸ ½ºÅ©¸³ÅÍz
function newWin(url,winname,opt){
 var myPopup=window.open(url,winname,opt);
     myPopup.window.focus();
}

var isNN = (navigator.appName.indexOf("Netscape")!=-1);

function showSectL() {
  	document.all.sectL.style.display = "";
	}

	function hideSectL() {
  	document.all.sectL.style.display = "none";
	}

function autotab(input,len, e) {
    var keycd = (isNN) ? e.which : e.keyCode;
    var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
    if(input.value.length >= len && !iscontain(filter, keycd))
    {
      input.value = input.value.slice(0, len);
      input.form[(getindex(input)+1) % input.form.length].focus();
    }
  }

function iscontain(filter, keycd) {
    var found = false;
    var index = 0;

    while(!found && index < filter.length)

    if(filter[index] == keycd) found = true;
    else index++;

    return found;
  }

function getindex(input) {
    var index = -1;
    var i = 0;
    var found = false;

    while (i < input.form.length && index == -1)

    if (input.form[i] == input)index = i;
    else i++;

    return index;
    return true;
  }

function home(){ location.href = "/"; }

function B01_01(){ location.href = "/template/order_01.jsp?m=2&s=1"; }
function B01_02(){ location.href = "http://www.ftc.go.kr/"; }

function S01_01(){ location.href = "/"; }
function S01_02(){ location.href = "/eng/"; }
function S01_03(){ location.href = "/template/sitemap_01.jsp?m=6&s=1"; }

function Q01_01(){ location.href = "/template/cust_01_01.jsp?m=3&s=1_1"; }
function Q01_02(){ location.href = "/template/cust_02.jsp?m=3&s=2"; }
function Q01_03(){ location.href = "/template/prod_07.jsp?m=1&s=6"; }
function Q01_04(){ location.href = "/template/cust_01_01.jsp?m=3&s=1_1"; }

function menu01(){ location.href = "/template/prod.jsp?m=1&s=1"; }
function menuN01_01(){ location.href = "/template/prod_01.jsp?m=1&s=1"; }
function menu01_01(){ location.href = "/template/prod_01.jsp?m=1&s=1"; }
function menu01_01_01(){ location.href = "/template/prod_01_01.jsp?m=1&s=1_1"; }
function menu01_01_02(){ location.href = "/template/prod_01_02.jsp?m=1&s=1_2"; }
function menu01_01_03(){ location.href = "/template/prod_01_03.jsp?m=1&s=1_3"; }
function menu01_02(){ location.href = "/template/prod_02.jsp?m=1&s=2"; }
function menu01_02_01(){ location.href = "/template/prod_02_01.jsp?m=1&s=2_3"; }
function menu01_02_02(){ location.href = "/template/prod_02_02.jsp?m=1&s=2_4"; }
function menu01_02_03(){ location.href = "/template/prod_02_04.jsp?m=1&s=2_2"; }
function menu01_03(){ location.href = "/template/prod_03.jsp?m=1&s=3"; }
function menu01_03_01(){ location.href = "/template/prod_03.jsp?m=1&s=3_1"; }
function menu01_03_02(){ location.href = "/template/prod_03_01.jsp?m=1&s=3_2"; }
function menu01_03_03(){ location.href = "/template/prod_03_02.jsp?m=1&s=3_3"; }
function menu01_03_04(){ location.href = "/template/prod_03_03.jsp?m=1&s=3_4"; }
function menu01_03_05(){ location.href = "/template/prod_03_04.jsp?m=1&s=3_5"; }
function menu01_03_06(){ location.href = "/template/prod_03_05.jsp?m=1&s=3_6"; }
function menu01_04(){ location.href = "/template/prod_04.jsp?m=1&s=4"; }
function menu01_04_01(){ location.href = "/template/prod_04_01.jsp?m=1&s=4_1"; }
function menu01_04_02(){ location.href = "/template/prod_04_02.jsp?m=1&s=4_2"; }
function menu01_04_03(){ location.href = "/template/prod_04_03.jsp?m=1&s=4_3"; }
//20061011 pss Ãß°¡
function menu01_04_04(){ location.href = "/template/prod_04_04.jsp?m=1&s=4_4"; }
function menu01_05(){ location.href = "/template/prod_05_01.jsp?m=1&s=4"; }
function menu01_05_01(){ location.href = "/template/prod_05_01.jsp?m=1&s=4_1"; }
function menu01_05_02(){ location.href = "/template/prod_05_02.jsp?m=1&s=4_2"; }
function menu01_06(){ location.href = "/template/prod_06.jsp?m=1&s=5"; }
function menu01_06_01(){ location.href = "/template/prod_06_01.jsp?m=1&s=5_1"; }
function menu01_06_02(){ location.href = "/template/prod_06_02.jsp?m=1&s=5_2"; }
function menu01_06_03(){ location.href = "/template/prod_06_03.jsp?m=1&s=5_3"; }
function menu01_06_04(){ location.href = "/template/prod_06_03.jsp?m=1&s=5_4"; }
function menu01_06_05(){ location.href = "/template/prod_06_04.jsp?m=1&s=5_5"; }
function menu01_07(){ location.href = "/template/prod_07.jsp?m=1&s=6"; }
function menu01_08(){ location.href = "/template/prod_08_01.jsp?m=1&s=7_1"; }
function menu01_08_01(){ location.href = "/template/prod_08_01.jsp?m=1&s=7_1"; }
function menu01_08_02(){ location.href = "/template/prod_08_02.jsp?m=1&s=7_2"; }
function menu01_08_03(){ location.href = "/template/prod_08_03.jsp?m=1&s=7_3"; }

function menu02_01(){ location.href = "/template/order_01.jsp?m=2&s=1"; }
function menu02_01_01(){ location.href = "/template/order_01.jsp?m=2&s=1"; }
function menu02_02(){ location.href = "/template/order_02.jsp?m=2&s=2_1"; }
function menu02_02_01(){ location.href = "/template/order_02.jsp?m=2&s=2_1"; }
function menu02_02_02(){ location.href = "/template/order_02_02.jsp?m=2&s=2_2"; }
function menu02_02_03(){ location.href = "/template/order_02_03.jsp?m=2&s=2_3"; }
function menu02_02_04(){ location.href = "/template/order_02_04.jsp?m=2&s=2_4"; }
function menu02_02_05(){ location.href = "/template/order_02_05.jsp?m=2&s=2_4"; }
function menu02_02_06(){ location.href = "/template/order_02_06.jsp?m=2&s=2_5"; }
function menu02_03(){ location.href = "/template/order_03_03.jsp?m=2&s=3_2"; }
function menu02_03_01(){ location.href = "/template/order_03_02.jsp?m=2&s=3_2"; }
function menu02_03_02(){ location.href = "/template/order_03_02.jsp?m=2&s=3_2"; }
function menu02_03_03(){ location.href = "/template/order_03_03.jsp?m=2&s=3_2"; }

function menu03_01(){ location.href = "/template/cust_01_01.jsp?m=3&s=1_1"; }
function menu03_01_01(){ location.href = "/template/cust_01_01.jsp?m=3&s=1_1"; }
function menu03_01_02(){ location.href = "/template/cust_01_02.jsp?m=3&s=1_2"; }
function menu03_01_03(){ location.href = "/template/cust_01_03.jsp?m=3&s=1_3"; }
function menu03_02(){ location.href = "/template/cust_02.jsp?m=3&s=2"; }
function menu03_03(){ location.href = "/template/cust_04.jsp?m=3&s=3"; }

function menu04_01(){ location.href = "/template/comp_01.jsp?m=4&s=1"; }
function menu04_01_01(){ location.href = "/template/comp_01.jsp?m=4&s=1_1"; }
function menu04_01_02(){ location.href = "/template/comp_02.jsp?m=4&s=1_2"; }
function menu04_01_03(){ location.href = "/template/comp_03.jsp?m=4&s=1_3"; }
function menu04_01_04(){ location.href = "/template/comp_04.jsp?m=4&s=1_4"; }
function menu04_01_05(){ location.href = "/template/comp_06.jsp?m=4&s=1_5"; }
function menu04_01_06(){ location.href = "/template/comp_05.jsp?m=4&s=1_6"; }
function menu04_01_07(){ location.href = "/template/comp_09.jsp?m=4&s=1_7"; }
function menu04_02(){ location.href = "/template/rnd_01_01.jsp?m=4&s=2_1"; }
function menu04_02_01(){ location.href = "/template/rnd_01_01.jsp?m=4&s=2_1"; }
function menu04_02_02(){ location.href = "/template/rnd_02.jsp?m=4&s=2_2"; }
function menu04_02_03(){ location.href = "/template/rnd_03.jsp?m=4&s=2_3"; }
function menu04_03(){ location.href = "/template/she_01.jsp?m=4&s=3"; }
function menu04_03_01(){ location.href = "/template/she_01.jsp?m=4&s=3_1"; }
function menu04_03_02(){ location.href = "/template/she_02.jsp?m=4&s=3_2"; }
function menu04_03_03(){ location.href = "/template/she_03.jsp?m=4&s=3_3"; }
function menu04_04(){ location.href = "/template/comp_07_01.jsp?m=4&s=4_1"; }
function menu04_04_01(){ location.href = "/template/comp_07_01.jsp?m=4&s=4_1"; }
function menu04_04_02(){ location.href = "/template/comp_07_02.jsp?m=4&s=4_2"; }
function menu04_04_03(){ location.href = "/template/recruit_before.jsp?m=4&s=4_3"; }
function menu04_04_04(){ location.href = "/template/comp_07_03.jsp?m=4&s=4_4"; }
function menu04_04_05(){ location.href = "/template/comp_07_04.jsp?m=4&s=4_5"; }
function menu04_04_06(){ location.href = "/template/comp_07_05.jsp?m=4&s=4_6"; }
function menu04_05(){ location.href = "/template/comp_08_01.jsp?m=4&s=5"; }
function menu04_05_01(){ location.href = "/template/comp_08_01.jsp?m=4&s=5_1"; }
function menu04_05_02(){ location.href = "/template/comp_08_02.jsp?m=4&s=5_2"; }
function menu04_05_03(){ location.href = "/template/comp_08_03.jsp?m=4&s=5_3"; }

function menu05_01(){ location.href = "/template/cp_01.jsp?m=5&s=1"; }
function menu05_02(){ location.href = "/template/cp_07.jsp?m=5&s=2&gubun=1"; }
function menu05_03(){ location.href = "/template/cp_03.jsp?m=5&s=4"; }
function menu05_04(){ location.href = "/template/cp_04.jsp?m=5&s=5"; }
function menu05_05(){ location.href = "/template/cp_05.jsp?m=5&s=6"; }
function menu05_06(){ location.href = "/template/cp_06.jsp?m=5&s=3&gubun=1"; }

function Map01_01(){ location.href = "/template/comp_09.jsp?m=4&s=1_7"; }
function Map01_02(){ location.href = "/template/comp_09.jsp?m=4&s=1_7"; }
function Map01_03(){ location.href = "/template/comp_09.jsp?m=4&s=1_7&gubun=5"; }
function Map01_04(){ location.href = "/template/comp_09.jsp?m=4&s=1_7&gubun=2"; }
function Map01_05(){ location.href = "/template/comp_09.jsp?m=4&s=1_7&gubun=6"; }
function Map01_06(){ location.href = "/template/comp_09.jsp?m=4&s=1_7&gubun=7"; }
function Map01_07(){ location.href = "/template/comp_09.jsp?m=4&s=1_7&gubun=3"; }

function dic_activex_build(parent, tag, paramTag){
  var DICObjectElement = document.createElement(tag);
  for(var i = 0 ; i < paramTag.length; i++){
		var DICParamElement = document.createElement(paramTag[i]);
		DICObjectElement.appendChild(DICParamElement);
	}
  parent.appendChild(DICObjectElement);
}
var sPRTC=window.location['protocol']; 
var sHREF=window.location['href']; 
if(sPRTC.toUpperCase()!='HTTPS:'){ 
 sHREF='HTTPS:'+sHREF.substring(sPRTC.length,sHREF.length); 
 window.location.replace(sHREF); 
} 