//

var HDIR = "/kjo";

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

// Blue !!!	2007-01-24	ÀÌ±Ç¿¡ ´ëÇÑ ¼¼ºÎÇ×¸ñ
function relation_ViewChk(M) {
	switch (M) {
		case "Y":
			document.all.relation_View.style.display = '';
		break;

		case "N":
			document.all.relation_View.style.display = 'none';
		break;

		default:

	}
}

function check_ins(theForm){

	if(theForm.book.value == ""){
		alert("Please, enter the appropriate Vol.");
		theForm.book.focus();
		return false;
	}
	if(!Check_Num(theForm.book)){
		return false;
	}
	if(theForm.number.value == ""){
		alert("Please, enter the book No.");
		theForm.number.focus();
		return;
	}
	if(!Check_Num(theForm.number)){
		return false;
	}

	if(theForm.year.value == ""){
		alert("Please, enter the year.");
		theForm.year.focus();
		return;
	}
	if(!Check_Num(theForm.year)){
		return false;
	}

	if(theForm.regnum.value == ""){
		alert("Please, enter the amount of the books.");
		theForm.regnum.focus();
		return;
	}
	if(!Check_Num(theForm.regnum)){
		return false;
	}
	document.book_ins_form.submit();

}


// Blue!!		2006-05-18		±âÅ¸ Ç×¸ñ º¸ÀÌ±â ¸»±â~
function TypeEtc_View2(S,T) {
	var st = document.sform;

	var tmpType = eval("document.sform." + S);
	var tmpTypeEtc = eval("document.sform." + S + "_etc");
	var LN = tmpType.length;		// Blue!!		2006-05-18		¼³¸¶ 2°³´Â µÇ°ÚÁÒ -_-;;

	if (T == LN)
	{
		tmpTypeEtc.style.display = '';
		tmpTypeEtc.focus();
	} else {
		tmpTypeEtc.style.display = 'none';
		tmpTypeEtc.value = '';
	}
}

/*
*   ÀÛ¼ºÀÚ : ½ÅÈ£Á¤ (2003.12.5)
*   ³»¿ë : zip search °ø¿ëÈ­
*		¿ìÆí¹øÈ£ Æû ÀÌ¸§(zipno_name)
*		ÁÖ¼Ò Æû ÀÌ¸§(juso_name)
*/
	function Zipcheck(zipno_formname,juso_formname){
		window.open(HDIR + "/admin/zipsearch.php?zipno_name="+zipno_formname+"&juso_name="+juso_formname,"zipcheck","width=470,height=450,top=50,scrollbars=yes,resizable=yes");
	}


//-------------------------Æ¯¼ö¹®ÀÚ ÀÔ·Â-------------------------
function ch_insert(str)
{
	var win_left = (screen.width-640)/2;
	var win_top = (screen.height-480)/2;
	window.open (HDIR + "/include/sp_char.html?code="+str, "character", 'width=340, height=413, scrollbars=no, resizable=no, top=0,left=0')
}

//-------------------------Æ¯¼ö¹®ÀÚ ÀÔ·Â-------------------------
function ch_insert_ext(str,form)
{
	var win_left = (screen.width-640)/2;
	var win_top = (screen.height-480)/2;
	window.open (HDIR + "/include/sp_char.html?code="+str+"&form="+form, "character", 'width=340, height=513, scrollbars=no, resizable=no, top=0,left=0')
}

//Ã·ºÎÆÄÀÏÀ» 12°³±îÁö ´Ã¸®°í ÁÙÀÌ´Â ÇÔ¼ö
function file_count(scnt){
	for (var i=1; i<=scnt; i++)
	{
		div_play = eval("divList"+i+".style.display=''");
	}

	var jcnt = parseInt(scnt)+1;
	for (var j=jcnt; j<=12; j++)
	{
		div_play2 = eval("divList"+j+".style.display='none'");
		div_val = eval("sform.pic"+j+".value=''");
	}
}


function application_3(sform){

	if(!sform.pm_author.value){
		alert("Please, enter the corresponding author's name.");
		sform.pm_author.focus();
		return ;
	}
	if(!sform.pm_author_office.value){
		alert("Please, enter the corresponding author's affiliation.");
		sform.pm_author_office.focus();
		return ;
	}
	if(!sform.pm_author_email.value){
		alert("Please, enter the corresponding author's e-mail.");
		sform.pm_author_email.focus();
		return ;
	}
	if (!isEmail(sform.pm_author_email.value))
	{
		alert(" E-mail is not matched with provided form.");
		sform.pm_author_email.value="";
		sform.pm_author_email.focus();
		return false;
	}

	if(!sform.tot_authorE.value){
		alert("Please, enter the author's name in English.");
		sform.tot_authorE.focus();
		return ;
	}
	if(!sform.tot_officeE.value){
		alert("Please, fill in your affiliation in English.");
		sform.tot_officeE.focus();
		return ;
	}



	// Blue !!!	2007-01-15	ÀÌ±Ç °ü·Ã Ãß°¡ÇÕ´Ï´Ù.

//	if ((!sform.support_Chk[0].checked)&&(!sform.support_Chk[1].checked))
//	{
//		alert('ÀÌ±Ç¿¡ ´ëÇÑ ¹®Á¦ 1¹ø ¹®Ç×À» ¼±ÅÃÇØ ÁÖ¼¼¿ä..');
//		return;
//	}

	if ((!sform.finances_Chk[0].checked)&&(!sform.finances_Chk[1].checked))
	{
		alert('Please, answer about the concession issue...');
		return;
	} else {
		if (sform.finances_Chk[0].checked)
		{
			if (!sform.relation_Author.value)
			{
				alert('Please, enter the related author.');
				sform.relation_Author.focus();
				return;
			}

			if (!sform.relation_Place.value)
			{
				alert('Please, fill in the appropriate contents.');
				sform.relation_Place.focus();
				return;
			}

			if ((!sform.relation_Type[0].checked)&&(!sform.relation_Type[1].checked)&&(!sform.relation_Type[3].checked)&&(!sform.relation_Type[4].checked))
			{
				alert('Please, select the relation.');
				return;
			}
		}
	}

/*
	if(flag=="pre"){
			return true;
	}else if(flag=="reg"){
			sform.target = "";
			sform.action = "nonmoon_reg.php";
			sform.submit();
	}
*/
	if(sform.agree[0].checked){
		if(sform.retype.value=="N" || sform.retype.value=="L"){
			sform.action = "nonmoon_reinput.html";
			sform.submit();
		}else{
			sform.action = "nonmoon_input.html";
			sform.submit();
		}
	}else{
		alert("You have to accept the copyright agreement.");
		sform.agree[0].focus();
		return ;
	}

}

function application_4(flag){

	var sform = document.sform;

	if(!radioCheck(sform.non_type)){
		alert("Please, select the description of manuscript.");
		sform.non_type[0].focus();
		return false;
	}

	if(!radioCheck(sform.tr_Cate)){
		alert("Please, select the manuscript index field.");
		sform.tr_Cate[0].focus();
		return false;
	}

	if(!sform.non_title_e.value){
		alert("Please, fill in the title.");
		sform.non_title_e.focus();
		return false;
	}
	if(!sform.e_abstract.value){
		alert("Please, enter the Abstract.");
		sform.e_abstract.focus();
		return false;
	}
	if(!sform.keyword1.value){
		alert("Please, enter the keyword.");
		sform.keyword1.focus();
		return false;
	}

	if(sform.checklist_Chk.value == ""){
		alert("Please, confirm the check list.");
		return false;
	}

	if(!sform.filename.value){
		alert("Enter full text file");
		sform.filename.focus();
		return false;
	}

	if(formatChk(sform.filename)!="DOC" && formatChk(sform.filename)!="doc"){
		alert("ÆÄÀÏ È®ÀåÀÚ¸íÀÌ .docÀÎ ÆÄÀÏ¸¸ µî·Ï°¡´ÉÇÕ´Ï´Ù.");
		sform.filename.focus();
		return false;
	}

	for(k=1; k<13; k++) {
		var pCheck = eval("document.sform.pic"+ k);
		var pCheckValue = eval("document.sform.pic"+ k +".value");

		var tt = formatChk(pCheck);
		if(pCheckValue) {
			if((tt!="DOC") && (tt!="jpg")) {
				alert("ÆÄÀÏ È®ÀåÀÚ¸íÀÌ .jpgÀÎ ÆÄÀÏ¸¸ µî·Ï°¡´ÉÇÕ´Ï´Ù.");
				pCheck.focus();
				return false;
			}
		}
	}

	if(flag=="pre"){
		return true;
	}else if(flag=="reg"){
		sform.target = "";
		sform.action = "nonmoon_reg.php";
		sform.submit();
	}
	//
}

function application_remod(flag){

	var sform = document.sform;
	if(flag=="reg"){
		//document.all.progress.style.display="show";
		//document.all.main.style.display="none";
	}

	if(!sform.non_title_e.value){
		alert("Please, fill in the title.");
		sform.non_title_e.focus();
		return false;
	}
	if(!sform.e_abstract.value){
		alert("Please, enter the text.");
		sform.e_abstract.focus();
		return false;
	}

	if(!sform.keyword1.value){
		alert("Enter keyword");
		sform.keyword1.focus();
		return false;
	}
	/*
	if(formatChk(sform.filename)!="DOC" && formatChk(sform.filename)!="doc"){
		alert("ÆÄÀÏ È®ÀåÀÚ¸íÀÌ .docÀÎ ÆÄÀÏ¸¸ µî·Ï°¡´ÉÇÕ´Ï´Ù.");
		sform.filename.focus();
		return false;
	}
	*/

	if (sform.retype.value == 'L') {
		if (!sform.filename.value) {
			alert('Please, attach Full text file.');
			sform.filename.focus();
			return false;
		}

		if (!sform.coverFile.value) {
			alert('Please, attach Cover file.');
			sform.coverFile.focus();
			return false;
		}

		if(formatChk(sform.coverFile) != "DOC" && formatChk(sform.coverFile) != "doc") {
			alert("ÆÄÀÏ È®ÀåÀÚ¸íÀÌ .docÀÎ ÆÄÀÏ¸¸ µî·Ï °¡´ÉÇÕ´Ï´Ù.");
			sform.coverFile.focus();
			return false;
		}
	}


	for(k=1; k<13; k++) {
		var pCheck = eval("document.sform.pic"+ k);
		var pCheckValue = eval("document.sform.pic"+ k +".value");

		var tt = formatChk(pCheck);
		if(pCheckValue) {
			if((tt!="DOC") && (tt!="jpg")) {
				alert("ÆÄÀÏ È®ÀåÀÚ¸íÀÌ .jpgÀÎ ÆÄÀÏ¸¸ µî·Ï°¡´ÉÇÕ´Ï´Ù.");
				pCheck.focus();
				return false;
			}
		}
	}



	if(flag=="pre"){
		return true;
	}else if(flag=="reg"){
		sform.target = "";
		if(sform.retype.value=="N"){
			sform.action = "nonmoon_reg.php";
		}else if(sform.retype.value=="L"){
			sform.action = "nonmoon_final.php";
		}
		sform.submit();
	}
	//
}

function application_repre(sform,wid,hgt){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;

	if(application_remod('pre')){
		window.open('',"reapp_view",'width='+wid+',height='+hgt+',scrollbars=yes,resizable=no,top=' + window_top + ',left=' + window_left + '');

		document.sform.action="nonmoon_jView.html";
		document.sform.submit();
	}
}

function my_non_mod(){

	var sform = document.sform;
	if(!sform.author_body.value){
		alert("Please, enter the author's opinion.");
		history.back(-1);
		return false;
	}

	sform.action = "my_modify.php";
	sform.submit();
}


function application_pre(sform,wid,hgt){
	if(!application_4('pre')){
		return;
	}
	var window_left = (screen.width-640)/2;
	var window_top = 10;//(screen.height-100)/2;

	if(application_4('pre')){
		window.open('',"app_view",'width='+wid+',height='+hgt+',scrollbars=yes,resizable=no,top=' + window_top + ',left=' + window_left + '');

		document.sform.action="nonmoon_preview.html";
		document.sform.submit();
	}
}



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_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_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 MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
	obj.visibility=v; }
}

//----------------------  ¸Þ´º¹Ù --------------------------
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW = innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//------------------ ·Î±×ÀÎ CHECK FORM --------------
function LoginFrm(theForm)
{
	if (theForm.id.value == "") {
		window.alert("Please, enter your ID.");
		theForm.id.focus();
		return false;
	}
	if (theForm.user_passwd.value == "") {
		window.alert("Please, enter your password.");
		theForm.user_passwd.focus();
		return false;
	}
	return true;
}

//----------------------- »õÃ¢ ¶ç¿ì±â(½ºÅ©·Ñ¹Ù À¯) ----------------------------
function Win_scroll(theURL,wide,high) {
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(theURL,"Newwin",'width='+wide+',height='+high+',scrollbars=yes,resizable=no,top=' + window_top + ',left=' + window_left + '');
}

//----------------------- »õÃ¢ ¶ç¿ì±â(½ºÅ©·Ñ¹Ù ¹«) ----------------------------
function Win_mu(theURL,wide,high) {
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(theURL,"Newwin",'width='+wide+',height='+high+',scrollbars=no,resizable=no,top=' + window_top + ',left=' + window_left + '');
}

//----------------------- »õÃ¢ ¶ç¿ì±â(½ºÅ©·Ñ¹Ù À¯)- Ç×»ç »õÃ¢À» À§ÇØ ----------------------------
function Win_scroll(theURL,wide,high,wname) {
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(theURL,wname,'width='+wide+',height='+high+',scrollbars=yes,resizable=no,top=' + window_top + ',left=' + window_left + '');
}

//----------------------- °Ë»ö ----------------------------
function Search_send(theForm)
{
	if(theForm.keyword.value == "")
	{
		alert("Please, enter the keyword.");
		theForm.keyword.focus();
		return false;
	}
}

//------------------ ¶óµð¿À¹öÆ° CHECK --------------
function radioCheck(oN){
	for(i=0;i<oN.length;i++){
		if(oN[i].checked){ return true; }
	}
	return false;
}

function radioValue(oN){
	for(i=0;i<oN.length;i++){
		if(oN[i].checked){ return oN[i].value; }
	}
	return -1;
}

//-----------------------E-mail ÁÖ¼ÒÈ®ÀÎ----------------------------
function isEmail(str) {

  var supported = 0;
  if (window.RegExp) {
	var tempStr = "a";
	var tempReg = new RegExp(tempStr);
	if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported)
	return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}

//----------------------- ¼ýÀÚ È®ÀÎ ----------------------------
function Check_Num(theForm) {
	t = theForm.value ;
	for(i=0;i<t.length;i++) {
		if (t.charAt(i)<'0' || t.charAt(i)>'9') {
			alert("It's available to enter only numbers.") ;
			theForm.value="";
			theForm.focus();
			return false ;
		}
	}
	return true;
}

//----------------------- ¼ýÀÚ È®ÀÎ(ÀÚ¸®¼ö Æ÷ÇÔ) ----------------------------
function Check_Tel(theForm,mm) {
	t = theForm.value;
	for(i=0;i<t.length;i++) {
		if (t.charAt(i)<'0' || t.charAt(i)>'9') {
			alert("It's available to enter only numbers.") ;
			theForm.value="";
			theForm.focus() ;
			return false ;
		}
	}
	if (t.length < mm)
	{
		alert("Please, check the number length.");
		theForm.focus();
		return false;
	}
	return true;
}

//------------------------ ¿ìÆí¹øÈ£°Ë»ö ----------------------------
function OpenZipcode(z){    //open zip code check win
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	zName = HDIR + "/search_zipcode.html?zip_gubun="+z
	window.open(zName,"ZipWin",'width=436,height=250,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ º´¿ø°Ë»ö ----------------------------
function OpenHosp(z){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	murl = "/office_search.html?field="+z
	window.open(murl,"HosWin",'width=466,height=175,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}



//------------------------ »çÁø ÀÔ·Â ----------------------------
function OpenPhoto(str){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	murl = "/photo_up.html?num="+str;
	window.open(murl,"PhoWin",'width=441,height=256,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ °øÁö»çÇ× PopUp ----------------------------
function OpenNotify(murl){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(murl,"NoticeWin",'width=529,height=410,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ ÀÇ·á°è´º½º PopUp ----------------------------
function OpenNews(murl){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(murl,"NewsWin",'width=529,height=410,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ Çà»çÀÏÁ¤ PopUp ----------------------------
function OpenEvent(murl){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(murl,"NewsWin",'width=529,height=410,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}

//------------------------ »èÁ¦ ----------------------------
function delconf(murl)
{
	if(confirm("Are you sure delete it?"))
	window.location = murl;
}

//---------------------- ÂÊÁö popup -------------
function Memo_open(myurl){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open (myurl, "memo", 'width=414, height=268,scrollbars=yes,top=' + window_top + ',left=' + window_left + '')
}

//---------------------- ÂÊÁö -------------
function Memo_wasteconf(murl){
	if(confirm("Are you sure to delete the file? It will move to waste box."))
	window.location = murl;
}

//---------------------- ÂÊÁö -------------
function Memo_delconf(murl){
	if(confirm("Are you sure to delete it?\n\nSelected Message is deleted."))
	window.location = murl;
}

//---------------------- ÂÊÁö -------------
function Sender_delconf(murl){
	if(confirm("Will you delete the message?"))
	window.location = murl;
}

//---------------------- ÂÊÁö -------------
function Memo_actconf(murl){
	if(confirm("Will you restore the message box?"))
	window.location = murl;
}

//----------------------- ¾ÆÀÌµð / ÆÐ½º¿öµå Ã£±â ----------------------------
function Find_Send(theForm)
{
	if (!theForm.name.value) {
		window.alert("Please, enter the name.");
		theForm.name.focus();
		return false;
	}
	if (!theForm.email.value) {
		window.alert("Please, enter the e-mail account.");
		theForm.email.focus();
		return false;
	}
}


//--------------------- ÆÄÀÏ Æ÷¸Ë CHECK -------------------------
function formatChk(theForm)
{
	var fname = theForm.value;
	sp_arry = fname.split(".");
	sp_einx = sp_arry.length - 1;
	sp_arry[sp_einx] = sp_arry[sp_einx].toLowerCase();

	return sp_arry[sp_einx];
}
//----------------------- È¸¿ø°Ë»ö ----------------------------
function User_send(theForm)
{
	var cnt = 0;
	for( var i=0; i< theForm.elements.length; i++)
	{
		var temp = theForm.elements[i];
		if(temp.value != "")
		cnt += 1;
	}
	if (cnt == 0)
	{
		window.alert("Please, enter more than 1 conditions and words for search.");
		theForm.key.focus();
		return false;
	}else{
		if(theForm.key.value != "" && !theForm.keyword.value){
			window.alert("Please, enter the keywords.");
			theForm.keyword.focus();
			return false;
		}
		if(theForm.keyword.value != "" && !theForm.key.value){
			window.alert("Please, select the search option.");
			theForm.key.focus();
			return false;
		}
	}
}

function goQuiz()
{
	document.times_form.submit();
}

//------------------ ¾à°ü¿¡ µ¿ÀÇ --------------
function Chk_poll(theForm)
{
	if(!radioCheck(theForm.item))
	{
		alert("Please, select the item.");
		theForm.item[0].focus();
		return false;
	}
}

//------------------ ¾à°ü¿¡ µ¿ÀÇ --------------
function Chk_poll2(theForm)
{
	var num = document.poll_frm.num.value;

	for(var i = 0; i < document.poll_frm.item.length; i++) {
		if(document.poll_frm.item[i].checked == true) break;
	}
	if(i == document.poll_frm.item.length) {
		alert('Please, select the item.');
		return;
	}

	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;

	mUrl = "/poll/poll.php?num=" + num + "&item=" + document.poll_frm.item[i].value;
	window.open(mUrl,'poll','width=600,height=500,scrollbars=yes,resizable=yes,top=' + window_top + ',left=' + window_left + '');
	return false;
	theForm.submit();
}

//----------------- ÆË¾÷ -------------------------
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

//----------------- ÄûÁî ÆË¾÷ -------------------------
function openWin(murl,msize){
	window.open(murl,"popup",msize)
}
//------------------ ·Î±×ÀÎ CHECK --------------
function Loginsubmit()
{
	window.alert("This space is available Only for the members.");
	return false;
}

//----------------- °Ë»ö Á¶°ÇÁß ¼Ò¼ÓÀÏ¶§ selectbox·Î ³ªÅ¸³»±â---------
function type_list(){


}

//ÁÖ¹Î¹øÈ£ À¯È¿¼ºÀ» Ã¼Å© -- 2003.12.23 ½ÅÈ£Á¤
function JuminCheck(no1,no2)
	{
		if (no1.length != 6)
		{
		   return false;
		}
		else if (no2.length != 7)
		{
		   return false;
		}
		else
		{
		   var str_serial1 = no1;
		   var str_serial2 = no2;
		   var digit=0
		   for (var i=0;i<str_serial1.length;i++){
			var str_dig=str_serial1.substring(i,i+1);
			if (str_dig<'0' || str_dig>'9'){
			digit=digit+1
		   }
		}
		 if ((str_serial1 == '') || ( digit != 0 ))
		 {
			return false;
		  }
		 var digit1=0
			for (var i=0;i<str_serial2.length;i++){
				var str_dig1=str_serial2.substring(i,i+1);
				 if (str_dig1<'0' || str_dig1>'9'){
					 digit1=digit1+1
					}
		 }
		 if ((str_serial2 == '') || ( digit1 != 0 ))
		 {
			return false;
		  }
		 if (str_serial1.substring(2,3) > 1)
		 {
			return false;
		  }
		 if (str_serial1.substring(4,5) > 3)
		 {
			return false;
		  }
		 if (str_serial2.substring(0,1) > 4 || str_serial2.substring(0,1) == 0)
		 {
			return false;
		  }
			var a1=str_serial1.substring(0,1)
			var a2=str_serial1.substring(1,2)
			var a3=str_serial1.substring(2,3)
			var a4=str_serial1.substring(3,4)
			var a5=str_serial1.substring(4,5)
			var a6=str_serial1.substring(5,6)
			var check_digit=a1*2+a2*3+a3*4+a4*5+a5*6+a6*7

			var b1=str_serial2.substring(0,1)
			var b2=str_serial2.substring(1,2)
			var b3=str_serial2.substring(2,3)
			var b4=str_serial2.substring(3,4)
			var b5=str_serial2.substring(4,5)
			var b6=str_serial2.substring(5,6)
			var b7=str_serial2.substring(6,7)
			var check_digit=check_digit+b1*8+b2*9+b3*2+b4*3+b5*4+b6*5

			check_digit = check_digit%11
			check_digit = 11 - check_digit
			check_digit = check_digit%10

		 if (check_digit != b7)
		 {
			return false;
		 }
		 else
		 {
			return true;
		 }
		}
	}

//
function onCheck(theForm){

	if(theForm.id.value=="")
	{
		alert("Please, enter ID");
		theForm.id.focus();
		return false;
	}
	if(theForm.id.length<4 || theForm.id.length>30){
		alert("it can work when the more than 4 less than 30");
		theForm.id.focus();
		return false;
	}
	if(theForm.pwd.value=="")
	{
		alert("Please, enter your password.");
		theForm.pwd.focus();
		return false;
	}
	if(theForm.pwd_re.value=="")
	{
		alert("Please, check the password and enter it.");
		theForm.pwd_re.focus();
		return false;
	}
	if(theForm.pwd.value != theForm.pwd_re.value){
		alert("The password is not matched with your account.");
		theForm.pwd_re.focus();
		return false;
	}
	if(theForm.name.value=="")
	{
		alert("Enter the name.");
		theForm.name.focus();
		return false;
	}
	if(theForm.jumin1.value=="")
	{
		alert("Please, enter the resident No.");
		theForm.jumin1.focus();
		return false;
	}
	if(theForm.jumin2.value=="")
	{
		alert("Please, enter the resident No.");
		theForm.jumin2.focus();
		return false;
	}
	//Å×½ºÆ®¸¦ À§ÇØ ¸·¾Æ ³õÀ½
	/*if(!JuminCheck(theForm.jumin1.value,theForm.jumin2.value)){
		alert("The resident No. is not valid!");
		theForm.jumin1.focus();
		return false;
	}*/
	if (theForm.email.value=="")
	{
		alert("Enter e-mail!");
		theForm.email.focus();
		return false;
	}
	if (!isEmail(theForm.email.value))
	{
		alert("E-mail is not matched with privided form.");
		theForm.email.value="";
		theForm.email.focus();
		return false;
	}
	if(!radioCheck(theForm.marry))
	{
		alert("Please, select your marital status!");
		theForm.marry[0].focus();
		return false;
	}
	if(theForm.religion.value=="")
	{
		alert("Please, enter your religion!");
		theForm.religion.focus();
		return false;
	}

	if(theForm.zip1.value=="")
	{
		alert("Please, enter the zip code of your house!");
		return false;
	}
	if(theForm.addr.value=="")
	{
		alert("Please, fill in your address!");
		theForm.addr.focus();
		return false;
	}
	/*if(theForm.of_zip1.value=="")
	{
		alert("Please, enter the zip-code of your office!");
		return false;
	}
	if(theForm.of_addr.value=="")
	{
		alert("Please, fill in the address of your office!");
		theForm.of_addr.focus();
		return false;
	}*/
	if(theForm.tel1.value=="" || theForm.tel2.value=="" || theForm.tel3.value=="" )
	{
		alert("Please, fill in your house phone No!");
		theForm.tel1.focus();
		return false;
	}
	if(theForm.of_tel1.value=="" || theForm.of_tel2.value=="" || theForm.of_tel3.value=="" )
	{
		alert("Please, enter the phone No. of your office!");
		theForm.of_tel1.focus();
		return false;
	}
	if(theForm.pcs1.value=="" || theForm.pcs2.value=="" || theForm.pcs3.value=="" )
	{
		alert("Please, enter your cellular phone No!");
		theForm.pcs1.focus();
		return false;
	}
	if(theForm.serve_check.checked==true){
		if(theForm.hope_serve.value=="")
		{
			alert("Please, enter the category of expected service!");
			theForm.hope_serve.focus();
			return false;
		}
		if(theForm.serve_time.value=="")
		{
			alert("Please, enter the feasible terms of service!");
			theForm.serve_time.focus();
			return false;
		}
		if(!radioCheck(theForm.before_serve))
		{
			alert("Please, check the status of your service experience!");
			theForm.before_serve[0].focus();
			return false;
		}
	}

	theForm.action="register_detail_ok.html";
	return true;
}

//°¡ÀÔÁß ºÀ»ç°ü·Ã ÀÔ·ÂºÎºÐ »ç¶óÁö°í ³ªÅ¸³ª´Â function
function bongsa(rform){
	if(rform.serve_check.checked==true){
		document.all.hs.style.display = "block";
		document.all.st.style.display = "block";
		document.all.ar.style.display = "block";
		document.all.bs.style.display = "block";
		rform.serve_check.value="Y";
	}else{
		document.all.hs.style.display = "none";
		document.all.st.style.display = "none";
		document.all.ar.style.display = "none";
		document.all.bs.style.display = "none";
		rform.serve_check.value="N";
	}
}

//°¡ÀÔÁß Àü°øÀÇ,Àü¹®ÀÇ ÀÔ·ÂºÎºÐ »ç¶óÁö°í ³ªÅ¸³ª´Â function
function junmon(flag){
	if(flag==2){
		document.all.jm_no.style.display = "none";
		document.all.j_d.style.display = "none";
		document.all.jm_date.style.display = "none";
		document.all.jg_no.style.display = "none";
	}else{
		document.all.jm_no.style.display = "";
		document.all.j_d.style.display = "";
		document.all.jm_date.style.display = "";
		document.all.jg_no.style.display = "";
	}
}

function s_Check(form)
{
	var form = document.signform;
	if(!/(^[0-9]{3,12}$)/.test(form.special_num.value))
	{
		alert("¿Ã¹Ù¸¥ Àü¹®ÀÇ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
//		form.special_num.value="";
		form.special_num.focus();
		return false;
	}
	return true;
}

function s_Search(form)
{
	if(!form.special_num.value)
	{
		alert('Àü¹®ÀÇ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!');
		form.special_num.focus();
		return false;
	}else
	{
		if(s_Check(form))
		{
			var wmd = window.open('/s_result.html?special_num='+ form.special_num.value,'s_search','width=280,height=200,top=200,left=300');
			wmd.focus();
		}
	}
	return true;
}

function l_Check(form)
{
	var form = document.signform;
	if(!/(^[0-9]{3,12}$)/.test(form.license_num.value))
	{
		alert("Please, enter approprate No. of the doctor license.");
//		form.doc_num.value="";
		form.license_num.focus();
		return false;
	}
	return true;
}

function l_Search(form)
{
	if(!form.license_num.value)
	{
		alert('Please, enter Ph.D License No.');
		form.license_num.focus();
		return false;
	}else
	{
		if(l_Check(form))
		{
			var wmd = window.open('/l_result.html?license_num='+ form.license_num.value,'l_search','width=280,height=200,top=200,left=300');
			wmd.focus();
		}
	}
	return true;
}

function autor_checkid()
{
	if(document.signform.webmail_id.value !='')
	{
		SB_ID = /^[A-Za-z_\-]/;
		if (!SB_ID.test(document.signform.webmail_id.value))
		{
			alert('The first letter of your ID must be capital alphabet and only use english and numbers.');
			document.signform.webmail_id.value="";
			document.signform.webmail_id.focus();
			return;
		}

		var i
		var Digit = '<>?/\\+=-_)(*&^%$#@!.,;:\{\}[]\"\'\`\~'
		astr = Digit
		var t=document.signform.webmail_id.value
		if (astr.length > 1)
		{
			for(i=0;i<t.length;i++)
			{
				if(astr.indexOf(t.substring(i,i+1))>=0)
				{
					alert('The special character will not work in ID input.');
					document.signform.webmail_id.value="";
					document.signform.webmail_id.focus();
					return;
				}
			}
		}
		str=document.signform;
		if (str.webmail_id.value.length < 4 || str.webmail_id.value.length > 20)
		{
			alert("The ID should be made by less than 4 words and more than 20 words.");
			document.signform.webmail_id.focus();
			return;
		}
	}
}

function idCheck(rform){
	if(rform.id.value==""){
		alert("Please, enter your ID");
		rform.id.focus();
		return ;
	}else{
		if(rform.id.value.length<4 || rform.id.value.length>30){
			alert("it can work when the more than 4 less than 30");
			rform.id.focus();
			return;
		}else{
			Win_scroll(HDIR + '/member/check_id.html?id='+rform.id.value,380,300);
		}
	}
}

function idCheck_auth(rform){
	if(rform.f_commname.value==""){
		alert("Please, enter your community name.");
		rform.f_commname.focus();
		return ;
	}else{
			Win_scroll('/club/id_check_auth.html?name='+rform.f_commname.value,380,300);
	}
}


function checkIt(form){
   if (form.user_id.value=="") {
	  alert("Please, enter your ID");
	  form.user_id.focus();
	  return false;
   }
   if (form.user_passwd.value=="") {
	  alert("Please, enter your password.");
	  form.user_passwd.focus();
	  return false;
   }

	return true;
}

function ZipWindow(ref,what)
{
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	ref = ref + "?what=" + what;
	window.open(ref,"zipWin",'width=400,height=400,status=no,resizable=yes,top=' + window_top + ',left=' + window_left + '');
}
function put_postno(zip,kjuso)
{
	document.signform.office_zip.value = zip;
	document.signform.office_addr.value = kjuso;
	//document.signform.office_addr.focus();
	return;
}

function put_postno2(zip,kjuso)
{
	document.signform.home_zip.value = zip ;
	document.signform.home_addr.value = kjuso ;
	//document.signform.home_addr2.focus();
	return;
}

function put_postno3(p_code,p_juso) {
	var code_arr = p_code.split("-");
	document.checkform.addr_num1.value = code_arr[0];
	document.checkform.addr_num2.value = code_arr[1];
	document.checkform.addr.value = p_juso;
	return;
}

function IsNumber(formname)
{
	var form = eval("document.signform." + formname);

	for(var i = 0; i < form.value.length; i++)
	{
		var chr = form.value.substr(i,1);
		if(chr < '0' || chr > '9')
		{
			return false;
		}
	}
	return true;
}

function checkInput(form)
{
	if(form.id.value=="")
	{
		alert("Please, enter ID");
		form.id.focus();
		return false;
	}
	if(form.id.length<4 || form.id.length>30){
		alert("it can work when the more than 4 less than 30");
		form.id.focus();
		return false;
	}
	if(form.pwd.value=="")
	{
		alert("Please, enter your password.");
		form.pwd.focus();
		return false;
	}
	if(form.pwd_re.value=="")
	{
		alert("Please, check the password and enter it.");
		form.pwd_re.focus();
		return false;
	}
	if(form.pwd.value != form.pwd_re.value){
		alert("The password is not matched with your account.");
		form.pwd_re.focus();
		return false;
	}


	if (!form.ename.value)
	{
		alert("Please, enter your name in English.");
		form.ename.focus();
		return false;
	}
	if(!form.email.value){
		alert('Please, enter the e-mail account.');
		form.email.focus();
		return false;
	}
	else
	{
		if (!isEmail(form.email.value))
		{
			alert("The Email form is not right.");
			form.email.value = "";
			form.email.focus();
			valid = false;
			return false;
		}
	}

	if (!form.office_e.value)
	{
		alert("Please, enter your affiliation in Korean.");
		form.office_e.focus();
		return false;
	}

	if (form.phone_1.value=="" || form.phone_2.value=="" ||form.phone_3.value=="")
	{
		alert("Please. Enter the phone number.");
		form.phone_1.focus();
		return false;
	}

	return true;
}

function regist_Frm(theForm){
	theForm.action = "register.php";
	return true;
}

function back_Frm(theForm){
	theForm.action = "register_detail.html";
	theForm.submit();
}


function jCheck(rform){
	if(rform.jumin1.value=="" || rform.jumin2.value==""){
		alert("Please, enter the resident No.");
		rform.jumin1.focus();
		return ;
	}else{
		if(!CheckNum(rform.jumin1)){
			return false;
		}
		if(!CheckNum(rform.jumin2)){
			return false;
		}
		Win_scroll(HDIR + '/member/check_jumin.html?jumin1='+rform.jumin1.value+'&jumin2='+rform.jumin2.value,380,300);
	}
}

//----------------------- ¼ýÀÚ È®ÀÎ ----------------------------
function CheckNum(theForm) {
	t = theForm.value ;
	for(i=0;i<t.length;i++) {
		if (t.charAt(i)<'0' || t.charAt(i)>'9') {
			alert("It's available to enter only numbers.") ;
			theForm.value="";
			theForm.focus();
			return false ;
		}
	}
	return true;
}


// ¸ÞÀÎÆäÀÌÁö ¹è³Ê ½½¶óÀÌµù //////////////////////////////////////////////////
function start(){
 if (document.all)  scroller.start();
}
function stop(){
 if (document.all)  scroller.stop();
}

//²¿¸®±Û ´Þ±â
function Tail_Frm(theForm){
	if (!theForm.tbody.value)
	{
		alert("Please, fill in the contents.!");
		theForm.tbody.focus();
		return false;
	}
	if(theForm.tbody.value.length > 50){
		alert("It will be worked out limited to 50 letters.");
		theForm.tbody.focus();
		return false;
	}

	return true;
}

//»èÁ¦ÇÏ±â
function all_del(path){
	if(confirm('Are you sure delete it?')){
		location.href=path;
	}
}

//
function checkEvent(sform){
	if(!sform.name.value){
		alert("Please, fill in the registerer's name!");
		sform.name.focus();
		return false;
	}
	if (!sform.email.value)
	{
		alert("Enter e-mail!");
		sform.email.focus();
		return false;
	}
	if (!isEmail(sform.email.value))
	{
		alert("E-mail is not matched with provided form.");
		sform.email.value="";
		sform.email.focus();
		return false;
	}
	if (!sform.event.value)
	{
		alert("Please. Enter the conference name.!");
		sform.event.focus();
		return false;
	}
	if (!sform.body.value)
	{
		alert("Please, enter the conference information!");
		sform.body.focus();
		return false;
	}
	if (!sform.place.value)
	{
		alert("Please, enter the conference main venue!");
		sform.place.focus();
		return false;
	}

	return true;
}

//¸ÞÀÏ¾²±â-À§¿øÈ¸
function send_mail(sect,tosid,fromname,fromsid){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	var wide = 450;
	var high = 400;
	var theURL = "/wewon/message_write.html?section="+sect+"&tosid="+tosid+"&fromname="+fromname+"&fromsid="+fromsid+"&mode=S";
	//alert(theURL);
	window.open(theURL,"Newwin",'width='+wide+',height='+high+',scrollbars=yes,resizable=yes,top=' + window_top + ',left=' + window_left + '');
}

//¸ÞÀÏ¾²±â-À§¿øÈ¸ ¿©·¯»ç¶÷¿¡°Ô
function send_mail_total(sect,Brd_Frm,cname){
	var sid="";
	//------------------------ ÀüÃ¼Ã¼Å© ----------------------------
	alert(Brd_Frm.elements.length);
	for( var i=1; i<Brd_Frm.elements.length; i++)
	{
		var check = Brd_Frm.elements[i];
		if (check.checked)
		{
			//to=eval("document.Brd_Frm.to"+i+".value");
			to=check.value;
			if(sid==""){
				sid=to;
			}else{
				sid=sid+","+to;
			}

		}
	}

	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	var wide = 500;
	var high = 500;
	var theURL = "/wewon/message_write.html?section="+sect+"&cname="+cname+"&sid_list="+sid+"&mode=M";
	//alert(theURL);
	window.open(theURL,"Newwin",'width='+wide+',height='+high+',scrollbars=yes,resizable=yes,top=' + window_top + ',left=' + window_left + '');
}



//¸Þ¼¼Áö ¾²±â-À§¿øÈ¸
function send_msg(tosid,toname,fromsid,fromname){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	var wide = 450;
	var high = 400;
	var theURL = "/board/message_write_2.html?tosid="+tosid+"&toname="+toname+"&fromname="+fromname+"&fromsid="+fromsid;
	//alert(theURL);
	window.open(theURL,"Newwin",'width='+wide+',height='+high+',scrollbars=yes,resizable=yes,top=' + window_top + ',left=' + window_left + '');
}


function deb_Frm(sform){
	if(!sform.name.value){
		alert("Please, fill in the registerer's name!");
		sform.name.focus();
		return false;
	}
	if (!sform.email.value)
	{
		alert("Enter e-mail");
		sform.email.focus();
		return false;
	}
	if (!isEmail(sform.email.value))
	{
		alert("E-mail is not matched with provided form.");
		sform.email.value="";
		sform.email.focus();
		return false;
	}
	if (!sform.title.value)
	{
		alert("Please, enter the discussion issue!");
		sform.title.focus();
		return false;
	}
	if (!sform.body.value)
	{
		alert("Please, enter the discussion contents!");
		sform.body.focus();
		return false;
	}

	return true;
}


function checkItboard(form){
	if (!form.thesis_id.value)
	{
		alert('Please, insert the Manuscript No.');
		form.thesis_id.focus();
		return false;
	}

	if (!form.author.value)
	{
		alert("Please, enter the corresponding author's name.");
		form.author.focus();
		return false;
	}
	return true;
}

//------------------------ °Ë»öÈÄ ÂÊÁö º¸³»±â PopUp ----------------------------
function Memo_Win(murl,wth,ht){
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open(murl,"NewsWin",'width=529,height=410,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}

function SMS_open(myurl){
	window.open (myurl, "sms", "width=174,height=352,top=20,left=20,scrollbars=no, resizable=no")
}


function checkword(word)
{
	var charword;
	for(var i = 0; i < word.length; i++)
	{
		charword = word.charAt(i);
		if(charword.indexOf(" ") == -1) return true;
	}
	return false;
}

function checkWord(word)
{
	var charword;
	for(var i = 0; i < word.length; i++)
	{
		charword = word.charAt(i);
		if(charword.indexOf(" ") == -1) return true;
	}
	return false;
}
/*if(!radioCheck(form))
	{
		alert("Please, select your marital status.");
		form.marry[0].focus();
		return false;
   }
*/


function hospcheck(form)
{
	if(form.pwd.value.length < 4 || form.pwd.value.length > 8 || !checkword(form.pwd.value))
	{
		alert("Please, enter your password.");
		form.pwd.focus();
		return false;
	}

	if(form.re_pwd.value.length < 4 || form.re_pwd.value.length > 8 || !checkword(form.re_pwd.value))
	{
		alert("Please, enter your password.");
		form.re_pwd.focus();
		return false;
	}

	if(form.pwd.value != form.re_pwd.value){
		alert("The password is not matched with your account.");
		form.re_pwd.value="";
		form.re_pwd.focus();
		return false;
	}

	if(!form.hosp_name.value.length || !checkword(form.hosp_name.value))
	{
		alert("Please, enter the hospital name!!");
		form.hosp_name.focus();
		return false;
	}
	else if(!form.chief_name.value || !checkword(form.chief_name.value))
	{
		alert("Please, enter the director's name of the hospital!!");
		form.chief_name.focus();
		return false;
	}
	/*else if(!form.email.value || form.email.value.indexOf('@') < 2 || form.email.value.indexOf('.')  < 2)
	{
		window.alert("E-mailÀ»  Àß¸ø ÀÔ·ÂÇÏ¿´½À´Ï´Ù!!");
		form.email.focus();
		return false;
	}
	else if(!isEmail(form.email.value))
	{
		alert("E-mailÀ»  Àß¸ø ÀÔ·ÂÇÏ¿´½À´Ï´Ù!!");
		form.email.focus();
		return false;
	}*/
	else if(form.of_zip1.value.length != 3 || !Check_Num(form.of_zip1))
	{
		alert("Please, fill in the zipcode!!");
		//form.of_zip1.focus();
		return false;
	}
	else if(form.of_zip2.value.length != 3 || !Check_Num(form.of_zip2))
	{
		alert("Please, fill in the zipcode!!");
		//form.addr_num2.focus();
		return false;
	}
	else if(!form.of_addr.value || !checkword(form.of_addr.value))
	{
		alert("Please, fill in the address!!");
		form.of_addr.focus();
		return false;
	}
	else if(form.tel1.value.length < 2 || !Check_Num(form.tel1))
	{
		alert("Please, fill in the hospital phone no.!!");
		form.tel1.focus();
		return false;
	}
	else if(!radioCheck(form.gubun))
	{
		alert("Please, select the classification of the hospital!");
		form.gubun[0].focus();
		return false;
   }
	else if(form.tel2.value.length < 3 || !Check_Num(form.tel2))
	{
		alert("Please, fill in the hospital phone no.!!");
		form.tel2.focus();
		return false;
	}
	else if(form.tel3.value.length < 3 || !Check_Num(form.tel3))
	{
		alert("Please, fill in the hospital phone no.!!");
		form.tel3.focus();
		return false;
	}
	else if(!form.body.value.length || !checkword(form.body.value))
	{
		alert("Please, fill in the hospital information!");
		form.body.focus();
		return false;
	}
	if(form.item.value.length>48){
		alert("Please, fill out the specific subject (less than 50 letters) !");
		form.item.focus();
		return false;
	}

	return true;
}


//----------------------- Byte check ----------------------------
// Blue!!		2006-04-26		¿øº».. ¿¡¼­ ¼öÁ¤.. ±ÛÀÚ°¡ Àß¸®Áö ¾Ê´Â ´ë½Å ³Ñ¾î°¡Áö ¾Ê´Â´Ù.
function Byte_check(str,str_limit)
{
	theForm = document.sform;
	switch(str)
	{
		case "0" :
		var bodyForm = theForm.non_title;
		var bodyLimit = theForm.title_limit;
		break;

		case "1" :
		var bodyForm = theForm.non_title_e;
		var bodyLimit = theForm.etitle_limit;
		break;

		case "2" :
		var bodyForm = theForm.abstract;
		var bodyLimit = theForm.green_limit;
		break;

		case "3" :
		var bodyForm = theForm.e_abstract;
		var bodyLimit = theForm.egreen_limit;
		break;

		case "4" :
		var bodyForm = theForm.cover;
		var bodyLimit = theForm.cover_limit;
		break;
	}


	var bodyVal = bodyForm.value;
	var bodyLen = bodyVal.length;
	var bytesLen = 0;
	var validBodyLen = 0;
	var validBytesLen = 0;


	for (var i = 0; i < bodyLen; i++)
	{
		var oneChar = bodyVal.charAt(i);
		if (escape(oneChar).length > 4)
		{
			bytesLen += 2;
		}
		else if (oneChar!='\r')
		{
			bytesLen++;
		}
		if(bytesLen <= str_limit)
		{
			validBodyLen = i + 1;
			validBytesLen = bytesLen;
		}
	}

	if(bytesLen > str_limit)
	{
		alert(str_limit+"byte ÀÌ»óÀÇ ±ÛÀ» ¾²½Ç ¼ö ¾ø½À´Ï´Ù.");
//		var realBodyVal = bodyVal.substr(0, validBodyLen);
//		bodyForm.value = realBodyVal;
//		var bytesVal = validBytesLen;
		bytesVal = bytesLen;
		theForm.byteChk.value = 'N';		// Blue!!		2006-04-26		°ªÀ» ÃÊ°úÇßÀ»¶§¸¸ ¼öÁ¤ÇÏÀå~
		bodyForm.focus();
	}
	else
	{
		bytesVal = bytesLen;
		theForm.byteChk.value = '';
	}

	bodyLimit.value = bytesVal;
}

//----------------------- Byte check ----------------------------
/*		// Blue!!		2006-04-26		¿øº».. ÀÌ°Å ÇÏ¸é ±ÛÀÚ°¡ Â©¸®³ß~~
function Byte_check(str,str_limit)
{
	theForm = document.sform;
	switch(str)
	{
		case "0" :
		var bodyForm = theForm.non_title;
		var bodyLimit = theForm.title_limit;
		break;

		case "1" :
		var bodyForm = theForm.non_title_e;
		var bodyLimit = theForm.etitle_limit;
		break;

		case "2" :
		var bodyForm = theForm.abstract;
		var bodyLimit = theForm.green_limit;
		break;

		case "3" :
		var bodyForm = theForm.e_abstract;
		var bodyLimit = theForm.egreen_limit;
		break;

		case "4" :
		var bodyForm = theForm.cover;
		var bodyLimit = theForm.cover_limit;
		break;
	}
	var bodyVal = bodyForm.value;
	var bodyLen = bodyVal.length;
	var bytesLen = 0;
	var validBodyLen = 0;
	var validBytesLen = 0;

	for (var i = 0; i < bodyLen; i++)
	{
		var oneChar = bodyVal.charAt(i);
		if (escape(oneChar).length > 4)
		{
			bytesLen += 2;
		}
		else if (oneChar!='\r')
		{
			bytesLen++;
		}
		if(bytesLen <= str_limit)
		{
			validBodyLen = i + 1;
			validBytesLen = bytesLen;
		}
	}
	if(bytesLen > str_limit)
	{
		alert(str_limit+"byte ÀÌ»óÀÇ ±ÛÀ» ¾²½Ç ¼ö ¾ø½À´Ï´Ù.");
		var realBodyVal = bodyVal.substr(0, validBodyLen);
		bodyForm.value = realBodyVal;
		var bytesVal = validBytesLen;
	}
	else
	{
		bytesVal = bytesLen;
	}

	bodyLimit.value = bytesVal;
	bodyForm.focus();
}
*/





// Blue !!!	2007-01-10	replace
function replace3(str, out, add) {
	temp = "" + str;
	while (temp.indexOf(out)>-1) {
		pos= temp.indexOf(out);
		temp = "" + (temp.substring(0, pos) + add +
		temp.substring((pos + out.length), temp.length));
	}
	return temp;
}



//	Blue		2007-01-09		ÀÚ¼ö Ã¼Å©
function CharacterCount(strName, strLimit)
{
	if (strLimit <= 0) {
		return false;
	}

	var strGet = '';

	strGet = eval("document.sform." + strName);
	tmpStrGet = strGet.value;

	if (strLimit == '') return true;						// ±æÀÌ°¡ ¾ø´Ù¸é ±æÀÌ »ó°ü ÇÊ¿ä ¾ø´Ù´Â ¶æÀÌ¹Ç·Î ³Ñ¾î°£´Ù.

	var bodyVal = tmpStrGet;
	var bodyLen = bodyVal.length;

	if(bodyLen > strLimit)
	{
		document.getElementById(strName + "_Status").innerText = bodyLen + " / " + strLimit;
		alert("Current bytes : " + bodyLen +  "\n\nThe word length was exceeded the regulation (" + strLimit + " bytes)");
		return false;
	} else {
		document.getElementById(strName + "_Status").innerText = bodyLen + " / " + strLimit;
	}
}

//	Blue		2006-06-26		¹ÙÀÌÆ® Ã¼Å©
function ByteCount(strName)
{
	var strGet = '';

	strGet = eval("document.sform." + strName);
	strLimit = eval("document.sform." + strName + "_Limit").value;					//	Blue		¹Ýµå½Ã ÀÌ¸§±ÔÄ¢À» ¸¶ÃßÀÚ~

	if (strLimit == '') return true;						// ±æÀÌ°¡ ¾ø´Ù¸é ±æÀÌ »ó°ü ÇÊ¿ä ¾ø´Ù´Â ¶æÀÌ¹Ç·Î ³Ñ¾î°£´Ù.

	var bodyVal = strGet.value;
	var bodyLen = bodyVal.length;
	var bytesLen = 0;
	var validBodyLen = 0;
	var validBytesLen = 0;

	for (var i = 0; i < bodyLen; i++)
	{
		var oneChar = bodyVal.charAt(i);

		if (escape(oneChar).length > 4) {
				bytesLen += 2;
		} else if (oneChar!='\r') {
				bytesLen++;
		}

		if(bytesLen <= strLimit)
		{
			validBodyLen = i + 1;
			validBytesLen = bytesLen;
		}
	}

	if(bytesLen > strLimit)
	{
		alert("Current bytes : " + bytesLen +  "\n\nThe word length was exceeded the regulation (" + strLimit + " bytes)");
		var realBodyVal = bodyVal.substr(0, validBodyLen);
		var bytesVal = validBytesLen;
	} else {
		document.getElementById(strName + "_Status").innerText = bytesLen + " / " + strLimit;
	}
}


//	Blue		2006-06-26		½ÇÁ¦ µî·ÏµÈ ¹ÙÀÌÆ®¼ö °Ë»ç ([_] Æ÷ÇÔ ¾ÈÇÔ
function NullCheck(strField) {
	var strGet = strField.value;
	var regExp = /\s+/g;
	str = str.replace(regExp,'');
	alert(str.length);
}


//	Blue		2006-06-26		´Ü¾î¼ö Ã¼Å© ·çÆ¾ ^^&
function WordCount(strName, strLimit) {
	if (strLimit <= 0) {
		return false;
	}

	var strWordsLen = 0;

	strGet = eval("document.sform." + strName).value;

	if (strLimit == '') {
		return true;						// ±æÀÌ°¡ ¾ø´Ù¸é ±æÀÌ »ó°ü ÇÊ¿ä ¾ø´Ù´Â ¶æÀÌ¹Ç·Î ³Ñ¾î°£´Ù.
	} else {
		if (strGet.length == 0) {
			document.getElementById(strName + "_Status").innerText = "0 / " + strLimit;
			return false;
		}
	}

	var regExp = /\s+/g;
	str = strGet.split(regExp);

	strWordsLen = str.length;

	if (strWordsLen > strLimit) {
		document.getElementById(strName + "_Status").innerText = strWordsLen + " / " + strLimit;
		alert("Current words : " + strWordsLen +  "\n\nThe word length was exceeded the regulation (" + strLimit + " words)");
		return false;
	} else {
		document.getElementById(strName + "_Status").innerText = strWordsLen + " / " + strLimit;
	}
}






// Blue !!!	2008-09-24	ÆË¾÷¿¡¼­ »õÃ¢ÇüÅÂ·Î º¯°æÇÏ¿´À½.
function checklist_ChkFun () {
	var chk = document.getElementById("checklist_Chk");
	var tmpimg = "";

	if (chk.value == "Y") {
		chk.value = "";
		tmpimg = "../icon/check_no.gif";
	} else {
		chk.value = "Y";
		tmpimg = "../icon/check_yes.gif";
	}

	document.getElementById("checklist_IMG").src = tmpimg;
}









//	2008-05-16	¸Þ¸ðµî·Ï
function Memo_AdmitConfirm(mode, type, no) {
	var f, note_obj, addText = '';
	f = document.frm_layer_submit;
	if (mode == "Info") addText = "_Info";
	note_obj = eval("document.List_Frm.finish_note" + addText + no);

	f.num.value = no;
	f.mode.value = mode;
	f.type.value = type;
	f.finish_note.value = note_obj.value;

	if (!confirm("ÀúÀåÇÏ½Ã°Ú½À´Ï±î?")) return;
	f.submit();
}


// Blue !!!	2008-06-05	³¯Â¥Ãß°¡
function Memo_DateAppend(mode, no) {
	var f, note_obj, addText = '';
	f = document.frm_layer_submit;
	now = new Date();

	if (mode == "Info") addText = "_Info";
	note_obj = eval("document.List_Frm.finish_note" + addText + no);
	if (note_obj.value)
	{
		note_obj.value += "\n\n=======================================\n# " + now.toLocaleString() + " \n";
	} else {
		note_obj.value = "# " + now.toLocaleString() + " \n";
	}
	note_obj.focus();
}






//------------- ·¹ÀÌ¾î º¸±â -----------------
function Memo_ondisplay(id, event) {
	var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
	var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
	if (!event) var event = window.event;
	var ex = event.x;
	var ey = event.y;

	var obj = document.getElementById(id);
	dd = obj.style;

	if ( bNetscape4plus ) {
		ey = ey + top.pageYOffset;
		ex = top.pageXOffset + 700;
	} else if ( bExplorer4plus ) {
		ey = ey + Math.max(document.documentElement.scrollTop, document.body.scrollTop);
		ex = ex - 100;
	}
	dd.top = ey + "px";
	dd.left = ex + "px";
	dd.display = 'block';
	dd.visibility = 'visible';
}
//------------- ·¹ÀÌ¾î ´Ý±â -----------------
function Memo_offdisplay(id) {
	var obj = document.getElementById(id);
	dd = obj.style;
	dd.display = 'none';
	dd.visibility = 'hidden';
}


function doWinSize(obj) {
	if (event.wheelDelta > 0) {
		if (parseInt(obj.style.height)>=100) {
			obj.style.height = parseInt(obj.style.height) - 50;
		}
	} else {
		obj.style.height = parseInt(obj.style.height) + 50;
	}
}

// Blue !!!	2008-06-11	¹Ì´Ï¸Þ´º¿ë Å¬¸¯ ÀÌº¥Æ® Ã³¸®
var MiniMenu_View = -1;		// ÇöÀç º¸ÀÌ´Â °Í°ú ´Ù¸¥°ÍÀ» Å¬¸¯ÇÏ¿´´ÂÁö Ã¼Å© (idx ·Î È®ÀÎÇÔ)
function MiniMenu_Display(idx) {
	var obj = document.getElementsByName("MiniMenu_Layer");
	dd = obj[idx].style;

	if (MiniMenu_View == idx)						// °°À» °æ¿ì¿£ º¸ÀÌÁö ¾Êµµ·Ï ¼öÁ¤ÇÔ.
	{
		MiniMenu_View = -1;							// ÃÊ±âÈ­ (¾Æ¹«°Íµµ ¼±ÅÃÇÏÁö ¾Ê¾ÒÀ½. idx => 0 ºÎÅÍ ½ÃÀÛÇÕ´Ï´Ù.)
		dd.display = 'none';
		dd.visibility = 'hidden';
	} else {										// ´Ù¸¦°æ¿ì ±âÁ¸°ÍÀ» ¼û±â°í, ÇöÀç°ÍÀ» º¸¿©ÁÝ´Ï´Ù.
		dd.display = 'block';
		dd.visibility = 'visible';

		if (MiniMenu_View == -1) {					// ÃÊ±âÄ¡ ÀÏ°æ¿ì °´Ã¼°¡ Á¸ÀçÇÏÁö ¾ÊÀ¸¹Ç·Î Ã³¸®¿¡¼­ Á¦¿ÜÇÔ.
		} else {
			obj[MiniMenu_View].style.display = 'none';
			obj[MiniMenu_View].style.visibility = 'hidden';
		}

		MiniMenu_View = idx;						// ÇöÀç ÀÎµ¦½º °ªÀ» °¡Áö°í ÀÖÀ½.
	}
}



// Blue !!!	2007-09-13	½É»ç·á Áö±Þ ºÎºÐ
function Judge_FeeChk(MD, CHK, TRNO, IDX) {
	var msg = "";
	var st = document.List_Frm;

	st.tmpMD.value = MD;
	st.tmpNo.value = TRNO;

	if (MD == "S") {
		msg = "°ÔÀç·á Á¤º¸¸¦ º¯°æÇÏ½Ã°Ú½À´Ï±î?";
	} else {
		switch (CHK) {
			case "Y":
				msg = "»óÅÂ¸¦ `ÀÔ±Ý`À¸·Î º¯°æÇÏ½Ã°Ú½À´Ï±î?";
			break;

			default:
				msg = "»óÅÂ¸¦ `¹ÌÀÔ±Ý`À¸·Î º¯°æÇÏ½Ã°Ú½À´Ï±î?";
		}
	}

	if (st.feeMemo.length == undefined) {
		st.tmpFeeMemo.value = st.feeMemo.value;
	} else {
		st.tmpFeeMemo.value = st.feeMemo[IDX].value;
	}

	st.tmpFee.value = CHK;
	st.action = "fee_UpDate.php";

	if (confirm(msg)) {
		st.submit();
	} else {
		return false;
	}
}