function notice_getCookie( name ){
  var nameOfCookie = name + "=";
  var x = 0;
  while ( x <= document.cookie.length ){
    var y = (x+nameOfCookie.length);
    if ( document.cookie.substring( x, y ) == nameOfCookie ) {
      if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
        endOfCookie = document.cookie.length;
      return unescape( document.cookie.substring( y, endOfCookie ) );
    }
    x = document.cookie.indexOf( " ", x ) + 1;
    if ( x == 0 )
      break;
  }
  return "";
}

//       NewWindow('URL','À©µµ¿ì&ÄíÅ°ÀÌ¸§', Ã¢Æø, ³ôÀÌ, XÁÂÇ¥or'c', YÀÚÇ¥or'c', 'a','no')
function NewWindow( uurl , name, xSize, ySize, posX, posY, sscroll, cok ){

  if     (sscroll=='yes'||sscroll=='y')  sscroll='yes';
  else if(sscroll=='auto'||sscroll=='a') sscroll='auto';
  else    sscroll='no';

  if ( notice_getCookie( name ) != "done" || (cok=="no"||cok=="n") ){
    var winl = posX;
    var wint = posY;
    if(posX=="center"||posX=="c"){
        winl = (screen.width - xSize) / 2;
    }
    if(posY=="center"||posY=="c"){
        wint = (screen.height - ySize) / 2;
    }

    var settings = 'height='+ySize+',width='+xSize+',top='+wint+',left='+winl+',scrollbars=no,resizable';
    wwin = window.open('', name ,settings ); //ÆË¾÷À©µµ¿ìÀÇ °æ·Î¿Í Å©±â¸¦ ¼³Á¤ ÇÏ¼¼¿ä
    wwin.resizeTo( eval(xSize),eval(ySize) );
    wwin.focus();

    wwin.document.write('<html>');
    wwin.document.write('<head>');
    wwin.document.write('<script language="JavaScript">');
    wwin.document.write('function notice_setCookie( name, value ){');
    wwin.document.write('var todayDate = new Date();');
    wwin.document.write('todayDate.setDate( todayDate.getDate() );');
    wwin.document.write('todayDate.setHours(23);');
    wwin.document.write('todayDate.setMinutes(59,59,999);');
    wwin.document.write('document.cookie = name + "=" + escape( value ) + "; path=\/; expires=" + todayDate.toGMTString() + ";";');
    wwin.document.write('}');
    wwin.document.write('function notice_closeWin(chkname){');
    wwin.document.write('var chkTmp = eval("document.forms[0]."+chkname);');
    wwin.document.write('if ( chkTmp.checked ){notice_setCookie( chkname, "done" );}');
    wwin.document.write('self.close(); ');
    wwin.document.write('}');
    wwin.document.write('<\/script>');
    wwin.document.write('<\/head>');
    wwin.document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
    wwin.document.write('<form name="myform">');
    wwin.document.write('<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">');
    wwin.document.write('  <tr>');
    wwin.document.write('    <td><iframe src="'+uurl+'" width="100%" height="100%" frameborder="0" scrolling="'+sscroll+'"><\/iframe><\/td>');
    wwin.document.write('  <\/tr>');
    if(cok=="yes" || cok=="y"){
        wwin.document.write('  <tr>');
        wwin.document.write('    <td style="height:20px;background-color:#BCAFA1;font-family:±¼¸²,µ¸¿ò;font-size:11px;">');
		wwin.document.write('        <table border="0" cellspacing="0" cellpadding="0" style="height:100%;width:100%;">');
		wwin.document.write('        <tr>');
		wwin.document.write('            <td style="width:20px;"><input type="checkbox" name="'+name+'"></td>');
		wwin.document.write('            <td style="font-family:±¼¸²,µ¸¿ò;font-size:11px;color:#1B1B1B;padding-top:4px;">¿À´ÃÇÏ·ç ÀÌ Ã¢À» ¶ç¿ìÁö ¾ÊÀ½ ¡¡ |</td>');
		wwin.document.write('            <td style="width:10px;padding-top:3px;"><img src="/image/pop_butt_close.gif" border="0" width="7" height="7"></td>');
		wwin.document.write('            <td style="width:43px;padding-top:4px;"><a href="javascript:notice_closeWin(\''+name+'\');" style="font-family:±¼¸²,µ¸¿ò;font-size:11px;text-decoration:none;color:#1B1B1B;">close</a></td>');
		wwin.document.write('        </tr>');
		wwin.document.write('        </table>');
        wwin.document.write('    <\/td>');
        wwin.document.write('  <\/tr>');
    }
    wwin.document.write('<\/table>');
    wwin.document.write('<\/form>');
    wwin.document.write('<\/body>');
    wwin.document.write('<\/html>');
    wwin.history.go(0);
  }
}

function centerNewWin(url, name, width, height) {
  var wi = screen.width - width;
  var hi = screen.height - height;

  if( wi < 0 ) wi = 0;
  if( hi < 0 ) hi = 0;

  var info = 'left=' + (wi/2) + ',top=' + (hi/2) + ',width='  + width + ',height=' + height + ',resizable=yes,scrollbars=yes,menubars=no,status=yes';
  var newwin = window.open(url, '', info);
  newwin.focus();
//  return newwin;
}

function centerNewWin2(url, name, width, height) {
  var wi = screen.width - width;
  var hi = screen.height - height;

  if( wi < 0 ) wi = 0;
  if( hi < 0 ) hi = 0;

  var info = 'left=' + (wi/2) + ',top=' + (hi/2) + ',width='  + width + ',height=' + height + ',menubar=no,status=no,resizable=no,scrollbars=auto';
  var newwin = window.open(url, '', info);
  newwin.focus();
  return;
}

//       NewWindow2('URL','À©µµ¿ì&ÄíÅ°ÀÌ¸§', Ã¢Æø, ³ôÀÌ, XÁÂÇ¥or'c', YÀÚÇ¥or'c', 'a','no')
function NewWindow2( uurl , name, xSize, ySize, posX, posY, sscroll, cok ){

  if     (sscroll=='yes'||sscroll=='y')  sscroll='yes';
  else if(sscroll=='auto'||sscroll=='a') sscroll='auto';
  else    sscroll='no';

  if ( notice_getCookie( name ) != "done" || (cok=="no"||cok=="n") ){
    var winl = posX;
    var wint = posY;
    if(posX=="center"||posX=="c"){
        winl = (screen.width - xSize) / 2;
    }
    if(posY=="center"||posY=="c"){
        wint = (screen.height - ySize) / 2;
    }

    var settings = 'height='+ySize+',width='+xSize+',top='+wint+',left='+winl+',scrollbars=no,resizable';
    wwin = window.open('', name ,settings ); //ÆË¾÷À©µµ¿ìÀÇ °æ·Î¿Í Å©±â¸¦ ¼³Á¤ ÇÏ¼¼¿ä
    wwin.focus();

    wwin.document.write('<html>');
    wwin.document.write('<head>');
    wwin.document.write('<script language="JavaScript">');
    wwin.document.write('function notice_setCookie( name, value ){');
    wwin.document.write('var todayDate = new Date();');
    wwin.document.write('todayDate.setDate( todayDate.getDate() );');
    wwin.document.write('todayDate.setHours(23);');
    wwin.document.write('todayDate.setMinutes(59,59,999);');
    wwin.document.write('document.cookie = name + "=" + escape( value ) + "; path=\/; expires=" + todayDate.toGMTString() + ";";');
    wwin.document.write('}');
    wwin.document.write('function notice_closeWin(chkname){');
    wwin.document.write('var chkTmp = eval("document.forms[0]."+chkname);');
    wwin.document.write('if ( chkTmp.checked ){notice_setCookie( chkname, "done" );}');
    wwin.document.write('self.close(); ');
    wwin.document.write('}');
    wwin.document.write('<\/script>');
    wwin.document.write('<\/head>');
    wwin.document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
    wwin.document.write('<form name="myform">');
    wwin.document.write('<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">');
    wwin.document.write('  <tr>');
    wwin.document.write('    <td><iframe src="'+uurl+'" width="100%" height="100%" frameborder="0" scrolling="'+sscroll+'"><\/iframe><\/td>');
    wwin.document.write('  <\/tr>');
    if(cok=="yes" || cok=="y"){
        wwin.document.write('  <tr>');
        wwin.document.write('    <td style="height:20px;background-color:#BCAFA1;font-family:±¼¸²,µ¸¿ò;font-size:11px;">');
		wwin.document.write('        <table border="0" cellspacing="0" cellpadding="0" style="height:100%;width:100%;">');
		wwin.document.write('        <tr>');
		wwin.document.write('            <td style="width:20px;"><input type="checkbox" name="'+name+'"></td>');
		wwin.document.write('            <td style="font-family:±¼¸²,µ¸¿ò;font-size:11px;color:#1B1B1B;padding-top:4px;">¿À´ÃÇÏ·ç ÀÌ Ã¢À» ¶ç¿ìÁö ¾ÊÀ½ ¡¡ |</td>');
		wwin.document.write('            <td style="width:10px;padding-top:3px;"><img src="/image/pop_butt_close.gif" border="0" width="7" height="7"></td>');
		wwin.document.write('            <td style="width:43px;padding-top:4px;"><a href="javascript:notice_closeWin(\''+name+'\');" style="font-family:±¼¸²,µ¸¿ò;font-size:11px;text-decoration:none;color:#1B1B1B;">close</a></td>');
		wwin.document.write('        </tr>');
		wwin.document.write('        </table>');
        wwin.document.write('    <\/td>');
        wwin.document.write('  <\/tr>');
    }
    wwin.document.write('<\/table>');
    wwin.document.write('<\/form>');
    wwin.document.write('<\/body>');
    wwin.document.write('<\/html>');
    wwin.history.go(0);
  }
}

function NewWinSimple( uurl, nname ){
    var settings = 'menubar=no';
    wwin = window.open(uurl, nname ,settings );
    wwin.focus();
}

function NewWinSimple2( uurl, nname, xSize, ySize, posX, posY, sscroll ){
	var winl = posX;
	var wint = posY;
	if(posX=="center"||posX=="c") winl = (screen.width - xSize) / 2;
	if(posY=="center"||posY=="c") wint = (screen.height - ySize) / 2;
	if     (sscroll=='yes'||sscroll=='y')  sscroll='yes';
	else if(sscroll=='auto'||sscroll=='a') sscroll='auto';
	else    sscroll='no';

	var settings = 'height='+ySize+',width='+xSize+',top='+wint+',left='+winl+',scrollbars='+sscroll+', resizable';
	wwin = window.open(uurl, nname ,settings );
	wwin.focus();
}