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_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);

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_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() { //v6.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; }
}

//----------ÀÓ½Ã ALERT ¹Ú½º ------------------

function PopupMsg(theMsg) { 
alert(theMsg);
}


//------------------------ ¿ìÆí¹øÈ£°Ë»ö ----------------------------
function OpenZipcode(z){    //open zip code check win
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	zName = "/abstract/zipcode.html?zip_gubun="+z
	window.open(zName,"ZipWin",'width=466,height=175,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 = "/abstract/hosp.html?field="+z
	window.open(murl,"HosWin",'width=466,height=175,scrollbars=yes,top=' + window_top + ',left=' + window_left + '');
}

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

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

//-----------------------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("¼ýÀÚ¸¸ ÀÔ·ÂÇØÁÖ¼¼¿ä.") ;
			theForm.value="";
			theForm.focus();
			return false ;
		}
	}
	return true;
}

//--------------------- ÆÄÀÏ Æ÷¸Ë 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 Check_Tel(theForm,mm) {
	t = theForm.value;
	for(i=0;i<t.length;i++) {
		if (t.charAt(i)<'0' || t.charAt(i)>'9') {
			alert("¼ýÀÚ¸¸ ÀÔ·ÂÇØÁÖ¼¼¿ä.") ;
			theForm.value="";
			theForm.focus() ;
			return false ;
		}
	}
	if (t.length < mm)
	{
		alert("¼ýÀÚÀÇ ±æÀÌ¸¦ È®ÀÎÇÏ½Ê½Ã¿ä.");
		theForm.focus();
		return false;
	}
	return true;
}	

//----------------------- Login check ----------------------------
function LoginFrm(theForm) 
{
	if (theForm.apply_no.value == "") {
		window.alert("Input Abstract Submission No.");
		theForm.apply_no.focus();
		return false;
	}
	if (theForm.pwd.value == "") {
		window.alert("Input Password.");
		theForm.pwd.focus();
		return false;
	}
}

//----------------------- °ü¸®ÀÚ Login check ----------------------------
function Adm_Login(theForm) 
{
	if (theForm.id.value == "") {
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.id.focus();
		return false;
	}
	if (theForm.pwd.value == "") {
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.pwd.focus();
		return false;
	}
}

//----------------------- Judge Login check ----------------------------
function LoginJudge(theForm) 
{
	if (theForm.id.value == "") {
		window.alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.id.focus();
		return false;
	}
	if (theForm.pwd.value == "") {
		window.alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.pwd.focus();
		return false;
	}
}

//----------------------- ÁÖ¹Îµî·Ï¹øÈ£ ÀÔ·Â check ----------------------------
function RegistFrm(theForm) 
{
	if (!theForm.jumin1.value) {
		window.alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.jumin1.focus();
		return false;
	}
	if (!theForm.jumin2.value) {
		window.alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ê½Ã¿ä.");
		theForm.jumin2.focus();
		return false;
	}
}

//----------------------- »èÁ¦ ----------------------------
function delconf(murl) 
{
	if(confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?"))
	window.location = murl;
}

//------------------------ ÀÇ»ç¸éÇã¹øÈ£ Áßº¹È®ÀÎ ----------------------------
function Dup_check(str,j) 
{
	var Strobj = eval("document.Entry_frm." + str);
	var StrVal = Strobj.value;
	var PrdVal = document.Entry_frm.period.value;
	var Strlen = StrVal.length;
	if(Strlen < 1) {
		alert("\ÀÇ»ç¸éÇã¹øÈ£¸¦ ÀÔ·ÂÇÏ¼Å¾ßÇÕ´Ï´Ù.");
		StrVal = '';
		Strobj.focus();
		return false;
	}

	for(i=0; i < Strlen ;i++) {
		if (StrVal.charAt(i)<'0' || StrVal.charAt(i)>'9') {
			alert("¼ýÀÚ¸¸ ÀÔ·ÂÇØÁÖ¼¼¿ä.") ;
			Strobj.value = '';
			Strobj.focus() ;
			return false ;
		}
	}
	if (!j)
	{
		var j = 0;
	}
	if(typeof(document.Entry_frm.doc_flag) == 'object'){
		document.Entry_frm.doc_flag.value = true;
	}
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;
	window.open("/abstract/duplicate.html?no="+StrVal+"&period="+PrdVal+"&j="+j,"Áßº¹Ã¼Å©",'width=300,height=140,status=no,resizable=no,top=' + window_top + ',left=' + window_left + '');
}
//----------------------- °Ô½ÃÆÇ ----------------------------
function Board_Frm(theForm)
{
	if(theForm.subject.value=="")
	{	
		alert("Á¦¸ñÀ» ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù.!");
		theForm.subject.focus(); 
		return false;
	}
	if(theForm.name.value=="")
	{	
		alert("ÀÌ¸§À» ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù!");
		theForm.name.focus(); 
		return false;
	}
	if(theForm.mail.value !="")
	{
		if (!isEmail(theForm.mail.value))
		{
			alert("Á¤È®ÇÑ e-mailÇü½ÄÀÌ ÇÊ¿äÇÕ´Ï´Ù, È®ÀÎÈÄ ´Ù½Ã ÀÔ·Â ¹Ù¶ø´Ï´Ù.");
			theForm.mail.value="";
			theForm.mail.focus();
			return false;
		}
	}
	if(theForm.body.value=="")
	{	
		alert("³»¿ëÀ» ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù!");
		theForm.body.focus(); 
		return false;
	}
	if(theForm.pwd.value=="")
	{	
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ¾ß ÇÕ´Ï´Ù!");
		theForm.pwd.focus(); 
		return false;
	}
}

//----------------------- °Ô½ÃÆÇ °Ë»ö ----------------------------
function Search_send(theForm)
{
	if(theForm.key_word.value == "")
	{
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		theForm.key_word.focus();
		return false;
	}
}

//----------------------- °Ô½ÃÆÇ ÀüÃ¼ ¼±ÅÃ »èÁ¦ ----------------------------
function All_del(str)
{
	var check_nums = document.Brd_Frm.elements.length;
	for(var i = 0; i < check_nums; i++)
	{
		var checkbox_obj = eval("document.Brd_Frm.elements[" + i + "]");
		if(checkbox_obj.checked == true)
		{
			 break;
		}
	}

	if(i == check_nums)
	{
		alert("»èÁ¦ÇÏ½Ã°íÀÚ ÇÏ´Â ±ÛÀ» ¼±ÅÃÇØÁÖ¼¼¿ä.");
		return;
	}
	else
	{
		if(confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?"))
		{
			document.Brd_Frm.action="/adm_del.php?code="+str;
			document.Brd_Frm.submit();
		}
	}
}

//----------------------- »èÁ¦ Popup ÆäÀÌÁö ----------------------------
function Del_OpenWin(myurl){
	window.open (myurl, "mymenu", "width=172, height=103, left=10, top=10")
}

//----------------------- ÃÊ·Ï Á¢¼ö/¼öÁ¤ check ----------------------------
function Err_abs(str) 
{
	switch(str)
	{
		case"green":
		var msg = "ÃÊ·Ï Á¢¼ö ¹× ¼öÁ¤±â°£ÀÌ ¾Æ´Õ´Ï´Ù.";
		break;

		case"entry":
		var msg = "»çÀüµî·Ï ±â°£ÀÌ ¾Æ´Õ´Ï´Ù.";
		break;

		case"slide":
		var msg = "±¸¿¬½½¶óÀÌµå Á¢¼ö ±â°£ÀÌ ¾Æ´Õ´Ï´Ù.";
		break;

		case"lecture":
		var msg = "°­ÀÇ ½½¶óÀÌµå Á¢¼ö ±â°£ÀÌ ¾Æ´Õ´Ï´Ù";
		break;

		case"egreen":
		var msg = "It is preparing.";
		break;

		case"eentry":
		var msg = "It is preparing.";
		break;

		case"electure":
		var msg = "It is preparing.";
		break;
	
	}
	alert(msg+'\n\n');
}

function PopupMsg(theMsg) { 
alert(theMsg);
}

function Check_radio(ChkName,intChkNum) {
	var max = eval("document.Entry_frm." + ChkName + ".length");
	for(j = 0; j < max; j++) {
		var ChkVal = eval("document.Entry_frm." + ChkName + "[" + j + "].checked");
		if(intChkNum == j){
		}else
		{
			eval("document.Entry_frm." + ChkName + "[" + j + "].checked = false")
		}
	}
}

function flash_movie(src, ids, width, height, wmode)
{
	var wh = "";
	if (parseInt(width) && parseInt(height)) 
		wh = " width='"+width+"' height='"+height+"' ";
	return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' "+wh+" id="+ids+"><param name=wmode value="+wmode+"><param name=movie value="+src+"><param name=quality value=high><embed src="+src+" quality=high wmode="+wmode+" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' "+wh+"></embed></object>";
}

function obj_movie(src, ids, width, height, autostart)
{
	var wh = "";
	if (parseInt(width) && parseInt(height)) 
		wh = " width='"+width+"' height='"+height+"' ";
	if (!autostart) autostart = false;
	return "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>";
}

function doc_write(cont)
{
	document.write(cont);
} 
