<!--
function info_window(width, depth, url, title)
{
	var arg;
	var forkWnd = null;
	
	arg = "width=" + width + ",height=" + depth + ",scrollbars,status,resizable";
	forkWnd = window.open(url, title, arg);
	forkWnd.focus();
}

function info_ext_window(width, depth, url, title, chkscroll, chkstatus, chkresize)
{
	var arg;
	var forkWnd = null;
		
	arg = "width=" + width + ",height=" + depth;

	if(chkscroll == "ON")
	{
		arg = arg + ",scrollbars";
	}

	if(chkstatus == "ON")
	{
		arg = arg + ",status";
	}

	if(chkresize == "ON")
	{
		arg = arg + ",resizable";
	}

	forkWnd = window.open(url, title, arg);
	forkWnd.focus();
}

function proposal_window()
{
	window.open("/members/member_letter.php?mode=member_proposal", "proposal_window", 
				"width=550,height=430,status");
}

function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function mhHover(tbl, idx, cls)
{
	var t, d;
	if (document.getElementById)
		t = document.getElementById(tbl);
	else
		t = document.all(tbl);
	if (t == null) return;
	if (t.getElementsByTagName)
		d = t.getElementsByTagName("TD");
	else
		d = t.all.tags("TD");
	if (d == null) return;
	if (d.length <= idx) return;
	d[idx].className = cls;
}

function chk_radio(obj)
{
	for(cnt = 0; cnt < obj.length; cnt++)
	{
		if(obj[cnt].checked)
		{
			return true;
		}
	}

	if(obj.checked)
		return true;
	else
		return false;
}

function chk_null(obj, msg)
{
	if(obj.value == "")
	{
		alert(msg);
		obj.focus();
		return true;
	}

	return false;
}

function chk_num(obj, msg)
{
	if(/^[0-9]+$/.test(obj.value))
	{
		return false;
	}
	else
	{
		alert(msg);
		obj.focus();
		return true;
	}
}

function tree_reload(num)
{
	if(top.fraLeftBody && top.fraLeftBody.webFXTreeHandler.all[num] != null)
	{
		top.fraLeftBody.webFXTreeHandler.all[num].reload();
	}
}

function tree_select(num)
{
	if(top.fraLeftBody && top.fraLeftBody.webFXTreeHandler && 
		top.fraLeftBody.webFXTreeHandler.all[num] != null)
	{
		top.fraLeftBody.webFXTreeHandler.all[num].select();
		top.fraLeftBody.webFXTreeHandler.all[num].expand();
		top.fraLeftBody.webFXTreeHandler.all[num].focus();
	}
}

function auto_focus(srcObj, maxLength, targetObj)
{
	if(srcObj.value.length >= maxLength)
		targetObj.focus();
	else  
		return false;

	return true ;
}




function chk_eng(obj, key, msg)
{
	exp = new RegExp("^[a-zA-Z]+[a-zA-Z" + 
				((key.match(/(num)/))? "0-9":"") + 
				((key.match(/(dash)/))? "-_":"") + "]*$", "g");

	if(exp.test(obj.value))
	{
		return false;
	}
	else
	{
		alert(msg);
		obj.focus();
		return true;
	}
}

function chk_key(keys) 
{ 
	var c = event.keyCode;
	var tp ='';

	if(event.shiftKey == false && 
			((c >= 48 && c <= 57) || (c >= 96 && c <= 105))) 
		tp = 'num'; 

	else if(event.shiftKey == true && 
			(( c >= 48 && c <= 57) || (c >= 96 && c <= 105))) 
		tp = 'sp';

	else if(c >= 65 && c <= 90) 
		tp = 'eng';

	else if(c == 229) 
		tp = 'han';

	else if(c == 106 || c == 107 || c == 109 || c == 111 || 
			(c >= 186 && c <= 192) || (c >= 219 && c <= 222) || 
			c == 32) 
		tp = 'sp';

	else 
		return true; 

	var mode = keys.split("/");
	for(i = 0; i < mode.length; i++) 
	{
		if(mode[i] == tp) 
			return true;

		else if(mode[i].match('^sp')) 
		{
			char = code2char(event.keyCode, event.shiftKey);

			if(char && mode[i].match('\\' + char)) 
				return true;
			else
				return false;
		} 
	} 

	return false;
}

function code2char(code, sift) 
{ 
	var chA = new Array();
	var chB = new Array();

	chA[106] = "*";
	chA[107] = "+";
	chA[109] = "-";
	chA[111] = "/";
	chA[186] = ";";
	chA[187] = "=";
	chA[188] = ",";
	chA[189] = "-";
	chA[190] = ".";
	chA[191] = "/";
	chA[192] = "`";
	chA[219] = "[";
	chA[220] = "\\";
	chA[221] = "]";
	chA[222] = "'";
	chB[186] = ":";
	chB[187] = "+";
	chB[188] = "<";
	chB[189] = "_";
	chB[190] = ">";
	chB[191] = "?";
	chB[192] = "~";
	chB[219] = "{";
	chB[220] = "|";
	chB[221] = "}";
	chB[222] = "\"";
	chB[49] = "!";
	chB[50] = "@";
	chB[51] = "#";
	chB[52] = "$";
	chB[53] = "%";
	chB[54] = "^";
	chB[55] = "&";
	chB[56] = "*";
	chB[57] = "(";
	chB[48] = ")";
	chB[32] = " ";

	if(chB[code] && sift == true) 
		return chB[code];
	else if(chA[code]) 
		return chA[code];
	else 
		return false;
}

function del_char(s, str)
{
	exp = new RegExp("[" + str + "]", "g");

	t = s.replace(exp, "");

    return t;
}

function number_format(num) 
{ 
	if (num < 0) 
	{ 
		num *= -1; 
		var minus = true;
	}
	else 
		var minus = false;
	
	var dotPos = (num + "").split(".");
	var dotU = dotPos[0];
	var dotD = dotPos[1];
	var commaFlag = dotU.length % 3;

	if(commaFlag) 
	{
		var out = dotU.substring(0, commaFlag);
		if (dotU.length > 3) out += ",";
	}
	else 
		var out = "";

	for (var i=commaFlag; i < dotU.length; i+=3) 
	{
		out += dotU.substring(i, i+3); 
		if( i < dotU.length-3) out += ",";
	}

	if(minus) out = "-" + out;
	if(dotD) return out + "." + dotD;
	else return out; 
}

function add_comma(obj)
{ 
	v = del_char(obj.value, ',');
	v = number_format(v);
	
	obj.value = v; 

	return true;
} 



-->