//¸Þ´ºÇÃ·¡½¬html¿¡ ³Ö¾îÁà¾ßÇÒ ½ºÅ©¸³Æ® °æ·Î     <script language="javascript" src="linkurl.js"></script> 

/************************************************************
*	javascript:GoMenu('main01')  
************************************************************/

//¸Þ´º
m01="/company/introduction_k.asp";   //company
m01_01="/company/introduction_k.asp"; // introduction
m01_02="/company/history_k.asp"; //history
m01_03="/company/vision_k.asp"; //vision
m01_04="/company/organization.asp"; //organization
m01_05="/company/recruit.asp"; //recruit
m01_06="/company/contactus.asp"; //contact us
m01_07="/company/partnership.asp"; //partnership

m02="/business/management.asp";   //Business 
m02_01="/business/management.asp";   //Management 
m02_02="/business/production.asp";   //Production 


m03="/actors/actors.asp";   //Actors 
m03_01="/actors/actors.asp";   //Actor Room


m04="/presscenter/newsnotice_list.asp";   //PRESS  CENTER
m04_01="/presscenter/newsnotice_list.asp";   //News &Notice 
m04_02="/presscenter/prcenter_list.asp";   //PR center 
m04_03="/presscenter/webzine.asp";   //webzine



m05="/audition/audition1.asp";   //Audition 
m05_01="/audition/audition1.asp";   //Audition ¾È³»
m05_02="/audition/audition2.asp";   //Audition Áö¿ø


m06="/board/board.asp";   //board 
m06_01="/board/board.asp";   //board ¾È³»



//¼Ò¸Þ´º
s01="http://www.namooactors.com/admin";   //login
s02="/company/contactus.asp";   //contactus
s03="/custormer/sitemap.asp";   //sitemap




//¿¬¿¹ÀÎ

//ac1="http://www.namooactors.com/star/kanggeol/"  //°­°É
ac1="http://www.namooactors.com/star/gwonmin/"  //±Ç¹Î
ac2="http://www.namooactors.com/star/kimkangwoo/"  //±è°­¿ì
ac3="http://www.namooactors.com/star/kimsoyeon/"  //±è¼Ò¿¬
ac4="http://www.namooactors.com/star/kmjuhyeok/"  //±èÁÖÇõ
ac5="http://www.namooactors.com/star/kimjisu/"  //±èÁö¼ö
ac6="http://www.namooactors.com/star/kimtaehee/"  //±èÅÂÈñ
ac7="http://www.namooactors.com/star/kimhyena/"  //±èÇý³ª
ac8="http://www.namooactors.com/star/kimhyeseong/"  //±èÇý¼º
ac9="http://www.namooactors.com/star/kimhyosun/"  //±èÈ¿¼±
ac10="http://www.namooactors.com/star/kimhyojin/"  //±èÈ¿Áø
ac11="http://www.namooactors.com/star/dojiwon/"  //µµÁö¿ø
ac12="http://www.namooactors.com/star/moongeunyoung/"  //¹®±Ù¿µ
ac13="http://www.namooactors.com/star/parkgeonheong/"  //¹Ú°ÇÇü
ac14="http://www.namooactors.com/star/parksanguk/"  //¹Ú»ó¿í
//ac16="http://www.namooactors.com/star/songminji/"  //¼Û¹ÎÁö
ac15="http://www.namooactors.com/star/songjihyo/"  //¼ÛÁöÈ¿
ac16="http://www.namooactors.com/star/sinsegyeong/"  //½Å¼¼°æ
ac17="http://www.namooactors.com/star/yujunsang/"  //À¯ÁØ»ó
ac18="http://www.namooactors.com/star/leegyuhan/"  //ÀÌ±ÔÇÑ
//ac21="http://www.namooactors.com/star/kimyounghun/"  //±è¿µÈÆ
ac19="http://www.namooactors.com/star/jodonghyeok/"  //Á¶µ¿Çõ
ac20="http://www.namooactors.com/star/hanyeorum/"  //ÇÑ¿©¸§
ac21="http://www.namooactors.com/star/hanjeongsu/"  //ÇÑÁ¤¼ö
ac22="http://www.namooactors.com/star/hongeunhee/"  //È«ÀºÈñ
ac23="http://www.namooactors.com/star/robottaekwonv/"  //ÅÂ±ÇV
ac24="http://www.namooactors.com/star/yuhyunsu/"  //À¯Çö¼ö
ac25="http://www.namooactors.com/star/limhyunsung/"  //ÀÓÇö¼º
ac26="http://www.namooactors.com/star/parksunwoo/"  //¹Ú¼±¿ì
ac27="http://www.namooactors.com/star/hanhyejin/"  //ÇÑÇýÁø
ac28="http://www.namooactors.com/star/leesinseong/"  //ÀÌ½Å¼º
ac29="http://www.namooactors.com/star/limhyungjun//"  //ÀÓÇüÁØ
//ac32="http://www.namooactors.com/star/kimdongho/"  //±èµ¿È£











function GoMenu(name, win, W, H)	{
    var LeftPosition = (screen.width) ?        (screen.width-W)/2 : 0;
    var TopPosition = (screen.height) ?        (screen.height-H)/2 : 0;    

	// °æ°íÃ¢
	if (eval(name) == "") { // º¯¼ö´Â ÁöÁ¤µÇ¾î ÀÖ´Âµ¥ °ªÀÌ ¾øÀ»¶§ ÆäÀÌÁö ÀÌµ¿¾øÀÌ ¾ó¶ùÃ¢À»¶ç¿ò
		alert("ÁØºñÁßÀÔ´Ï´Ù.");
		return;	
	}

	// ÆäÀÌÁö ÀüÈ¯
	else { 		//ÀÏ¹Ý¸µÅ©
		if (win == null) {
			document.location.href = eval(name);
		}
	}
}

function GoMenu(name, win, W, H)
{
	if(win == "_new")
		window.open(eval(name), '_new');
	else
		location.href = eval(name);
}




/* ±âº»ÀûÀÎ ¼³Á¤ */
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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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_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_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_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_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; }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//°ø¶õ Ã¼Å© Ã¼Å©
function trim(inputString) {
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function


function select_direct(form, value)
{
	if(value == "")		return;

	form.submit();
	return;
}

// ±ÛÀÚ¼ö °è»ê
function CheckLen(formfield1, formfield2, maxlength)
{
	var form_length = formfield1.value.length;
	var form_value  = formfield1.value;
	if(maxlength < form_length) {
		alert(maxlength+"ÀÚ¸¦ ÃÊ°úÇÕ´Ï´Ù.\n¸Þ½ÃÁö¸¦ Àü¼Û(ÀÔ·Â)ÇÒ ¼ö ¾ø½À´Ï´Ù.");
	}
	formfield2.value = form_length;
	return form_length;
}


/**
ÀÔ·ÂÆûÃ¼Å©
*/
function form_check(form)
{
	var n_loop_num, currEl;
	
	for(n_loop_num=0; n_loop_num<form.elements.length; n_loop_num++)
	{
		currEl = form.elements[n_loop_num];
		
		//ÇÊ¼ö Ç×¸ñÀ» Ã¼Å©ÇÑ´Ù.
		if(currEl.getAttribute("required") != null)
		{
			if(currEl.type.toUpperCase() == "TEXT" || currEl.type.toUpperCase() == "FILE" || currEl.tagName.toUpperCase() == "TEXTAREA" ||currEl.type.toUpperCase() == "PASSWORD" ||currEl.type.toUpperCase() == "HIDDEN")
			{
				if(!chkText(currEl, currEl.hname))                return;
			}
			else if(currEl.tagName.toUpperCase() == "SELECT")
			{
				if(!chkSelect(currEl, currEl.hname))                return;
			}
			else if(currEl.type.toUpperCase() == "CHECKBOX")
			{
				if(!chkCheckbox(form, currEl, currEl.hname))      return;
			}
			else if(currEl.type.toUpperCase() == "RADIO")
			{
				if(!chkRadio(form, currEl, currEl.hname))         return;
			}
		}
	
		// ±æÀÌÁ¦ÇÑÀ» Ã¼Å©ÇÑ´Ù.
		if(currEl.getAttribute("lengthchk") != null && currEl.value.length > 0)
		{
			if(!chkLength(currEl, currEl.lengthchk, currEl.hname))    return;
		}
		
		// ±æÀÌ»óÇÑÀ» Ã¼Å©ÇÑ´Ù.
		if(currEl.getAttribute("lengthmax") != null && currEl.value.length > 0)
		{
			if(!chkLengthMax(currEl, currEl.lengthmax, currEl.hname))    return;
		}
		              
		// ÀÔ·Â ÆäÅÏÀ» Ã¼Å©ÇÑ´Ù.
		if(currEl.getAttribute("option") != null && currEl.value.length > 0)
		{
			if(!chkpattern(currEl, currEl.option, currEl.hname))      return;
		}
	}
	
	form.submit();
	return;
}


/**
ÀÔ·ÂÆûÁß TEXT, FILE, TEXTAREA, PASSWORD, HIDDEN Ã¼Å©
*/
function chkText(field, title)
{
	if(field.value.length < 1)
	{
		alert("'"+title+"'À»(¸¦) ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		field.focus();
		return false;
	}
	return true;
}


/**
ÀÔ·ÂÆûÁß SELECT Ã¼Å©
*/
function chkSelect(field, title)
{
	if(field.value.length < 1)
	{
		alert("'"+title+"'À»(¸¦) ¼±ÅÃÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		field.focus();
		return false;
	}
	return true;
}


/**
ÀÔ·ÂÆûÁß CHECKBOX Ã¼Å©
*/
function chkCheckbox(form, field, title)
{
	fieldname = eval(form.name+'.'+field.name);
	if (!fieldname.checked)
	{
		alert("'"+title+"'À»(¸¦) Ã¼Å©ÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		field.focus();
		return false;
	}
	return true;
}


/**
ÀÔ·ÂÆûÁß RADIO Ã¼Å©
*/
function chkRadio(form, field, title)
{
	fieldname = eval(form.name+'.'+field.name);
	for (n_loop=0; n_loop<fieldname.length; n_loop++)
	{
		if (fieldname[n_loop].checked)		return true;
	}
	alert("'"+title+"'À»(¸¦) Ã¼Å©ÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
	field.focus();
	return false;
}


/**
ÀÔ·Âµ¥ÀÌÅÍ ±æÀÌÃ¼Å©
*/
function getLength(str)
{
	return (str.length + (escape(str) + "/%u").match(/%u/g).length-1);
}


/**
ÀÔ·Âµ¥ÀÌÅÍ ±æÀÌÃ¼Å©
*/
function chkLength(field, length, title)
{
	if(getLength(field.value) < length)
	{
		alert("'"+title+"'ÀÇ ±æÀÌ´Â '"+length+"' È¤Àº ±× ÀÌ»óÀÌ¾î¾ß ÇÕ´Ï´Ù.");
		field.focus();
		return false;
	}
	return true;
}


/**
ÀÔ·Âµ¥ÀÌÅÍ ±æÀÌ»óÇÑ°Ë»ç
*/
function chkLengthMax(field, length, title)
{
	if(getLength(field.value) > length)
	{
		alert("'"+title+"'ÀÇ ±æÀÌ´Â '"+length+"' È¤Àº ±× ÀÌÇÏÀÌ¾î¾ß ÇÕ´Ï´Ù.");
		field.focus();
		return false;
	}
	return true;
}


/**
ÀÔ·Âµ¥ÀÌÅÍÀÇ ÆÐÅÏÃ¼Å©
*/
function chkpattern(field, pattern, title)
{
	var regNum =/^[0-9]+$/;
	var regPhone =/^[0-9]{2,3}-[0-9]{3,4}-[0-9]{4}$/;
	var regMail =/^[_a-zA-Z0-9-]+@[._a-zA-Z0-9-]+\.[a-zA-Z]+$/;
	var regDomain =/^[.a-zA-Z0-9-]+.[a-zA-Z]+$/;
	var regAlpha =/^[a-zA-Z]+$/;
	var regHost =/^[a-zA-Z-]+$/;
	var regHangul =/[°¡-ÆR]/;
	var regHangulEng =/[°¡-ÆRa-zA-Z]/;
	var regHangulOnly =/^[°¡-ÆR]*$/;
	var regId =/^[a-zA-Z]{1}[a-zA-Z0-9_-]{3,20}$/;
	//var regNicname =/[°¡-ÆRa-zA-Z0-9!@#%^&*+=_-]{2,20}$/;
	//var regNicname =/[°¡-ÆRa-zA-Z0-9_-]{2,20}$/;
	var regNicname =/[°¡-ÆRa-zA-Z0-9_-~`!@#$^&*=+]{2,20}$/;
	var regDate =/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;
	
	pattern = eval(pattern);
	if(!pattern.test(field.value))
	{
		alert("'" + title + "'Ç×¸ñÀÇ Çü½ÄÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		return false;
	}
	return true;
}

function chkresno(resno) {

  // ÁÖ¹Î¹øÈ£ÀÇ ÇüÅÂ¿Í 7¹øÂ° ÀÚ¸®(¼ºº°) À¯È¿¼º °Ë»ç
  fmt = /^\d{6}-[1234]\d{6}$/;
  if (!fmt.test(resno)) {
    //alert("Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù."); 
    return false;
  }

  // ³¯Â¥ À¯È¿¼º °Ë»ç
  birthYear = (resno.charAt(7) <= "2") ? "19" : "20";
  birthYear += resno.substr(0, 2);
  birthMonth = resno.substr(2, 2) - 1;
  birthDate = resno.substr(4, 2);
  birth = new Date(birthYear, birthMonth, birthDate);

  if ( birth.getYear() % 100 != resno.substr(0, 2) ||
       birth.getMonth() != birthMonth ||
       birth.getDate() != birthDate) {
    //alert("Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù."); 
    return false;
  }

  // Check Sum ÄÚµåÀÇ À¯È¿¼º °Ë»ç
  buf = new Array(13);
  for (i = 0; i < 6; i++) buf[i] = parseInt(resno.charAt(i));
  for (i = 6; i < 13; i++) buf[i] = parseInt(resno.charAt(i + 1));

  multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
  for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]);

  if ((11 - (sum % 11)) % 10 != buf[12]) {
    // alert("Àß¸øµÈ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.");
    return false;
  }

  //alert("Á¤»óÀûÀÎ ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.");
  return true; 
}

function loginChk()
{
	yes = confirm('·Î±×ÀÎÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù!\n·Î±×ÀÎÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?');
	if(yes){
		 location.href = '/member/login.asp';
	}
}

function check_search()
{
	f = document.search_form;

	if(f.query0.value == "") {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.")
		return false
	}
	f.action = "http://211.181.46.53:15555/data/data_search_result.asp";
	f.submit();
	return;

}

/**
ÆË¾÷Ã¢À» ¿øÇÏ´Â À§Ä¡¿¡ »ý¼ºÇÕ´Ï´Ù.
*/
function openwindow(url, name, width, height, align, valign, option) 
{
    var x,y;
    var window_option = "width="+width+",height="+height;

    if (option!=null) window_option+=","+option;
    if (align==null) align="center";
    if (valign==null) valign="center";

    if (align=="left") x=0;
    else if (align=="right") x=(screen.width-width);
    else if (align=="center") x=(screen.width-width)/2

    if (valign=="top") y=0;
    else if (valign=="bottom") y=(screen.height-height);
    else if (valign=="center") y=(screen.height-height)/2

    window_option+=",left="+x+",top="+y;

    var win = window.open(url,name,window_option);

    focus();
    win.focus();
    return win;
}

/**
¿Ã¹Ù¸¥ ¸ÞÀÏÇü½ÄÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
*/
function isvalidemail(str) 
{
    var re=new RegExp("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$","gi");
    var matcharray=str.match(re);
    if (matcharray) return true;
    else return false;
}