objDate = new Date();
function open_win ( url, name, w, h,type )
{
	 var window_left = (screen.width - w) / 2;
  var window_top  = (screen.height - h) / 2;
  if(type != 1 ) {
  var winname     = window.open( url, name, "scrollbars=no,resizable=no,resize=no,width="+w+",height="+ h + ',top=' + window_top + ',left=' + window_left + '' );
  } else {
 	var winname     = window.open( url, name, "scrollbars=yes,resizable=no,resize=no,width="+w+",height="+ h + ',top=' + window_top + ',left=' + window_left + '' );
  }
  winname.focus();
}

function getMyDate ()
{
  return '' + objDate.getFullYear() + '-' + objDate.getMonth()+ '-' +objDate.getDate();
}

function global_pointer ()
{
  p = self;

  /* popup */
  if (p.top.opener && p != p.top.opener && p.top.opener.sc_session)
    {
      /* top.opener°¡ ¾øÀ»¶§±îÁö opener¸¦ ÃßÀû */
      while (p.top.opener && p != p.top.opener && p.top.opener.sc_session)
        p = p.top.opener;
      /* °Å±â¼­ºÎÅÍ parent¸¦ ÃßÀû */
      q = p;
      while (q.parent && q != q.parent && q.parent.sc_session)
        q = q.parent;
      self.top.opener = q;
      sc_session = q.sc_session;
      sc_virtual = q.sc_virtual;
      sc_game = q.sc_game;
      sc_menu = q.sc_menu;
      is_mn_wnd = false;
    }
  /* body */
  else if (p.parent && p != p.parent && p.parent.sc_session)
    {
      while (p.parent && p != p.parent && p.parent.sc_session)
        p = p.parent;
      sc_session = p.sc_session;
      sc_virtual = p.sc_virtual;
      sc_game = p.sc_game;
      sc_menu = p.sc_menu;
    }

  is_ready_gp = true;
}

function amountComma(amount,msg){ 
var resultAmount = ""; //°á°ú°ªÀ» ÀúÀåÇÏ´Â º¯¼ö 
var oneChar = ""; //ÇÑÀÚ¸®¼ö ÃßÃâ¹Þ´Â º¯¼ö 
for(i=amount.length-1,count=1;i>=0;i--,count++){ 
oneChar=amount.charAt(i); 
if(count%3==0 && count>1 && i>0) resultAmount=msg+oneChar+resultAmount; 
else resultAmount=oneChar+resultAmount; 
} 
return resultAmount; 
} 
