function execUrl(url) { 
	if(typeof document.frames.naexecfrm!='undefined') {
		window.naexecfrm=document.frames.naexecfrm;
	} else { 
		var s= "<IFRAME name='naexecfrm' allowTransparency=true frameborder=0 scrolling=no marginheight=0 marginwidth=0 style='margin:0px; padding:0px; width:1px; height:1px;'></IFRAME>";
		document.body.appendChild(window.naexecfrm=document.createElement(s));
	} 
	var f_ok=false;
	if(typeof naexecfrm.location!='undefined') { 
		try { 
			naexecfrm.location.href=url, f_ok=true ;
		} catch(e) {} 
	}
	if(!f_ok) window.open(url, 'naexecfrm'); 
}

function exec_frmcheck() {
	if(typeof document.frames.naexecfrm == 'undefined') {
		var s= "<IFRAME name='naexecfrm' allowTransparency=true frameborder=0 scrolling=no marginheight=0 marginwidth=0 style='margin:0px; padding:0px; width:1px; height:1px;'></IFRAME>";
		document.body.appendChild(window.naexecfrm=document.createElement(s));
	}
}

function submitexecform(formname) {
	var obj = eval('document.'+formname);
	exec_frmcheck();
	obj.submit();
}

function flash_import(url,width,height) {
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='"+width+"' height='"+height+"' id='flash_zone_hosting2' align='middle'>");
	document.write("<param name='allowScriptAccess' value='sameDomain' />");
	document.write("<param name='movie' value='"+url+"' />");
	document.write("<param name='quality' value='high' />");
	document.write("<param name='bgcolor' value='#ffffff' />");
	document.write("<param name='wmode' value='transparent' />");
	document.write("<param name='menu' value='false' />");
	document.write("<embed src='"+url+"' quality='high' bgcolor='#ffffff' width='"+width+"' height='"+height+"' name='flash_zone_hosting2' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

//>>>>>>>>>> FAQ ±Û ºÐ·ùº¸³»±â
function send_faq(formname,key,idx){
	var f = eval('document.'+formname);
	f.keyfield.value=key;
	if(idx) f.action='http://www.nayana.com/cs/c_faq.php?idx='+idx;
	else f.action='http://www.nayana.com/cs/c_faq.php';
	f.submit();
}

// ·ÎµùÈ­¸é º¸ÀÌ±â °¨Ãß±â
function show_loading(ltext,sub)
{
	var _x = document.body.clientWidth;
	var _y = document.body.clientHeight;

	var leftadd = 0;
	var rightadd = 0;
	leftadd = _x / 2 - 130;

	if(sub != null) loading = parent.loading;

	loading.style.posLeft = leftadd;
	rightadd = _y / 2;
	loading.style.posTop = rightadd;

	if(ltext != null) loading_text.innerHTML=ltext;
	loading.style.visibility='visible';
}

function hidden_loading() {
	loading.style.visibility='hidden';
}


//<!-- ½Å¿ëÄ«µå ¿µ¼öÁõ ¿¬µ¿ ½ºÅ©¸³Æ® -->
function receiptView(tno)
{
	receiptWin = "http://admin.kcp.co.kr/Modules/Sale/Card/ADSA_CARD_BILL_Receipt.jsp?c_trade_no=" + tno
	window.open(receiptWin , "" , "width=420, height=720")
}

function setCookie(name,value,expdate) { 
	var expires = new Date();
	expires.setTime(expires.getTime() + 1000 * 3600 * 24 * 30);
	document.cookie = name + "=" + escape(value) +"; path=/; expires=" + expires.toGMTString();
}

// ÄíÅ° ¼³Á¤ ½ºÅ©¸³Æ®
//function setCookie(name,value,expires) {
//	document.cookie=name + "=" + escape(value) + ( (expires == null)? "" : (" ; expires=" + expires.toGMTString()) );
//}

function getCookie(name){

	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	
	var i = 0;
        
	while(i< clen){
		var j = i + alen;
		if(document.cookie.substring(i,j)==arg){
			var end = document.cookie.indexOf(";",j);
			if(end == -1)
				end = document.cookie.length;
			return unescape(document.cookie.substring(j,end));
		}
		i=document.cookie.indexOf(" ",i)+1;
		if (i==0) break;
	}
	return null;
}

function mail_select(frm,tid)
{
	var emi = document.all[tid];
	var val = frm.options[frm.selectedIndex].value;
	if(val == "t") { 
		emi.value = "";
		emi.focus();
	} else if(val == "") {
		emi.value = "";
	} else {
		emi.value = val;
	}	
}

//>>>>>>ÀºÇàÀ¸·Î ÀÌµ¿
function bankMove(frm){
	if(frm.value){
		window.open(frm.value,'','');
	}
}

