<!-- begin script

function notcomplete() {
	alert(" ÁØºñÁß ÀÔ´Ï´Ù.");
}

function isEmpty( ddata ) {
   for ( var i = 0 ; i < ddata.length ; i++ ) {
      if ( ddata.substring( i, i+1 ) != " " )
         return false;
   }
   return true;
}

function resultcheck(form, message) {
	alert(message);
	form.focus();
	return false;
}

function image_error(imglayer) {
	imglayer.src = "http://image.ndoors.com/image/goonzu/200412/img_intro/no_img_media.gif";
	return;
}

function isNumber(checkvalue) {
	var digits = "0123456789";
	var temp;

	if (checkvalue == "") {
		return false;
	}
	for (var i=0; i<checkvalue.length; i++) {
		temp = checkvalue.substring(i, i+1);
		if (digits.indexOf(temp) == -1) {
			return false;
		}
	}

	return true;
}

function gotoCcomzi(targetURL) {
	var dnsName = document.domain;

	if (dnsName.indexOf("ndoors.com") > (-1)) {
		targetURL = "http://ccomzi.ndoors.com"+ targetURL;
	} else {
		targetURL = "http://goonzucz.sbs.co.kr"+ targetURL;
	}

	if (this.name == "ccomzi") {
		location.href = targetURL;
		this.focus();
	} else {
		var targetWindow = window.open(targetURL, "ccomzi", "left=100, top=100, width=730, height=627, toolbar=no, menubar=no, scrollbars=no, resizable=no");
		targetWindow.focus();
		return;
	}
}

// ¾ÆÀÌµð prefix ¾ò±â
function getPrefixUserid(id) {
	var returnPrefixUserID = "";
	returnPrefixUserID = id.substring(0, 2);
	return returnPrefixUserID;
}

// ¾ÆÀÌµð prefix Á¦°ÅÇÏ±â
function removePrefixUserid(id) {
	var returnUserID = "";
	var prefixUserID = "";
	prefixUserID = getPrefixUserid(id);
	if ((prefixUserID == "i_") || (prefixUserID == "s_"))
		returnUserID = id.substring(2, id.length);
	else
		returnUserID = id;
	return returnUserID;
}

// À¥¼­ºñ½ºº° ¾ÆÀÌµð ¾ò±â
function getASPUserid(id, idtype) {
	var dnsName = document.domain;
	var returnUserID = "";
	var prefixUserID = "";
	if ((isEmpty(id)) || (id.length < 3)) {
		returnUserID = id;
	} else {
		// ÀÎÆ¼Áð À¥¼­ºñ½ºÀÏ °æ¿ì
		if (dnsName.indexOf("ndoors.com") > (-1)) {
			returnUserID = id;
		// SBS À¥¼­ºñ½ºÀÏ °æ¿ì
		} else {
			// ¾ÆÀÌµð prefix ¾ò±â
			prefixUserID = getPrefixUserid(id);
			// ¾ÆÀÌµð prefix Á¦°Å
			id = removePrefixUserid(id);
			// À¥¼­ºñ½º ±âÁØ ½ÇÁ¦ ¾ÆÀÌµð ¾ò±â
			if (idtype == "REAL") {
				// ÀÎÆ¼Áð prefix°¡ Á¸ÀçÇÏ¸é Á¦°Å, SBS ¾ÆÀÌµð¿¡ prefix Ãß°¡
				if (prefixUserID == "i_")
					returnUserID = id;
				else
					returnUserID = "s_"+ id;
			// À¥¼­ºñ½º ±âÁØ °¡»ó ¾ÆÀÌµð ¾ò±â
			} else {
				// SBS prefix°¡ Á¸ÀçÇÏ¸é Á¦°Å, ÀÎÆ¼Áð ¾ÆÀÌµð¿¡ prefix Ãß°¡
				if (prefixUserID == "s_")
					returnUserID = id;
				else
					returnUserID = "i_"+ id;
			}
		}
	}
	return returnUserID;
}

function gotoCcomzi_toUserid(id) {
	id = getASPUserid(id, "VIRTUAL");

	var targetURL = "/"+ id +"/";
	gotoCcomzi(targetURL);
	return;
}

function gotoCcomzi_tonick(id) {
	
	var x = (screen.width  - 720) / 2;
	var y = (screen.height - 529) / 2;
	var targetURL = "http://ccomzi.ndoors.com/mh/admin/myinfo_write_pop.asp";
	targetURL += "?uid="+ id;
	window.open(targetURL,"nick","width=376,height=210,left=" + x + ",top=" + y + ",menubar=no,scrollbars=no");			

	return;
}

function SendSMS()
{
		var x = (screen.width  - 720) / 2;
		var y = (screen.height - 529) / 2;
					
		window.open("/center/SMS/","sms","width=720,height=529,left=" + x + ",top=" + y + ",menubar=no,scrollbars=no");			
}

function gotoCcomzi_toURL(loc, id, center, board_idx, page, list_seq) {
	var targetURL = "/mh";
	targetURL += "/"+ loc +"/";
	targetURL += "?uid="+ id;
	targetURL += "&center="+ center;
	targetURL += "&board_idx="+ board_idx;
	targetURL += "&page="+ page;
	targetURL += "&list_seq="+ list_seq;

	gotoCcomzi(targetURL);
	return;
}

function gotoHelp()
{
		var x = (screen.width  - 817) / 2;
		var y = (screen.height - 750) / 2;
				
		//window.open("http://help.ndoors.com/GOONZU/index.asp","help","width=817,height=750,left=" + x + ",top=" + y + ",menubar=no,scrollbars=yes");			
		window.open("https://cs.ndoors.com/","help");
}

function gotoHelp2()
{
		var x = (screen.width  - 817) / 2;
		var y = (screen.height - 750) / 2;
					
		//window.open("http://help.ndoors.com/GOONZU/mail/exMailQuestion_nologin.asp","help","width=817,height=750,left=" + x + ",top=" + y + ",menubar=no,scrollbars=yes");			
		window.open("https://cs.ndoors.com/","help");
}
function myQ()
{
		var x = (screen.width  - 817) / 2;
		var y = (screen.height - 750) / 2;
					
		//window.open("http://help.ndoors.com/GOONZU/mail/exMailBoard.asp","help","width=817,height=750,left=" + x + ",top=" + y + ",menubar=no,scrollbars=yes");			
		window.open("https://cs.ndoors.com/","help");
}
function myO()
{
		var x = (screen.width  - 817) / 2;
		var y = (screen.height - 750) / 2;
					
		//window.open("http://help.ndoors.com/GOONZU/mail/exMailBoard_singo.asp","help","width=817,height=750,left=" + x + ",top=" + y + ",menubar=no,scrollbars=yes");			
		window.open("https://cs.ndoors.com/","help");
}
function mantoman()
{
		var x = (screen.width  - 817) / 2;
		var y = (screen.height - 750) / 2;
					
		//window.open("http://help.ndoors.com/GOONZU/mail/exMailQuestion.asp","help","width=817,height=750,left=" + x + ",top=" + y + ",menubar=no,scrollbars=yes");			
		window.open("https://cs.ndoors.com/","help");
}
function hardship()
{
		var x = (screen.width  - 817) / 2;
		var y = (screen.height - 750) / 2;
					
		//window.open("http://help.ndoors.com/GOONZU/mail/exMailQuestion_singo.asp","help","width=817,height=750,left=" + x + ",top=" + y + ",menubar=no,scrollbars=yes");			
		window.open("https://cs.ndoors.com/","help");
}
function itemfaq()
{
		var x = (screen.width  - 817) / 2;
		var y = (screen.height - 750) / 2;
					
		//window.open("http://help.ndoors.com/GOONZU/faq/exSelfFAQS.asp","help","width=817,height=750,left=" + x + ",top=" + y + ",menubar=no,scrollbars=yes");			
		window.open("https://cs.ndoors.com/","help");
}

// ºôÇÃ·º½º ÃæÀüÃ¢
function MakeNewWindow(objnm, theUrl, AddOption){
	var OpenOption = "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,top=10,left=10,"+ AddOption;
	var reWin = window.open(theUrl, "billflex", OpenOption);
	reWin.focus();
	return;
}

function BannerNewWindow(theUrl, theWidth, theheight){
	var OpenOption = "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,top=10,left=10,width="+theWidth+",height="+theheight;
	var reWin = window.open(theUrl, "BannerPop", OpenOption);
	reWin.focus();
	return;
}

function AgreeNewWindow(theUrl, theWidth, theheight){
	var OpenOption = "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,top=10,left=10,width="+theWidth+",height="+theheight;
	var reWin = window.open(theUrl, "mallAuthConfirm", OpenOption);
	reWin.opener = top.opener;
	reWin.focus();
	return;
}

function Launch_GOONZU()
{
	var game = "Software\\Intizen\\GoonZu\\goonzurun.exe";
	try 
	{
		if (GzLauncher.IsInstalled(game) == 1)
		{
			GzLauncher.LaunchExe("", game);
		}
		else
		{
			alert("ÇöÀç ±ºÁÖ¿Â¶óÀÎÀÌ ¼³Ä¡µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù. ¼³Ä¡ÈÄ ½ÇÇàÇØ ÁÖ½Ê½Ã¿ä.");
			return;
		}
	}
	catch(e)
	{
		alert("ÇöÀç ActiveX ControlÀÌ Á¤»óÀûÀ¸·Î ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù.");
		return;
	}

}

<!-- ÆäÀÌÁö ºí·¯¸µ-->	
 function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 
<!--ÆäÀÌÁö ºí·¯¸µ ³¡-->

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_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_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_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 popWindow(w,h,url)
{
	var x = (screen.width  - w) / 2;
	var y = (screen.height - h) / 2;
						
	window.open(url,"popup","width=" + w + ",height=" + h + ",left=" + x + ",top=" + y + ",menubar=no,scrollbars=no");		
}

function event20080205()
{
		var x = (screen.width  - 817) / 2;
		var y = (screen.height - 750) / 2;
					
		window.open("http://goonzu.ndoors.com/center/event/event20080205.asp","help","width=1,height=1,left=" + x + ",top=" + y + ",menubar=no,scrollbars=yes");			
}

function event20090910()
{
		var x = (screen.width  - 817) / 2;
		var y = (screen.height - 750) / 2;
					
		window.open("/center/event/20090910/default.asp","20090910","width=1,height=1,left=" + x + ",top=" + y + ",menubar=no,scrollbars=no");
}
function openmyinfoc()
{
	window.open('http://signup.ndoors.com/Mypage/Ndoors?site=goonzu', 'update');
}

// ÀÚµ¿À¸·Î ÄÞ¸¶ ³Ö±â
function number_format(num) {
 num = num.replace(/,/g, "")
 var num_str = num.toString()
 var result = ''

  for(var i=0; i<num_str.length; i++) {
		var tmp = num_str.length-(i+1)
		if(i%3==0 && i!=0) result = ',' + result
		result = num_str.charAt(tmp) + result
   }

	return result
}

// end script -->

