/* Title */
//document.title="";

//FlashInsert
var flagIE;
var swfObj;
function inputSWF (s, w, h, i, v) {
	i = (i) ? i : "swfMain";
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="'+i+'" width="'+w+'" height="'+h+'"><param name=movie value="'+s+'"><param name=quality value="high"><param name="wmode" value="transparent"><param name=allowScriptAccess value="always">');
	document.write('<embed allowScriptAccess="always" name="'+i+'" src="'+s+'" width="'+w+'" height="'+h+'" flashVars="'+v+'" type="application/x-shockwave-flash" quality=high pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>');

	flagIE = navigator.appName.indexOf("Microsoft") != -1;
	swfObj = flagIE ? document.all.swfMain : document.swfMain;
};

function inputEMB (s, w, h, i, v, e) {
	if ( navigator.appName == "Netscape" )
	{
	navigator.plugins.refresh();
	document.write("<" + "applet MAYSCRIPT Code=NPDS.npDSEvtObsProxy.class" )
	document.writeln(" WIDTH=5 HEIGHT=5 NAME=appObs> </applet>")
	} 
	document.write('<OBJECT id="'+i+'" width="'+w+'" height="'+h+'" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" VIEWASTEXT>')
	document.write('<param name="filename" value="'+s+'">')
		document.write('<param name="AutoStart" value="true">')
	//document.write('<param name="AutoStart" value=""'+v+'"">')
	document.write(e)
	document.write('</OBJECT>')
	
};

//FS_Command
function swfMain_DoFSCommand(command, args) {
	var swfMainObj = swfObj;
	switch (command){
		case "set_subjct":
			//a = args.split(",");
			alert(args);
			break;

		default :
			break;
	}
};

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub swfMain_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call swfMain_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}


/*############################# Æ÷Ä¿½º ÀÌµ¿ ################################# */
/* Æ÷Ä¿½º ÀÌµ¿ */
function f_focus(obj){
	var obj=obj;
	document.getElementById(obj).focus();
}
/*############################# Æ÷Ä¿½º ÀÌµ¿// ################################# */

/*############################# ÁÖ¹Î¹øÈ£ Æ÷Ä¿½º ÀÌµ¿ ################################# */
/*
c_obj = °Ë»çÇÒ °´Ã¼
m_obj = ÀÌµ¿ÇÒ °´Ã¼
*/

function move_focus(c_obj,m_obj){
	var c_obj = document.getElementById(c_obj);
	var m_obj = document.getElementById(m_obj);
	if(c_obj.value.length == 6){
		m_obj.focus();
	}
}
/*############################# ÁÖ¹Î¹øÈ£ Æ÷Ä¿½º ÀÌµ¿// ################################# */

/*############################# null Ã¼Å© ½ÃÀÛ################################# */
//objname = °Ë»çÇÒ °´Ã¼
function null_chk(objname,error_message){
	var obj      = objname;																		 //obj °´Ã¼¿¡ ¹Þ¾Æ¿Â °´Ã¼¸¦ ³Ö´Â´Ù.
	if(obj.value == ""){																		 // ¸¸¾à obj°¡ ºñ¾îÀÖ´Ù¸é
		msg = error_message;
		alert(msg);																							 // ¿À·ù ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù.
//		obj.focus();																						 	 // ÇØ´çÄÁÆ®·Ñ·Î Ä¿¼­¸¦ ÀÌµ¿ÇÑ´Ù.
		return false;
	}
}
/*############################# null ÀÔ·Â Ã¼Å© ³¡################################# */

/*##################### ¹üÀ§ ¾ÈÀÇ ¹®ÀÚ ÀÔ·Â Ã¼Å© ½ÃÀÛ######################### */
//objname = °Ë»çÇÒ °´Ã¼
//txt_min = ÃÖ¼Ò±ÛÀÚ
//txt_max = ÃÖ´ë±ÛÀÚ
function length_chk(objname,txt_min,txt_max){
	var obj           = objname;																		 //obj °´Ã¼¿¡ ¹Þ¾Æ¿Â °´Ã¼¸¦ ³Ö´Â´Ù.
          objlength = obj.value.length;															 // obj°´Ã¼¿¡ ÀÖ´Â ÅØ½ºÆ®ÀÇ ±æÀÌ¸¦ ±¸ÇÑ´Ù.
	if(objlength < txt_min || objlength > txt_max ){										 //¸¸¾à ±æÀÌ°¡ ±âÁØÄ¡ ¾È¿¡ µé¾î¿Â´Ù¸é
		msg = "±ÛÀÚ¼ö´Â ÃÖ¼Ò "+ txt_min + ", ÃÖ´ë " + txt_max + " ±ÛÀÚ ÀÔ´Ï´Ù."; // Ãâ·ÂÇÒ ¿À·ù ¸Þ¼¼Áö¸¦ Á¤ÀÇÇÑ´Ù.
		alert(msg);																							 // ¿À·ù ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù.
		//obj.focus();																						 	 // ÇØ´çÄÁÆ®·Ñ·Î Ä¿¼­¸¦ ÀÌµ¿ÇÑ´Ù.
		return false;
	}
}
/*##################### ¹üÀ§ ¾ÈÀÇ ¹®ÀÚ ÀÔ·Â Ã¼Å© ³¡######################### */

/*##################### textarea ¼ýÀÚ Ä«¿îÅÍ ¹× ÇÑ°èÃ¼Å© ½ÃÀÛ######################### */
//objname = °Ë»çÇÒ °´Ã¼
//txt_max = ÃÖ´ë±ÛÀÚ
//re_object = Ä«¿îÅÍµÈ ¼ýÀÚ¸¦ Ãâ·ÂÇÒ °´Ã¼¸í
function limit_chk(objname,txt_max,re_object){
	var obj           = objname;																		//obj °´Ã¼¿¡ ¹Þ¾Æ¿Â °´Ã¼¸¦ ³Ö´Â´Ù.
		  objlength = obj.value.length;															// obj°´Ã¼¿¡ ÀÖ´Â ÅØ½ºÆ®ÀÇ ±æÀÌ¸¦ ±¸ÇÑ´Ù.
	if(objlength > txt_max ){																			//¸¸¾à ±æÀÌ°¡ ±âÁØÄ¡º¸´Ù Å©´Ù¸é
		msg = "±ÛÀº " + txt_max + " ±ÛÀÚ±îÁö¸¸ ÀÔ·ÂÇÏ½Ç¼ö ÀÖ½À´Ï´Ù.";				// Ãâ·ÂÇÒ ¿À·ù ¸Þ¼¼Áö¸¦ Á¤ÀÇÇÑ´Ù.
		alert(msg);																							// ¿À·ù ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù.
		obj.value    = obj.value.substr(0,txt_max);											//ÇÑ°èÄ¡¸¦ ³Ñ¾î¼± ¹®ÀÚ´Â »èÁ¦ÇØÁØ´Ù.
	}
	if(re_object != null){																				//¸¸¾à Ä«¿îÅÍÇ¥½ÃÇØÁÙ °´Ã¼°¡ ÇÊ¿ä ÇÏ´Ù¸é
		var re_obj    = re_object;																		// Ä«¿îÅÍµÈ ¼ýÀÚ Ç¥½ÃÇØÁÙ °´Ã¼¸¦ ¸¸µç´Ù.
		re_obj.value = obj.value.length;															// Ä«¿îÅÍµÈ ¼ýÀÚ¸¦ °´Ã¼·Î »Ñ·ÁÁØ´Ù.
	}
}
/*##################### textarea ¼ýÀÚ Ä«¿îÅÍ ¹× ÇÑ°èÃ¼Å© ³¡######################### */

/*######################### ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å© ½ÃÀÛ ############################ */
//objname = °Ë»çÇÒ °´Ã¼

function jumin_chk(objname) { 
    var obj = objname
	var jumin = objname.value;
	var weight = "234567892345";																// ÀÚ¸®¼ö weight ÁöÁ¤ 
    var val		  = jumin.replace("-","");															// "-"(ÇÏÀÌÇÂ) Á¦°Å 
    var sum	  = 0; 

    if(val.length != 13) {																				// ÁÖ¹Î¹øÈ£°¡ 13±ÛÀÚ°¡ ¾Æ´Ï¶ó¸é ¿À·ù¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù.
		alert("ÁÖ¹Îµî·Ï¹øÈ£ 13ÀÚ¸®¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä.");
		obj.focus();																						 	 // ÇØ´çÄÁÆ®·Ñ·Î Ä¿¼­¸¦ ÀÌµ¿ÇÑ´Ù.
		return false;
	}															
		
    for(i=0;i<12;i++) { 
        sum += parseInt(val.charAt(i)) * parseInt(weight.charAt(i)); 
    } 

    var result		  = (11 - (sum % 11)) % 10; 
    var check_val = parseInt(val.charAt(12)); 

    if(result != check_val) {																			//ÁÖ¹Î¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾ÊÀ¸¸é ¿À·ù¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù.
		alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù..");
//		obj.focus();	
		return false;
	}else{
		return true; 
	}
}
/*######################### ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å© ³¡ ############################# */

/*######################### ¸ÞÀÏÁÖ¼Ò À¯È¿¼º Ã¼Å© ½ÃÀÛ ########################## */
//objname = °Ë»çÇÒ °´Ã¼
function mail_chk(objname){
	var obj = objname.value; 
	if(!(obj.match(/[\w\-\~]+\@[\w\-\~]+(\.[\w\-\~]+)+/g)==obj) ) {
		alert("¸ÞÀÏ ÁÖ¼Ò°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");  
//		objname.focus();																					//°´Ã¼¿¡ Æ÷Ä¿½º¸¦ ¸ÂÃá´Ù.
		return false;
	}
	var chk_obj = objname.createTextRange();
	var check_word = "daum.net".toLowerCase();
	var check_word1 = "hanmail.net".toLowerCase();
	if(chk_obj.findText(check_word) || chk_obj.findText(check_word1)){
		alert("ÇÑ¸ÞÀÏÀº »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù.");
//		objname.focus();
		return false;
	}
}
/*######################### ¸ÞÀÏÁÖ¼Ò À¯È¿¼º Ã¼Å© ³¡ ########################## */

/*######################### ¼ýÀÚ¸¸ ÀÔ·Â Ã¼Å© ½ÃÀÛ ########################### */
function NumObj(objname,addStr){
	if (event.keyCode >= 48 && event.keyCode <= 57) { //¼ýÀÚÅ°¸¸ ÀÔ·Â
		return true;
	}else if(event.keyCode == 45 && addStr == "-"){
		return true
	}else if(event.keyCode == 46 && addStr == "."){
		 return true
	}else {
		event.returnValue = false;
	}
}
/*style="ime-mode:disabled" onKeyPress="NumObj(this,'-');" Ãß°¡*/
/*######################### ¼ýÀÚ¸¸ ÀÔ·Â Ã¼Å© ³¡ ########################### */


/* #########################ÁÖ¹Îµî·Ï¹øÈ£¸¦ ³ªÀÌ·Î º¯È¯ #########################*/
/*lno = ÁÖ¹Î¹øÈ£ ¾ÕÀÚ¸®*/
/*lno = ÁÖ¹Î¹øÈ£ µÞÀÚ¸®*/
function agechange(lno,rno) {
    var refArray = new Array(18,19,19,20,20,16,16,17,17,18);
    var refyy = rno.substring(0,1);
    var refno = lno.substring(0,2);
    var biryear = refArray[refyy] * 100 + eval(refno);
    
    var nowDate = new Date();
    var nowyear = nowDate.getYear();
    return nowyear - biryear + 1;
}
/* #########################ÁÖ¹Îµî·Ï¹øÈ£¸¦ ³ªÀÌ·Î º¯È¯ ³¡#########################*/


/* ######################### ¹®ÀÚ¿­¿¡¼­ ¼ýÀÚ¸¸ °¡Á®°¡±â #########################*/
function get_number(str) { 
    var val = str; 
    var temp = ""; 
    var num = ""; 

    for(i=0; i<val.length; i++) { 
        temp = val.charAt(i); 
        if(temp >= "0" && temp <= "9") num += temp; 
    } 
    return num; 
}
/* ######################### ¹®ÀÚ¿­¿¡¼­ ¼ýÀÚ¸¸ °¡Á®°¡±â// #########################*/


/*######################### ºñ¹Ð¹øÈ£ Ã¼Å© #########################*/
/*
input = Ã¹¹ø? password ÇÊµå
input2 = µÎ¹ø? password ÇÊµå
min = ºñ¹Ð¹øÈ£ ÃÖ¼ÒÀÚ¸®
max = ºñ¹Ð¹øÈ£ ÃÖ´ëÀÚ¸®
*/
function check_passwd(input, input2, min, max) {

    if(!input.value) {																			/*¸¸¾à ºñ¹Ð¹øÈ£1 ¶õÀÌ °ø¹éÀÌ¶ó¸é*/
        alert('Insert Password.');												/*¿À·ù ¸Þ¼¼Áö Ãâ·Â*/
        input.focus();																			/*Æ÷Ä¿½º¸¦ À§Ä¡ÇÑ´Ù.*/
        return false;																				/*false °ªÀ» ¹ÝÈ¯ÇÑ´Ù.*/
    }
    else if(Byte(input.value) < min || Byte(input.value) > max ) {	/*¸¸¾à ºñ¹Ð¹øÈ£°¡ ÃÖ¼Ò ±ÛÀÚº¸´Ù ÀÛ°Å³ª ÃÖ´ë ±ÛÀÚº¸´Ù Å©¸é*/
		str_msg = "ºñ¹Ð¹øÈ£ÀÇ ±æÀÌ´Â ÃÖ¼Ò" + min + ", ÃÖ´ë " + max + "·Î ÀÔ·ÂÇØ ÁÖ¼¼¿ä";	
        alert(str_msg);																			/*¿À·ù ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù.*/
        input.focus();																			/*Æ÷Ä¿½º¸¦ ¸ÂÃçÁØ´Ù*/
        input.value='';																			/*ºñ¹Ð¹øÈ£ ÀÔ·Â¶õÀ» ÃÊ±âÈ­ ÇÑ´Ù*/
        input2.value='';																		/*ºñ¹Ð¹øÈ£ ÀÔ·Â¶õÀ» ÃÊ±âÈ­ ÇÑ´Ù.*/
        return false;																				/*false °ªÀ» ¹ÝÈ¯ÇÑ´Ù.*/
    }
    else if(!input2.value) {																	/*¸¸¾à ºñ¹Ð¹øÈ£2 ¶õÀÌ °ø¹éÀÌ¶ó¸é*/
        alert('È®ÀÎºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');										/*¿À·ù ¸Þ¼¼Áö Ãâ·Â*/
        input2.focus();																			/*Æ÷Ä¿½º¸¦ À§Ä¡ÇÑ´Ù.*/
        return false;																				/*false °ªÀ» ¹ÝÈ¯ÇÑ´Ù.*/
    }
    else if(input.value != input2.value) {											/*¸¸¾à ºñ¹Ð¹øÈ£1°ú ºñ¹Ð¹øÈ£2°¡ µ¿ÀÏÇÏÁö ¾Ê´Ù¸é*/
        alert('ºñ¹Ð¹øÈ£°¡ ¼­·Î ´Ù¸£°Ô ÀÔ·ÂµÇ¾ú½À´Ï´Ù.');								/*¿À·ù ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù.*/
        input2.value='';																		/*ºñ¹Ð¹øÈ£2¶õÀ» ÃÊ±âÈ­ÇÑ´Ù.*/
        input2.focus();																			/*Æ÷Ä¿½º¸¦ À§Ä¡ÇÑ´Ù.*/
        return false;																				/*false °ªÀ» ¹ÝÈ¯ÇÑ´Ù.*/
    }
    else return true; 
}
/*######################### ºñ¹Ð¹øÈ£ Ã¼Å© ³¡ #########################*/

/*######################### ºñ¹Ð¹øÈ£ Ã¼Å© 2 #########################*/
/*
input = Ã¹¹ø? password ÇÊµå
input2 = µÎ¹ø? password ÇÊµå
min = ºñ¹Ð¹øÈ£ ÃÖ¼ÒÀÚ¸®
max = ºñ¹Ð¹øÈ£ ÃÖ´ëÀÚ¸®
*/
function null_check_passwd(input, input2, min, max) {

    if(Byte(input.value) < min || Byte(input.value) > max ) {	/*¸¸¾à ºñ¹Ð¹øÈ£°¡ ÃÖ¼Ò ±ÛÀÚº¸´Ù ÀÛ°Å³ª ÃÖ´ë ±ÛÀÚº¸´Ù Å©¸é*/
		str_msg = "ºñ¹Ð¹øÈ£ÀÇ ±æÀÌ´Â ÃÖ¼Ò" + min + ", ÃÖ´ë " + max + "·Î ÀÔ·ÂÇØ ÁÖ¼¼¿ä";	
        alert(str_msg);																			/*¿À·ù ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù.*/
        input.focus();																			/*Æ÷Ä¿½º¸¦ ¸ÂÃçÁØ´Ù*/
        input.value='';																			/*ºñ¹Ð¹øÈ£ ÀÔ·Â¶õÀ» ÃÊ±âÈ­ ÇÑ´Ù*/
        input2.value='';																		/*ºñ¹Ð¹øÈ£ ÀÔ·Â¶õÀ» ÃÊ±âÈ­ ÇÑ´Ù.*/
        return false;																				/*false °ªÀ» ¹ÝÈ¯ÇÑ´Ù.*/
    }
    else if(!input2.value) {																	/*¸¸¾à ºñ¹Ð¹øÈ£2 ¶õÀÌ °ø¹éÀÌ¶ó¸é*/
        alert('È®ÀÎºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.');										/*¿À·ù ¸Þ¼¼Áö Ãâ·Â*/
        input2.focus();																			/*Æ÷Ä¿½º¸¦ À§Ä¡ÇÑ´Ù.*/
        return false;																				/*false °ªÀ» ¹ÝÈ¯ÇÑ´Ù.*/
    }
    else if(input.value != input2.value) {											/*¸¸¾à ºñ¹Ð¹øÈ£1°ú ºñ¹Ð¹øÈ£2°¡ µ¿ÀÏÇÏÁö ¾Ê´Ù¸é*/
        alert('ºñ¹Ð¹øÈ£°¡ ¼­·Î ´Ù¸£°Ô ÀÔ·ÂµÇ¾ú½À´Ï´Ù.');								/*¿À·ù ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù.*/
        input2.value='';																		/*ºñ¹Ð¹øÈ£2¶õÀ» ÃÊ±âÈ­ÇÑ´Ù.*/
        input2.focus();																			/*Æ÷Ä¿½º¸¦ À§Ä¡ÇÑ´Ù.*/
        return false;																				/*false °ªÀ» ¹ÝÈ¯ÇÑ´Ù.*/
    }
    else return true; 
}
/*######################### ºñ¹Ð¹øÈ£ Ã¼Å© 2 ³¡ #########################*/

/* ######################### ¹ÙÀÌÆ®°Ë»ç #########################*/
function Byte(input) {
    var i, j=0;
    for(i=0;i<input.length;i++) {
        val=escape(input.charAt(i)).length;
        if(val==  6) j++;
        j++;
    }
    return j;
}
/* ######################### ¹ÙÀÌÆ®°Ë»ç ³¡#########################*/


/* ######################### ¿µ¹®°Ë»ç+¼ýÀÚ°Ë»ç(Ã¹±ÛÀÚ´Â ¹Ýµå½Ã¿µ¹®) #########################*/
/*
	input = °Ë»çÇÒ °´Ã¼
*/
function EngNum(input,types) {
    if(types) if(!Trim(input.value)) return false;
    var error_c=0, i, val;
    for(i=0;i<Byte(input.value);i++) {
        val = input.value.charAt(i);
        if(i == 0) if(!((val>='a' && val<='z') || (val>='A' && val<='Z'))) return false;
        else if(!((val>=0 && val<=9) || (val>='a' && val<='z') || (val>='A' && val<='Z'))) return false;
   }
   return true;
}
/* ######################### ¿µ¹®°Ë»ç+¼ýÀÚ°Ë»ç(Ã¹±ÛÀÚ´Â ¹Ýµå½Ã¿µ¹®) ³¡ #########################*/

function replace(msrc,sstr,rstr) {
       var idx,sleft,sright;

       msrc+="";
       sstr+="";
       rstr+="";
       idx=msrc.indexOf(sstr);
       if (idx > -1) {
              sleft = msrc.substring(0,idx) + rstr;
              sright = msrc.substring(idx+sstr.length);
              return sleft + replace(sright,sstr,rstr);
       } else {
              return msrc;
       }
}
function replaceOf(revalue) {
		revalue = replace(revalue,"'","`");
		revalue = replace(revalue,"¡°","``");
		revalue = replace(revalue,"¡¯","`");
		return revalue;
}


function checkChecked(obj) {
	var fname = obj.form.name;
	var objnm = obj.name;
	var oElem = eval(fname+"."+objnm);
	var ret = false;

	if (typeof(oElem.length) == "undefined") {
		if (oElem.checked) {
		ret = true;
		}
	}else{
		for (var i=0;i<oElem.length;i++) {
			if (oElem[i].checked) {
				ret = true;
			}
		}
	}
	return ret;
}

function trim(Str){
	var tempStr = "";  
	for (i = 0 ; i < Str.length; i++){
		if(Str.charAt(i) == " "){
			tempStr = tempStr;  
		}else{
			tempStr = tempStr + Str.charAt(i);
		} 
	}  
	return tempStr;
}

function pop_open(p_src,pname,sizew,sizeh)
{
	window.open(p_src, pname, 'toolbar=no, scrollbars=no, menubars=no, width='+sizew+', height='+sizeh+', left=0, top=0');
	return;
}

function resize_pop(){
	w = document.getElementById('table').clientWidth;
	h = document.getElementById('table').clientHeight;

	iw = w+10;
	ih = h+55;

	if(navigator.userAgent.toLowerCase().indexOf("msie") != -1){
		ih = ih+25;
	}

	resizeTo(iw,ih);
}

function isAlphaNum( inStr ) {
	if (inStr.length > 0) {
		for (i=0; i < inStr.length; i++) {
			if (!( (inStr.charAt(i) >= 'a' && inStr.charAt(i) <= 'z') || (inStr.charAt(i) >= 'A' && inStr.charAt(i) <= 'Z') || (inStr.charAt(i) >= '0' && inStr.charAt(i) <= '9')) ) { return false; }
		}
		return true;
	}else{
		return false;
	}
} 

function isAllAlphaNum( inStr ) {
	if (inStr.length > 0) {
		var intCount,intCharCount;
		intCount = 0;
		intCharCount = 0;
		for (i=0; i < inStr.length; i++) {
			if ( (inStr.charAt(i) >= '0' && inStr.charAt(i) <= '9') ) { intCount += 1; }
			if ( (inStr.charAt(i) >= 'a' && inStr.charAt(i) <= 'z') || (inStr.charAt(i) >= 'A' && inStr.charAt(i) <= 'Z') ) { intCharCount += 1; }
		}
		if ( (inStr.length == intCount) || (inStr.length == intCharCount) ) {
			return true;
		}
	}else{
		return false;
	}
} 


function img_select(imgtagid,num,imgsrc,overtype)
{
	var _img_tag = document.getElementsByTagName("img");
	var imgtagCnt = _img_tag.length;
	
	for(cntimg = 0; cntimg < imgtagCnt; cntimg++)
	{
		if(_img_tag[cntimg].id.indexOf(imgtagid) == 0)
		{
			if(_img_tag[cntimg].id == imgtagid+num && overtype == "on")
			{
				document.getElementById(_img_tag[cntimg].id).src=imgsrc;
			}else if(_img_tag[cntimg].id == imgtagid+num && overtype == "off"){
			
				document.getElementById(_img_tag[cntimg].id).src=imgsrc.split(".gif").join("_off.gif");
			}
		}
	}
}


function showhide(obj) {
  obj = document.getElementById(obj);
  if (obj.style.display == "")
    obj.style.display = "none";
  else
    obj.style.display = "";
}



//2008.06.24 »ç¿îµå ÆÄÀÏ ÀÓ¹èµå
//sound object embed
function ActiveX(objects){
	var objects = document.getElementById(objects);
	if(navigator.appName == "Microsoft Internet Explorer"){
		document.write(objects.text);
		objects.id = "";
	}
}
function inputActiveX (s, w, h, i, v) {
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<OBJECT id="'+i+'" width="'+w+'" height="'+h+'" classid=clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95>')
	document.write('<PARAM NAME="filename" VALUE="'+s+'">');											
	document.write('<PARAM NAME="ShowControls" VALUE="false">');
	document.write('<PARAM NAME="AutoStart" VALUE="'+v+'">');
	document.write('<PARAM NAME="TransparentAtStart" VALUE="'+v+'">');
	document.write('</OBJECT>');	

}else{
		document.write('<embed src="'+s+'" autostart="'+v+'" hidden="false" volume="70" loop="1" width="'+w+'" height="'+h+'" height=45 PLUGINSPAGE="HTTP://quicktime.apple.com/qt/sw/sw.html"/>');	
		document.write('<NOEMBED> À½¾ÇÀÌ µé¸®½ÃÁö ¾ÊÀ¸¸é ¹Ìµð¾î ÇÃ·¹ÀÌ¾î¸¦ ¼³Ä¡ ÇÏ¼¼¿ä.</NOEMBED>');	
		document.write('</embed>');	
}

};



function teachres_down() {
	window.location.href = "/hellofriend/Hello_Friend_TeachersGuide.zip";

}



/***************************************************
¸¶¿ì½º ÀÌº¥Æ®¿¡ µû¸¥ ÀÌ¹ÌÁö ±³Ã¼
***************************************************/
function ImgSwap(obj, url){
	//if(obj.src.search("_on")>10){
		obj.src="/images/btn/btn_"+url+".gif"
	//}else if{
	//	obj.src="/images/btn/btn_"+url+"_on.gif"
	//}
}

function MenuSwap(obj, url){
	obj.src = url
}

/***************************************************
ÇÁ¸°Æ®
***************************************************/
function page_print(){
	window.print()
}


function selectMenu(state) {
	if(state=="on"){
		submenu.style.display = 'block';
	}else{
		submenu.style.display = 'none';
	}
}

function resizeimg(targetimage)
{
   varWidth = 600;
   if(varWidth < targetimage.width+8){
	   varWidth=600;
	}else{
		varWidth = targetimage.width;
	}
	targetimage.width = varWidth;
   
}
function reLoadImage(targetimage,imgdefault)
{
   if(imgdefault.length == 0){
		varWidth = 650;
   }else{
		varWidth = imgdefault;
   }

   if(varWidth > targetimage.width+8){
		varWidth = targetimage.width;
	}

	targetimage.width = varWidth;
   
}

function CheckSql(str){
	// ¹Ýº¹ÀûÀ¸·Î ¸ðµç ¹®ÀÚ¸¦ ÇÏ³ª¾¿ À¯È¿¼º °Ë»ç
	if(str.length > 0){
		for (k=0 ; k < str.length ; k++) {
			if ((str.charAt(k)=="--") || (str.charAt(k)=="'") || (str.charAt(k)=="<") || (str.charAt(k)==">") || (str.charAt(k)=="&") || (str.charAt(k)=="script")) {
				alert("Æ¯¼ö¹®ÀÚ´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
				return false;
			}
		}
	}
	return true;
}


/***************************************************
Áñ°ÜÃ£±â Ãß°¡
***************************************************/
function favo(){
	window.external.AddFavorite('http://hellofriend.co.kr', 'Çï·ÎÇÁ·»µå');
}