// ·Î±×¾Æ¿ô ÆäÀÌÁö·Î ÀÌµ¿ÇÑ´Ù.
// ÇÇ¸Á ÆäÀÌÁö¿¡¼­´Â ÇÇ¸Á ·Î±×¾Æ¿ô ÆäÀÌÁö·Î ÀÌµ¿ÇÑ´Ù.
function LogOutSayClub()/*{{{*/
{
  document.location.href = "http://www.sayclub.com/logout.nwz";

  return;
}/*}}}*/

/*******************************************************************************
 ***** ¼¼¼Ç °ü·Ã ÇÔ¼öµé ************************************ ´ã´ç : ½ÅÁ¾ÈÆ *****
 ******************************************************************************/

// Á¤¼öÇü ¼¼¼Ç °ªÀ» ÀÐ¾î¿Â´Ù. 
// °ªÀ» ÀÐ¾î¿À´Âµ¥ ½ÇÆÛÇÏ°Å³ª °ªÀÌ ¾øÀ» °æ¿ì¿¡´Â 0 À» ¹ÝÈ¯ÇÑ´Ù.
function getSessionValueInt(varname)/*{{{*/
{
  if (typeof(AppletSession) == 'object' && 
      AppletSession.getvalue(varname) != '' && 
      AppletSession.getvalue(varname) > 0) 
    return parseInt(AppletSession.getvalue(varname));
  else
    return 0;
}/*}}}*/

/*******************************************************************************
 ***** À©µµ¿ì °ü·Ã ÇÔ¼öµé ********************************** ´ã´ç : ½ÅÁ¾ÈÆ *****
 ******************************************************************************/

function openWindow(url, name, width, height)/*{{{*/
{
  var vtop  = (screen.height - height) / 2 - 18;
  var vleft = (screen.width - width) / 2;
  var oWin  = window.open(url, name, "scrollbars=no, resizable=no, width="+width+", height="+height+", top="+vtop+", left="+vleft);
  try { oWin.focus(); } catch (Exception) {}
  return oWin;
}/*}}}*/

function openWindowWithScroll(url, name, width, height)/*{{{*/
{
  var vtop  = (screen.height - height) / 2 - 18;
  var vleft = (screen.width - width) / 2;
  var oWin  = window.open(url, name, "scrollbars=yes, resizable=no, width="+width+", height="+height+", top="+vtop+", left="+vleft);
  try { oWin.focus(); } catch (Exception) {}
  return oWin;
}/*}}}*/

function openMyHompy(str)/*{{{*/
{
  open_hompy2_srl(MSRL, str);
}/*}}}*/

/*******************************************************************************
 ***** ÀÎÇ²Æû °ü·Ã ÇÔ¼öµé ********************************** ´ã´ç : ½ÅÁ¾ÈÆ *****
 ******************************************************************************/

function getStringLength(str)/*{{{*/
{
  var len = 0;

  for (var i=0; i<str.length; i++) {
    var n = str.charCodeAt(i);
    if ((n >= 0)  && (n < 256))
      len ++;
    else
      len += 2;
  }
  return len;
} /*}}}*/
  
function cutString(str, maxlen)/*{{{*/
{ 
  var len = 0; 
  var result = "";
  
  for (var i=0; i<str.length; i++)
  {
    var n = str.charCodeAt(i);
  
    if ((n >= 0) && (n < 256))
      len++;
    else
      len += 2;

    if (len <= maxlen)
      result += str.charAt(i);
    else
      break;
  } 
    
  return result;
}   /*}}}*/
    
function getTextLength(str, maxlen, oInput, target)/*{{{*/
{
  strlen = getStringLength(str);
  if (strlen > maxlen)
  {
    openAlert("common", "¿À·ù", "ÃÖ´ë ÇÑ±Û "+parseInt(maxlen/2)+"ÀÚ, ¿µ¹® "+maxlen+"ÀÚ ±îÁö¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.");
    if (typeof(oInput) != 'undefined')
      str = oInput.value = cutString(str, maxlen);
  }
  
  if (typeof(target) != "undefined")
    target.innerHTML = getStringLength(str)
} /*}}}*/

/*******************************************************************************
 ***** ±âÅ¸ ÇÔ¼öµé ***************************************** ´ã´ç : ½ÅÁ¾ÈÆ *****
 ******************************************************************************/

function emptyLink()/*{{{*/
{
} /*}}}*/

