<!--
    var ALPHA = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZ";
	var NUM   = "0123456789";
	var SPEC  = "~!@#$%^&*()_+|";

    function validate(str, spc)
	{
		for(var i=0; i<str.length; i++)
		{			
			if(spc.indexOf(str.substring(i, i+1)) < 0)
			{
				return false;
			}
		}
		return true;
	}
	function writeIFrame(src, name, dh)
	{
		var ch = document.body.clientHeight;		
		var eh = ch - dh;
        
		var thePage = "<iframe src='";
		thePage    += src;
		thePage    +="' name='";
		thePage    += name;
		thePage    +="' width='100%' height='";
		thePage    += eh;
		thePage    += "' scrolling='yes' frameborder='0'></iframe>";

		document.write(thePage);
	}
	function writeIFrameWithScrolling(src, name, dh, scrolling)
	{
		ch = document.body.clientHeight;		
		eh = ch - dh;
        
		var thePage = "<iframe src='";
		thePage    += src;
		thePage    +="' name='";
		thePage    += name;
		thePage    +="' width='100%' height='";
		thePage    += eh;
		thePage    += "' scrolling='";
		thePage    += scrolling;
		thePage    += "' frameborder='0'></iframe>";

		document.write(thePage);
	}
	function GetTime() 
	{ 
		var dt = new Date();
		var def = dt.getTimezoneOffset()/60;
		var gmt = (dt.getHours() + def);

		var Month = dt.getUTCMonth() + 1;
		var MonthNum = Month.toString();
		var Dat = dt.getUTCDate();

		if (Dat > 9){
			var DatNum = Dat.toString();	
		}
		else{
			var DatNum = "0" + Dat.toString();	
		}

		var MonthDate = MonthNum + DatNum;

		var ending = ":" + IfZero(dt.getMinutes()) + ":" +  IfZero(dt.getSeconds());

		var tky =check24(((gmt + 9) > 24) ? ((gmt + 9) - 24) : (gmt + 9));
		document.clock.tky.value =  dt.getYear() + "-" + IfZero(MonthNum) + "-" + IfZero(Dat) + " " + (IfZero(tky) + ending);

		setTimeout("GetTime()", 1000);
	}
	function IfZero(num) 
	{
		return ((num <= 9) ? ("0" + num) : num);
	}
	function check24(hour) 
	{
		return (hour >= 24) ? hour - 24 : hour;
	}
	function mOver(obj)
	{
		obj.style.cssText = "cursor:default; border-left: 1px solid #eeeeee; border-top: 1px solid #eeeeee; border-right:1px solid #999999; border-bottom: 1px solid #999999";
	}
	function mOut(obj)
	{
		obj.style.cssText = "cursor:default; border-left: 1px solid #d6d3ce; border-top: 1px solid #d6d3ce; border-right:1px solid #d6d3ce; border-bottom: 1px solid #d6d3ce";
	}
	function mDown(obj)
	{
		obj.style.cssText = "cursor:default; background:#d6d3ce; border-left: 1px solid #999999; border-top: 1px solid #999999; border-right:1px solid #eeeeee; border-bottom: 1px solid #eeeeee";
	}
	function CheckEmailAddr(strAddr, strName) 
	{
		var arrAddr;
		var arrMatch;
		var strEmail;
	
		if (strAddr.length == 0) 
		{
			return true;
		}
	
		arrAddr = strAddr.replace(/,/, ";").split(";");
		for (var i = 0; i < arrAddr.length; i++) {
			arrMatch = arrAddr[i].match(/^([^<>]*)<([^<>]+)>$/);
			if (arrMatch == null) {
				strEmail = arrAddr[i];
			}
			else {
				strEmail = arrMatch[2];
			}
	
			if (checkEmail(strEmail) == false) {
				alert("\"" + strName + "\"ÀÇ \"" + arrAddr[i] + "\"´Â Àß¸øµÈ ÀÌ¸ÞÀÏÁÖ¼ÒÀÔ´Ï´Ù.");
				return false;
			}
		}
	
		return true;
	}

	function checkEmail(strEmail) {	
		var arrMatch = strEmail.match(/^(\".*\"|[A-Za-z0-9_-]([A-Za-z0-9_-]|[\+\.])*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z0-9][A-Za-z0-9_-]*(\.[A-Za-z0-9][A-Za-z0-9_-]*)+)$/);
		if (arrMatch == null) {
			return false;
		}
		var arrIP = arrMatch[2].match(/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/);
		if (arrIP != null) {
			for (var i = 1; i <= 4; i++) {
				if (arrIP[i] > 255) {
					return false;
				}
			}
		}
		return true;
	}

	function fn_alert(obj, msg){
		window.alert(msg);
		if(obj != null){
			obj.focus();
		}
	}
    function trim(text) {
        if (text == "" || text==null) {
            return	text;
        }

        var len = text.length;
        var st = 0;

        while ((st < len) && (text.charAt(st) <= ' ')) {
            st++;
        }

        while ((st < len) && (text.charAt(len - 1) <= ' ')) {
            len--;
        }

        return	((st > 0) || (len < text.length)) ? text.substring(st, len) : text;
    }
	
	function is_numeric(obj){
		if(obj.value == "" || trim(obj.value) == null) return false;
		if(isNaN(obj.value)){
			window.alert("¼ýÀÚ¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.");
			obj.value = "";
			obj.focus();
			return false;
		}
		return true;
	}

	function fn_date(obj)
	{
		value = window.showModalDialog("../common/calendar.html", "calendar", "help:no;status:no;dialogWidth:240px;dialogHeight:280px;");
		if(value != null){
			obj.value = value;
		}
	}

	function ieExecWB( intOLEcmd, intOLEparam )
	{
		// À¥ ºê¶ó¿ìÀú ÄÁÆ®·Ñ »ý¼º
		var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';

		// À¥ ÆäÀÌÁö¿¡ °´Ã¼ »ðÀÔ
		document.body.insertAdjacentHTML('beforeEnd', WebBrowser);

		// if intOLEparamÀÌ Á¤ÀÇµÇ¾î ÀÖÁö ¾ÊÀ¸¸é µðÆúÆ® °ª ¼³Á¤
		if ( ( ! intOLEparam ) || ( intOLEparam < -1 ) || (intOLEparam > 1 ) )
		intOLEparam = 1;

		// ExexWB ¸Þ½îµå ½ÇÇà
		WebBrowser1.ExecWB( intOLEcmd, intOLEparam );

		// °´Ã¼ ÇØÁ¦
		WebBrowser1.outerHTML = "";

		MENU.style.visibility = "visible";
	}
	function printMe()
	{
		MENU.style.visibility = "hidden";
		window.print();
		//ieExecWB(6, -1);
	}

	function fn_confirm(){

		if(window.confirm("È®ÀÎÇÏ¼Ì½À´Ï±î?")){
			document.form1.target = "";
			document.form1.action = "reports_confirm.php";
			document.form1.submit();
		}
	}


//-->
