var Ace_WwwJs		= "http://aceonline.ndolfin.com";
var Ace_PcbangJs	= "http://pcbang.ndolfin.com"


/*----------------------------------------------------------------------------------------+
	¼­¹öÅëÇÕ ÆË¾÷
+----------------------------------------------------------------------------------------*/
function ServerUnionPop() {
var svUnion = window.open('/game/ServerUnion.asp', 'svUnion', 'scrollbars=no, resizable=no, width=550, height=450, left='+(screen.width-580)/2+', top='+(screen.height-550)/2);
(svUnion == null) ? alert("\n°èÁ¤¿¬°áÀ» ¸ÕÀú ÇÏ¿©¾ß ¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\n\nÂ÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.\n") : svUnion.focus();
}


/*----------------------------------------------------------------------------------------+
	±¸ »çÀÌÆ® ³» °ÔÀÓµ¿ÀÇ ÆË¾÷
+----------------------------------------------------------------------------------------*/
function GameAgreePop() {
var gmAgree = window.open('/game/GameAgreePop.asp', 'gmAgree', 'scrollbars=no, resizable=no, width=480, height=520, left='+(screen.width-480)/2+', top='+(screen.height-520)/2);
(gmAgree == null) ? alert("\n¿¡ÀÌ½º¿Â¶óÀÎÀ» ÀÌ¿ëÇÏ½Ã·Á¸é ¼­ºñ½ºÀÌ¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù.\n\nÂ÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.\n") : gmAgree.focus();
}


/*----------------------------------------------------------------------------------------+
	½Å ¿£µ¹ÇÉ °ÔÀÓµ¿ÀÇ ÆË¾÷_2009/08/05
+----------------------------------------------------------------------------------------*/
function NGameAgreePop() {
var NgmAgree = window.open('https://members.ndolfin.com/Common/Popup/TotalAgreement.aspx', 'NgmAgree', 'scrollbars=no, resizable=no, width=780, height=600, left='+(screen.width-780)/2+', top='+(screen.height-600)/2);
(NgmAgree == null) ? alert("\n¿¡ÀÌ½º¿Â¶óÀÎÀ» ÀÌ¿ëÇÏ½Ã·Á¸é ¼­ºñ½ºÀÌ¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù.\n\nÂ÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.\n") : NgmAgree.focus();
}


/*----------------------------------------------------------------------------------------+
	ÆÐÃ³½ÇÇà
+----------------------------------------------------------------------------------------*/
function PatcherCall(Rpath, AuthKey, Uid, UBirth) {
	if (WebLauncher.object == null) {
		alert("°ÔÀÓ½ÇÇàÀ» À§ÇØ ActiveX ¼³Ä¡¸¦ Çã¿ëÇØ ÁÖ¼¼¿ä");
	} else {
		try {
			var ATX = WebLauncher.DoNow(Rpath, Uid, Uid, AuthKey, UBirth);
			if (!ATX) goLinkPage(710);
		} catch (e) {
			top.goLinkPage(710);
		}
	}
}

/*----------------------------------------------------------------------------------------+
	´Ù¿î·Îµå
+----------------------------------------------------------------------------------------*/
function downMovie(strurl) {
	var frm = document.createElement("form");
		frm.name = "downaction";
		frm.method = "post";
		frm.action = "http://imgs.aceonline.co.kr/download.asp";
		frm.target = "_self";
		document.insertBefore(frm);

	var ipt = document.createElement("input");
		ipt.type = "hidden";
		ipt.name = "file";
		ipt.value = strurl;
		frm.insertBefore(ipt);
		frm.submit();

	//½ºÆ®¸²¿ÀºêÁ§Æ®ÈÄ ÇÃ·¡½Ã¸µÅ© ¿À·ù
	setTimeout('location.href = location.href;', 1000);
}

/*----------------------------------------------------------------------------------------+
	ÇÃ·¡½Ã¿ÀºêÁ§Æ®
+----------------------------------------------------------------------------------------*/
function showflashObject (strurl, fwidth, fheight) {
var object = '';
	object += '<object codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 width='+ fwidth +' height='+ fheight +' classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000>';
	object += '<param name="movie" value="'+ strurl +'">';
	object += '<param name="quality" value="high">';
	object += '<param name="wmode" value="transparent">';
	object += '<embed src="'+ strurl +'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ fwidth +'" height="'+ fheight +'"></embed>';
	object += '</object>';
	document.write(object);
}


/*----------------------------------------------------------------------------------------+
	¾ÆÀÌÇÁ·¹ÀÓ ÀÚµ¿¸®»çÀÌÁî
+----------------------------------------------------------------------------------------*/
function frameSelfResize(objname) {
	//var objname = window.name;

	try {
		if( !(objname == null || objname == "" || parent == null) )	{
			var objFrame = eval("parent.document.all." + objname);		
			var objSize = eval("parent.document." + objname);
			if(typeof(objFrame) != "undefined") {
				objFrame.style.height = parseInt(objSize.document.body.scrollHeight)+50;
				objFrame.height = parseInt(objSize.document.body.scrollHeight)+50;
			}
		}
	} catch(e) {
	}
}

function SimplereSize(obj){
	try {
		obj.height = eval(obj.name + '.document.body').scrollHeight;
	} catch(e) {
	}
}

/*----------------------------------------------------------------------------------------+
	´Ü¼øÇÏ°Ô ÆË¾÷À» ¶ç¿ï¶§ »ç¿ëÇÑ´Ù.
	»ç¿ë ¹æ¹ý <a href="javascript:openwin('/account/regnumberlaw.asp','pop1',475,645,80,200,'no','no')"
+----------------------------------------------------------------------------------------*/
function openwin(url,popName,Width,Height,Top,Left,Resizable,Scrollbars) { 	
	javaOption ='width='+Width+',height='+Height+',top='+Top+',left='+Left+',resizable='+Resizable+',scrollbars='+Scrollbars;
	remote = window.open(url, popName, javaOption);

	if(remote != null) {
		if(remote.opener == null) {
			remote.opener = self;
		}
	}
}

/*----------------------------------------------------------------------------------------+
	Design - Script
+----------------------------------------------------------------------------------------*/
function MM_preloadImages() {
	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) {
	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_swapImgRestore() {
	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_swapImage() {
	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];}
}