//¸Þ¼¼Áö ¹Ú½º
function msgBox(msgStr,msgType,goURL) {
	alert(msgStr);
	switch(msgType) {
		case 'GO':	document.location.href=goURL; break;
		case 'BACK':	history.back('1'); break;
		case 'TOP':	top.document.location.href=goURL; break;
		default :	break;
	}
}

//¸Þ¼¼Áö ±ÛÀÚ¼ö Á¦ÇÑ
function strChk(obj) {
	var tmpStr = obj.value;
	var tmpStrLen = 0;

	for(var i=0; i<tmpStr.length; i++) {
		tmpStrLen +=(tmpStr.charCodeAt(i)>127) ? 2 : 1;
		if(tmpStrLen>maxStrLimit) {
			msgBox(maxStrLimit+' byte ¹Ì¸¸À¸·Î ÀÛ¼ºÇØÁÖ¼¼¿ä','','');
			obj.value = tmpStr.substring(0,i);
			obj.focus();
			return;
		}
		document.getElementById('strCnt').innerHTML = tmpStrLen;
	}
}

//form Ã¼Å©
function formChk(){
	var memo = document.getElementById('memo');
	if (memo.value=='') {
		msgBox('³»¿ëÀ» ÀÛ¼ºÇØÁÖ¼¼¿ä','','');
		memo.focus();
		return false;
	}
}

function modalDialog(Id) {
	var option = "dialogWidth:300px;dialogHeight:135px;center:yes;dialogHide:yes;help:off;resizable:no;scroll:no;status:no;";
	window.showModalDialog( "./lib/alert.htm?Id="+Id, window, option );
}


//»èÁ¦ °ü¸®ÀÚ¸ðµå
function delChk(admin_del){
	var urls = document.URL;
	para = urls.split("?");
	var opener = window.dialogArguments;
	opener.document.location.href="../support_list.php?"+para[1]+"&mode=del&admin_del="+admin_del;
	self.close();
}
