function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function na_open_window2(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable, location)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  location_str = location ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str+',location='+location_str);
}

function getQSPattern(name, str){ 

	tmp="";  

     pos = str.indexOf(name);
	// alert(pos);  	
     if(pos >= 0){ 
          endPos = str.indexOf("&", pos);
          if(endPos < 0) 
               endPos = str.length;
		//	alert(endPos);
          tmp = str.substr(pos, endPos-pos);  //str.substr(pos, endPos-pos); 
     } 
     return tmp; 
}  
//URL¿¡¼­ Å°ÀÇ °ªÀ» Ã£¾Æ »õ·Î ÁöÁ¤µÈ °ªÀ¸·Î ¹Ù²Û´Ù.
function makeModiURI(key, val, url)
{ 
//	alert(url);
	if(url == undefined)
	{
		qs = location.search;
		url = location.pathname + "?" + qs.substr(1);
	
	}
//	callurl ="_SERVER[REQUEST_URI]"; 
	
	var keyptn = key + "=";
	if(url.indexOf(keyptn) >= 0)
	{
	
//		pattern = "/key=^[&]*/";
		replacement =  key + "=" + val;
		searchstr = getQSPattern(keyptn, url);
//		alert(searchstr);
//		alert(replacement);
		//echo "<p>search<br>replacement<br>qs<br>";
		url = url.replace(searchstr, replacement);
		
//		qs = preg_replace(pattern, replacement, qs);
	}else
	{ 
		
		url = url + "&"+key+"="+val;
	}
	
	return url;
	
}
function popMMS(url)
{
	opt = ",toolbar=no,menubar=no,location=no,scrollbars=no,status=no,directories=no,resizable=no";
	window.open(url, "movie", "top=" + 0 + ",left=" + 0 + ", width=" + 981 + ",height=" + 721 + opt );
}  
 function clickDance(no, url)
{
	var result = document.getElementById("result"+no).value;
//	alert("url " +url);
//	alert("result " + result);
//alert(result);
	if(result == 'y'){
		window.open(url, '', ''); 
	}else{
		url = makeModiURI("mode", "x", url);
//		alert(url);
		window.open(url, '', '');
		//alert("µ¿¿µ»óÀ» º¸½Ã·Á¸é °áÁ¦¸¦ ÇØÁÖ¼¼¿ä.");
	}
}

function openJobPay1()
{ 
	opt = ",toolbar=no,menubar=no,location=no,scrollbars=no,status=no";
	url = "/recurit/pop.php";
	window.open(url, '', "width=" + 320 + ",height=" + 340  + opt );
}

function clickDance_regular(no, url)
{
	var result = document.getElementById("result_regular"+no).value;
//	alert("url " +url);
//	alert("result " + result);
//alert(result);
	if(result == 'y'){
		popMMS(url);
	}else if(result == 'n'){
		alert("µ¿¿µ»óÀ» º¸½Ã·Á¸é ¿øÇÏ½Ã´Â ÆÐÅ°Áö¸¦ ¼±ÅÃ ÇÏ½Å ÈÄ\n ½ÅÃ»/°áÁ¦ÇÏ±â ¹öÆ°À» Å¬¸¯ÇÏ¼Å¾ß ÇÕ´Ï´Ù!");
		location.href= "#choon_080214";
	}
}

function k_Popup(url,target,flag)
{ 
  if (window.open(url,target,flag) == null) 
  { 
    document.write("<object id='DHTMLEdit' classid='clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A' width='1' height='1' align='middle'><PARAM NAME='ActivateApplets' VALUE='1'><PARAM NAME='ActivateActiveXControls' VALUE='1'></object>");
    setTimeout('k_Popup2("'+url+'","'+target+'","'+flag+'")', 500);
  } 
} 
function k_Popup2(url,target,flag)
{
  try
  {
    DHTMLEdit.DOM.Script.execScript('window.open("'+url+'","'+target+'","'+flag+'")');
  }
  catch (e)
  {
    alert('ÆË¾÷Ã¢ Â÷´ÜÀ» ÇØÁ¦ÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.');
  }
}

	// À©µµ¿ì navigatorÀÎÁö ÆÇ´Ü
	var isMSIE = (window.navigator.appName.toLowerCase().indexOf('microsoft') > -1);
	// Security Version 1ÀÎÁö ÆÇ´Ü(XP SP2 È¤Àº 2003 SP1)
	var isSV1 = (window.navigator.userAgent.indexOf('SV1') > -1);

	function OnLoadPopup() {
		  var strX = "";
		  strX += "<object id='xpopup' classid='clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A'";
		  strX += " width='0' height='0' style='display:none'>";
		  strX += "<param name='ActivateApplets' value='1'>";
		  strX += "<param name='ActivateActiveXControls' value='1'>";
		  strX += "</object>";
		  document.write(strX); // DHTML ÄÄÆ÷³ÍÆ® µî·Ï
	}

	function onPopup(url, target, style) {
		if(!target) target="_blank";
		if(!style) style="top=10,left=50,width=303,height=400,toolbar=no,scrollbars=no,directories= no ,menubar=no,resizable=no";
		window.open(url, target, style);
	}
	
	function xPopup(url, target, style) {
		if(!target) target="_blank";
		if(!style) style="top=10,left=50,width=303,height=400,toolbar=no,scrollbars=no,directories= no ,menubar=no,resizable=no";
		if (isMSIE && isSV1) { // Security Version 1ÀÏ °æ¿ì
		  OnLoadPopup();
		  var x = document.getElementById('xpopup');
		  x.DOM.Script.execScript(onPopup.toString());
		  x.DOM.Script.execScript(onPopup(url, target, style));
//	      alert('Service Pack2 ¼³Ä¡·Î Â÷´ÜµÈ ÆË¾÷ °­Á¦·Î ¶ç¿ì±â');
		}
		else { onPopup(url, target, style); }
	}