function NewWindow(mypage, myname, w, h, scroll) 
{ 
	var winl = (screen.width - w) / 2; 
	var wint = (screen.height - h) / 2; 
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable' 
	win = window.open(mypage, myname, winprops) 
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 
}

function mf( src, id, width, height, wmode )
{
	var args = mf.arguments;
	var argc = mf.arguments.length;
	
	var param='';
	param = (5 < argc) ? args[5] : '';
	return "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width="+width+" height="+height+" "+((id)?'id='+id:'')+"><param name=wmode value="+wmode+" /><param name=movie value="+src+" /><param name=quality value=high />"+param+"<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\" width="+width+" height="+height+"></embed></object>";
}

function documentwrite(src) 
{
	var args=documentwrite.arguments;
	var argc=documentwrite.arguments.length;
	
	var target='';
	target = (1 < argc) ? args[1] : '';
	if(target) target.innerHTML=src;
	else document.write(src);
}

function insertFlash(file, width, height)
{
	var str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="'+width+'" HEIGHT="'+height+'">';
	str += '<PARAM NAME="movie" VALUE="'+file+'">';
	str += '<PARAM NAME="quality" VALUE="high">';
	str += '<PARAM NAME="wmode" VALUE="transparent">';
	str += '<PARAM NAME="menu" VALUE="false">';
	str += '<EMBED src="'+file+'" quality="high" wmode="transparent" TYPE="application/x-shockwave-flash" WIDTH="'+width+'" HEIGHT="'+height+'" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>';
	str += '</OBJECT>';
	document.write(str);
}

/**
 * »õÃ¢¶Ù¿ì±â
 */
function fnNW( url, width, height, name )
{
	var bsleft=(screen.width/2)-width/2;
	var bstop=(screen.height/2)-height/2;
	if(name) var NW=open(url,name,'left='+bsleft+',top='+bstop+',width='+width+',height='+height+',toolbars=no,scrollbars=no,resizable=no');
	else var NW=open(url,'','left='+bsleft+',top='+bstop+',width='+width+',height='+height+',toolbars=no,scrollbars=no,resizable=no');
	//NW.document.location.href = url;
	NW.focus();
}

// ÄíÅ°°ü·Ã
function getCookie(name) {
	var cname = name + "=";
	var dc = document.cookie;
	if (dc.length > 0) {
		begin = dc.indexOf(cname);

		if (begin != -1) {
			begin += cname.length;
			end = dc.indexOf(";", begin);
			if (end == -1) end = dc.length;
			return unescape(dc.substring(begin, end));
		}
	}
	return null;
}

// ÆË¾÷¶ç¿ì±â
function openpop(url,key,swidth,sheight, st, sl, so) {
	var bsleft = (screen.width/2)-swidth/2;
	if(screen.height > 600) var bstop = (screen.height/2)-sheight/2;
	else var bstop = 10;

	if(so == '') so = "no";
	if(st != '') bstop = st;
	if(sl != '') bsleft = sl;
	if (getCookie('bfly'+key) != 1) {
		var openwin = window.open(url,"openwin"+key,"scrollbars="+so+ ",resizable=no,status=yes,width="+swidth+", height="+sheight+",top="+bstop+",left="+bsleft);

		if(openwin)	{
			openwin.focus();
		}
		else {
			alert("ÆË¾÷ÀÌ Â÷´ÜµÇ¾îÀÖ½À´Ï´Ù. Â÷´Ü¼³Á¤À» ÇØÁ¦ÇØÁÖ¼¼¿ä.");
		}
	}
}