/***************************************
* È­¸é°³¼± -  ÇÃ·¡½Ã »ý¼º ½ºÅ©¸³Æ®
***************************************/

 
 function MakeHttpObject()
 {
	try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}     //IE6  
	try {return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}  //IE5.5
	try { return new XMLHttpRequest(); } catch(e) {}                          //IE7, Firefox  
	alert("XMLHttpRequest¸¦ Áö¿øÇÏÁö ¾Ê´Â ºê¶ó¿ìÀúÀÔ´Ï´Ù.");
	return null;
 }
 

function swf(src,w,h){
           html = '';

           html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" id="param" width="'+w+'" height="'+h+'">';

           html += '<param name="movie" value="'+src+'">';

           html += '<param name="quality" value="high">';

           html += '<param name="bgcolor" value="#ffffff">';

           html += '<param name="menu" value="false">';

           html += '<param name="WMode" value="Transparent">';

           html += '<param name="swliveconnect" value="true">';

           html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';


           html += '<\/object>';

           document.write(html);

}
<!--
  function OnEnter( field )
  {
    if( field.value == field.defaultValue ) { field.value = ""; }
  }






function overTr(bgc) {


bgc.style.backgroundColor="#fce7db";
}

function outTr(bgc) {


bgc.style.backgroundColor="";
}



/*****************************************
* Flash Login Ã³¸® ÇÔ¼ö 
* º¯°æ: UI °³ÆíÀ¸·ÎÀÎÇÑ ·Î±×ÀÎ Ã³¸® ÇÔ¼ö·Î º¯°æ ( 20090720 Å©¸²ÇÏ¿ì½º )
***************************************/
function flashLoginCheck(argUserId, argState, argLevel,urlPath,PwUpdateState)
{
  if(argState == "0")
  {
	//  saveid(this.form);
	  if(PwUpdateState == 1)
	  { 
		window.location.href="/Members/CheckPassword.asp?rurl="+urlPath;
	  }
	  else 
	  {

		  window.location.href=urlPath;
	  }
	  	 
    //if(argLevel != "0")
    //{
      //Win_pop2("/Popup/LevelUp.asp?grd=" + argLevel, "_blank", 440, 352, 0);
    //}
  }
  else
  {
	var userId=document.form.userId;
	var passwd=document.form.passwd;

    switch(argState)
    {
      case "B" :
        alert("ºÒ·®È¸¿øÀ¸·Î ºÐ·ùµÇ¾î ·Î±×ÀÎ ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		userId.value="";
		passwd.value="";
		userId.focus();
        break;
      case "N" :
        alert("È¸¿ø Å»Åð·Î »ç¿ëÀÌ ±ÝÁöµÈ ¾ÆÀÌµðÀÔ´Ï´Ù. È®ÀÎ ÈÄ ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.");
	    userId.value="";
		passwd.value="";
		userId.focus();
        break;
     // case "R" :
     //   Win_pop2("/Popup/ParentsCheck.asp?stat=R", "PARENTSCHECK", 443, 352, "no");	// ºÎ¸ð´Ô µ¿ÀÇ¸¦ ¾ò¾î¾ß ÇÕ´Ï´Ù.
     //   break;
     // case "F" :
     //   Win_pop2("/Popup/ParentsCheck.asp?stat=F", "PARENTSCHECK", 443, 352, "no");
     //   break;
      case "E" :
        alert("·Î±×ÀÎ ¿À·ù ÀÔ´Ï´Ù. °ü¸®ÀÚ¿¡°Ô ¹®ÀÇÇØ ÁÖ¼¼¿ä.");
	    userId.value="";
		passwd.value="";
		userId.focus();
        break;
     // case "P" :
     //   Win_pop2("/Popup/ParentsCheck.asp?stat=P&userId="+argUserId, "PARENTSCHECK", 443, 352, "no");
     //   break;
      case "D" :
        alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù. È®ÀÎ ÈÄ ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.");
		passwd.value="";
		passwd.focus();
		break;
      case "T" :
        Win_pop2("/Members/Join/TurnUserPvtFlash.asp?userId=" + argUserId, "turn", 677, 775, 1);
        break;
      case "I" :
        alert("ÇØ´ç ¾ÆÀÌµð·Î µî·ÏµÈ È¸¿øÀÌ ¾ø½À´Ï´Ù. È®ÀÎ ÈÄ ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.");
	  	userId.value="";
		passwd.value="";
		userId.focus();
        break;
    }
  }
}

/*****************************************
* Flash Login ¿ÍÀÌ¹ø½º ·Î±×ÀÎ Ã³¸® 
* º¯°æ: UI °³ÆíÀ¸·ÎÀÎÇÑ ·Î±×ÀÎ Ã³¸® ÇÔ¼ö·Î º¯°æ 
***************************************/
function flashLoginCheck2(argUserId, argState, argLevel,urlPath,PwUpdateState)
{
  if(argState == "0")
  {
	//  saveid(this.form);
	  if(PwUpdateState == 1)
	  { 
		  window.location.href="/Members/CheckPassword.asp?rurl="+urlPath;
	  }
	  else 
	  {

		  window.location.href=urlPath;
	  }
	  	 
    //if(argLevel != "0")
    //{
      //Win_pop2("/Popup/LevelUp.asp?grd=" + argLevel, "_blank", 440, 352, 0);
    //}
  }
  else
  {
	var userId=document.form2.userId;
	var passwd=document.form2.passwd;

    switch(argState)
    {
      case "B" :
        alert("ºÒ·®È¸¿øÀ¸·Î ºÐ·ùµÇ¾î ·Î±×ÀÎ ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		userId.value="";
		passwd.value="";
		userId.focus();
        break;
      case "N" :
        alert("È¸¿ø Å»Åð·Î »ç¿ëÀÌ ±ÝÁöµÈ ¾ÆÀÌµðÀÔ´Ï´Ù. È®ÀÎ ÈÄ ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.");
	    userId.value="";
		passwd.value="";
		userId.focus();
        break;
     // case "R" :
     //   Win_pop2("/Popup/ParentsCheck.asp?stat=R", "PARENTSCHECK", 443, 352, "no");	// ºÎ¸ð´Ô µ¿ÀÇ¸¦ ¾ò¾î¾ß ÇÕ´Ï´Ù.
     //   break;
     // case "F" :
     //   Win_pop2("/Popup/ParentsCheck.asp?stat=F", "PARENTSCHECK", 443, 352, "no");
     //   break;
      case "E" :
        alert("·Î±×ÀÎ ¿À·ù ÀÔ´Ï´Ù. °ü¸®ÀÚ¿¡°Ô ¹®ÀÇÇØ ÁÖ¼¼¿ä.");
	    userId.value="";
		passwd.value="";
		userId.focus();
        break;
     // case "P" :
     //   Win_pop2("/Popup/ParentsCheck.asp?stat=P&userId="+argUserId, "PARENTSCHECK", 443, 352, "no");
     //   break;
      case "D" :
        alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù. È®ÀÎ ÈÄ ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.");
		passwd.value="";
		passwd.focus();
		break;
      case "T" :
        Win_pop2("/Members/Join/TurnUserPvtFlash.asp?userId=" + argUserId, "turn", 677, 775, 1);
        break;
      case "I" :
        alert("ÇØ´ç ¾ÆÀÌµð·Î µî·ÏµÈ È¸¿øÀÌ ¾ø½À´Ï´Ù. È®ÀÎ ÈÄ ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.");
	  	userId.value="";
		passwd.value="";
		userId.focus();
        break;
    }
  }
}


function LoginCheck(argUserId, argState, argLevel, urlPath, PwUpdateState){
		
		if (PwUpdateState == 1) {
			window.location.href = "/Members/CheckPassword.asp?rurl="+urlPath;
		}		
}



/*FAQ*/


function ListView(id) {


var bx = document.getElementById(id);
if (bx.style.display == "block")
{
  bx.style.display="none";
} else
  {
    bx.style.display="block";
  }



}
/***************************************
* board Ã¹¹øÂ° ¶óÀÎ ¾ø¾Ö±â
***************************************/
function boardClass(el,rowNo) {
  var targetEl = document.getElementById(el);
  if(targetEl.rows[rowNo]) {

    var targetCell = targetEl.rows[rowNo].cells;

    for(var i=0; i<targetCell.length; i++) {
      targetCell[i].style.background = "transparent";
    }

  }
}

function getElementsByClass(_class, el_id) {
 var browser=navigator.appName;
 var getkey=navigator.appVersion;

  var parent, els, returnArr = new Array(), i = 0;
  parent = (el_id) ? document.getElementById(el_id) : document;

  els = parent.getElementsByTagName('*');

 if ((browser.substring(0, 9)=="Microsoft") && (getkey.substring(22, 23)=="5")) els = parent.all;

  for (i; i < els.length; i++) {
    if ((els[i].className == _class) || (els[i].className.indexOf(" "+_class) != -1 )) {
      returnArr[returnArr.length] = els[i];
  }
 }

  return returnArr;


}

/***************************************
* Logout
***************************************/
function Logout()
{
  top.location.href = "/Members/Logout.asp";
}

/***************************************
* RSS ClipBoard º¹»ç
***************************************/
function fncCopy2ClipBoard(argText)
{
  window.clipboardData.setData('Text', argText);
  alert('RSS°¡ º¹»çµÇ¾ú½À´Ï´Ù.\nÀÌÁ¦ RSS¸®´õ ÇÁ·Î±×·¥¿¡ ÀÔ·ÂÇÏ¼¼¿ä..');
}

/***************************************
* ½ºÅ©·Ñ Å¾ ¹öÆ°
***************************************/
function gotop(){
  document.body.scrollTop=0;
}

/***************************************
* ÆäÀÌÁö focus blur
***************************************/
function bluring(){
  if (event.srcElement!=null) {
    if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
  }
}
document.onfocusin=bluring;

/***************************************
* ÀÌ¹ÌÁö ·Ñ¿À¹ö ex) <img src="url" onmouseover="menuOn(this);" onmouseout="menuOut(this);"  />
***************************************/
function menuOn(imgEl)
{
  imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}

function menuOut(imgEl)
{
  imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}


/***************************************
* ÀÌ¹ÌÁö ·Ñ¿À¹ö ex) <img src="url" onmouseover="menuOn(this,'gif');" onmouseout="menuOut(this,'gif');" border="0">

function menuOn(imgEl,file)
{
  imgEl.src = imgEl.src.replace("."+ file +"", "_on."+ file +"");
}

function menuOut(imgEl,file)
{
  imgEl.src = imgEl.src.replace("_on."+ file +"", "."+ file +"");
}
***************************************/



/***************************************
* OPENER url ¹Ù²Ù±â
***************************************/
function opener_url(url)
{
  opener.location=url;
}

/***************************************
* ÀÌº¥Æ® ÆË¾÷ ¶Ù¿ì±â
***************************************/
/*¸ÞÀÎ ÇÃ·¡½¬ ÀÌº¥Æ® ¹öÆ° 1 2 3 */

function wv_event01() {
	window.open('/Members/join/UserAgree.asp','join','width=677,height=940,scrollbars=yes');
}

function wv_event02() {
	window.open('/event/20080302/Turn.asp','_blank','width=20,height=20,scrollbars=no');
}


function wv_event03() {
	window.location="Event/EventView.asp?Idx=32"
}


// ÄíÅ°¸¦ ÀÐ¾î¼­ Á¸Àç ¿©ºÎ ¸®ÅÏ
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 "";
  }

function eventPop()
{
  //window.open('/EventPop/071022/071022_pop.html','_blink','width=560,height=746,top=0, left=0,scrollbars=no,toolbar=no');
}

/* ³ªÀÌÃ÷ ¸ÞÀÎ ÇÃ·¡½Ã ÆË¾÷¶ç¿ì±â
¸ÞÀÎ ³×ºñ°ÔÀÌ¼Ç¿¡¼­ SK KNIGHTS¸¦ Å¬¸¯ÇÏ¸é KnightEvent () È£Ãâ ÇÔ
*/
function KnightEvent () {
// ÄíÅ°¸¦ ÀÐ¾î¼­ Á¸Àç ÇÏÁö ¾ÈÀ¸¸é ÆË¾÷ ¶ç¿ò



if ( notice_getCookie( "20090514" ) != "done" ) {
		window.open('/EventPop/090514/event_pop.html','Popup0514','width=500,height=628,left=0, top=0');
}

	
}
/* T1 ¸ÞÀÎ ÇÃ·¡½Ã ÆË¾÷¶ç¿ì±â
¸ÞÀÎ ³×ºñ°ÔÀÌ¼Ç¿¡¼­ SKT1À» Å¬¸¯ÇÏ¸é T1Event() È£Ãâ ÇÔ
*/
function T1Event () {
// ÄíÅ°¸¦ ÀÐ¾î¼­ Á¸Àç ÇÏÁö ¾ÈÀ¸¸é ÆË¾÷ ¶ç¿ò
/*
   if ( notice_getCookie( "20090408" ) != "done" )  {
      window.open('/EventPop/090408/event_pop.html','20090408','width=500,height=700,top=0,left=0,scrollbars=no,toolbar=no'); // ÆË¾÷À©µµ¿ìÀÇ °æ·Î¿Í Å©±â¸¦ ¼³Á¤ ÇÏ¼¼¿ä
	}

	if ( notice_getCookie( "20090416" ) != "done" )  {
      window.open('/EventPop/090416/event_pop.html','20090416','width=500,height=700,top=0,left=515,scrollbars=no,toolbar=no'); 
	}
*/
}

// ¹ÚÅÂÈ¯ ÆË¾÷
function PTHEvent () {

	if ( notice_getCookie( "Popup" ) != "done" )
    {
          window.open('/EventPop/090508/event_pop.html','Popup0508','width=400 height=575, left=0, top=0'); // ÆË¾÷À©µµ¿ìÀÇ °æ·Î¿Í Å©±â¸¦ ¼³Á¤ ÇÏ¼¼¿ä
    }
}

/***************************************
* ÆË¾÷ ¶ç¿ì±â - opwin();
***************************************/
function opwin(url, width, height){
 var arg = "width=" + width + ", height=" + height +", scrollbars=no, status=no, toolbars=no, resizable = no";
 var win = window.open(url, '', arg);
 if (win !=null) win.focus();
}

/***************************************
* ÆË¾÷ ¶ç¿ì±â - opwin2();
***************************************/
function opwin2(url, width, height){
 var arg = "width=" + width + ", height=" + height +", scrollbars=yes, status=no, toolbars=no, resizable = no";
 var win = window.open(url, '', arg);
 if (win !=null) win.focus();
}

/***************************************
* ÆË¾÷ È­¸é Áß¾Ó¿¡ ¶ç¿ì±â - Win_pop();
***************************************/
function popWin(newwin,w,h,s){
  window.open(newwin,'','width='+w+',height='+h+',resizable=no,scrollbars='+s+',toolbars=no');
}

/***************************************
* ÆË¾÷ È­¸é Áß¾Ó¿¡ ¶ç¿ì±â - Win_pop();
***************************************/
function Win_pop(newwin,w,h,s) { // newwin:url, w:°¡·Î»çÀÌÁî, h:¼¼·Î»çÀÌÁî, s:½ºÅ©·Ñ ¿©ºÎ(yes or no)
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars='+s+',toolbars=no,status=no,menu=no';
  win = window.open(newwin, "_blank", winprops)
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function Win_pop3(newwin,w,h,s) { // newwin:url, w:°¡·Î»çÀÌÁî, h:¼¼·Î»çÀÌÁî, s:½ºÅ©·Ñ ¿©ºÎ(yes or no)
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars='+s+',toolbars=no,status=no,menu=no';
  win = window.open(newwin, "", winprops)
}

function Win_pop2(url, winName, w, h, s) { // newwin:url, w:°¡·Î»çÀÌÁî, h:¼¼·Î»çÀÌÁî, s:½ºÅ©·Ñ ¿©ºÎ(yes or no)
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars='+s+',toolbars=no,status=no,menu=no';
  win = window.open(url, winName, winprops)
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

/***************************************
* TOOGLE ÇÔ¼ö
***************************************/
function toggle(e) { // TYPE A
  if (e.style.display == "none") {
     e.style.display = "";
  } else {
     e.style.display = "none";
  }
}

/***************************************
* ¾ÆÀÌÇÁ·¹ÀÓ ½ºÅ©·Ñ¹Ù »ö º¯°æ
***************************************/
function setScrollColor(objFrame)
{
  try
  {
    self[objFrame.name].document.body.style.scrollbarFaceColor = "#eeeeee";
    self[objFrame.name].document.body.style.scrollbarHighlightColor = "#ffffff";
    self[objFrame.name].document.body.style.scrollbarShadowColor = "#FFFFFF";
    self[objFrame.name].document.body.style.scrollbar3dLightColor = "#b6b6b6";
    self[objFrame.name].document.body.style.scrollbarArrowColor = "#333333";
    self[objFrame.name].document.body.style.scrollbarTrackColor = "";
    self[objFrame.name].document.body.style.scrollbarDarkshadowColor = "";
  }
  catch(oException)
  {
    // Á¢±Ùº¸¾ÈÀÏ¶§ ¾Æ¹«·± ÀÏµµ ÇÏÁö ¾Ê´Â´Ù.
  }

}



/***************************************
* CONTENT TAB MENU
***************************************/
// TAB TYPE
function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

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_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_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 goMenu(Val,Sel)
{
  Sel.value = '';
  if (Val) location=Val;

}

/***************************************
* ÀÌ¹ÌÁö·Î ¹Ù·Î ÆË¾÷¶ç¿ì±â
****************************************/
function view(what) {
  window.open("/Common/Html/ImageView.html?src="+what,'','scrollbars=yes,status=no,toolbar=no,resizable=0,location=no,menu=no,width=10,height=10');
//  var imgwin = window.open("",'WIN','scrollbars=yes,status=no,toolbar=no,resizable=0,location=no,menu=no,width=10,height=10');
//  imgwin.focus();
//  imgwin.document.open();
//  imgwin.document.write("<html>\n");
//  imgwin.document.write("<head>\n");
//  imgwin.document.write("<title>IMAGE VIEW</title>\n");
//  imgwin.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=euc-kr\">\n");
//
//  imgwin.document.write("<sc"+"ript>\n");
//  imgwin.document.write("function resize() {\n");
//  imgwin.document.write("pic = document.il;\n");
//
//  imgwin.document.write(" var imgw = eval(pic).width; ");
//  imgwin.document.write("  if (eval(pic).width > 800){ eval(pic).width = 800\n "); //800pxº¸´ÙÅ©¸é 800À¸·Î
//  imgwin.document.write(" } else if(eval(pic).width < 800){ eval(pic).width = eval(pic).width\n} "); //800pxº¸´ÙÀÛÀ¸¸é ¿ø·¡Å©±â·Î
//
//  imgwin.document.write(" if (eval(pic).height) { var name = navigator.appName\n");
//  imgwin.document.write("  if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 40; myWidth = eval(pic).width + 10;\n");
//  imgwin.document.write("  } else { myHeight = eval(pic).height + 9; myWidth = eval(pic).width; }\n");
//  imgwin.document.write("  clearTimeout();\n");
//  imgwin.document.write("  var height = screen.height;\n");
//  imgwin.document.write("  var width = screen.width;\n");
//  imgwin.document.write("  var leftpos = width / 2 - myWidth / 2;\n");
//  imgwin.document.write("  var toppos = height / 2 - myHeight / 2; \n");
//  imgwin.document.write("  self.moveTo(leftpos, toppos);\n");
//  imgwin.document.write("  if (myWidth > width) { myWidth = width; }\n");
//  imgwin.document.write("  self.resizeTo(myWidth, myHeight+50);\n");
//  imgwin.document.write("}else setTimeOut(resize(), 100);}\n");
//  imgwin.document.write("</sc"+"ript>\n");
//
//  imgwin.document.write("</head>\n");
//  imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">\n');
//  imgwin.document.write('³»¿ëº¸±â\n');
//
//  imgwin.document.write("<img border=\"0\" src=\""+what+"\" name=il onload='resize();' style='cursor:pointer' onclick='window.close();'>\n");
//
//  imgwin.document.write("</body>\n");
//  imgwin.document.write("</html>\n");
//  imgwin.document.close();
}

/***************************************
* MOVIE  ÄÁÆ®·Ñ °ü·Ã
***************************************/

function mplay(){ //PLAY
  document.getElementById('mdefault').style.display='block';
  document.getElementById('mplayer').play();
}
function mplayon(){ //PLAY
  document.getElementById('mplayer').play();
}
function mpause(){ //PAUSE
  document.getElementById('mplayer').pause();
}
function mstop(){ //STOP
  document.getElementById('mplayer').stop();
}

//º¼·ý¹Ù
var nVolLeftPosition = 0;        // º¼·ý ¹Ù ¹è°æ ½ÃÀÛÁ¡
var nVolStartPosition = 19;      // º¼·ý ¹Ù ½ÃÀÛ Á¡
var nVolEndPosition = 63;        // º¼·ý ¹Ù ³¡ Á¡
var nVolume = 63;                // º¼·ý ÃÊ±â °ª
var nPrevVol;                    // º¼·ýÀÌ º¯°æµÇ±â ÀüÀÇ °ª
var bIsVolumeSet = false;        // º¼·ý¹Ù µå·¡±× ¿©ºÎ
var nZoomed = 0;                // ±âº»°ª 1 : ÁÜµÊ,   0 : Ãà¼ÒµÊ

function killErr(){return true;}

function setVolumeBar(){
  nPrevVol = event.clientX;
  nVolLeftPosition = sound.style.pixelLeft;

  bIsVolumeSet = true;
  document.onmousemove=drag_dropie;
  if (document.all){document.onmouseup=endVolume;}
}

function drag_dropie(){
  if (bIsVolumeSet==true){
    var mov = nVolLeftPosition+event.clientX-nPrevVol;
    if ((mov >= nVolStartPosition)  && (mov < nVolEndPosition)){
      cutpoint=nVolEndPosition-sound.style.pixelLeft;
      document.all.soundbg.style.pixelWidth=63-cutpoint;
      //document.all.sbg.width = 58-cutpoint;
      sound.style.pixelLeft=nVolLeftPosition+event.clientX-nPrevVol;
      mplayer.Volume = -2500*(cutpoint/63);
      nVolume=sound.style.pixelLeft
      nVolume1=document.all.sbg.width;
      mplayer.Mute=false;
    }
    return false;
  }
}

function endVolume(){
  bIsVolumeSet=false;
}

function ris(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '') return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  }
}

function cis(name, nsdoc, rpath, preload)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')  return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  }
}

function mutecheck(){
  if(document.all.mplayer.mute==0) document.all.mplayer.mute=1;
  else document.all.mplayer.mute=0;
}

function mresize(no)
{
  url=document.getElementById('mplayer').FileName;
  url='/pr/pop_mediafull.asp?url='+url;
  document.getElementById('mplayer').stop();
  window.open(url,'fwin','status=no,scrollbars=yes,menubar=no,resizable=no,fullscreen=yes');
}

function mzoom(){
  url=document.getElementById('mplayer').FileName;
  url='/pr/pop_media.asp?url='+url;
  document.getElementById('mplayer').stop();
  Win_pop(url,484,362);
}

/***************************************
* OBJECT ÆÄÀÏ ÆÐÄ¡ - IE PATCH(ÀÌ¿Ã¶ó½º ÆÐÄ¡)
***************************************/
var paramInfo = new Array;

function initParam()
{
  var oldSize = paramInfo.length;

  for (var i=0; i<oldSize; i++) {
    paramInfo.length--;
  }
}

function setParam(paramName, paramValue)
{
  var idx = paramInfo.length;

  paramInfo[idx] = [];
  paramInfo[idx][0] = paramName;
  paramInfo[idx][1]= paramValue;
}

//FLASH
function playFlash(objID, objSource, objWidth, objHeight, objStyle, cabVersion, embedAttr)
{
  document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');

  if (cabVersion != '') {
    document.write('codebase="' + self.window.document.protocol + '"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + cabVersion + '" ');
  }
  document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');

  for (var i=0; i<paramInfo.length; i++) {
    document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');
  }

  document.write('<embed src="' + objSource + '" width="' + objWidth + '" height="' + objHeight + '" ' + embedAttr + '>');
  document.write('</OBJECT>');
}

//MOVIE
function playMedia(objID, objSource, objWidth, objHeight, objStyle)
{
  document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ');
  document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');

  for (var i=0; i<paramInfo.length; i++) {
    document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');
  }
  document.write('<embed src="' + objSource + '" width="' + objWidth + '" height="' + objHeight + '" ' + objStyle + '>');
  document.write('</OBJECT>');
}

function playMovie(objID, objSource, objWidth, objHeight, objStyle)
{
  document.write('<embed src="' + objSource + '" width=' + objWidth + ' height=' + objHeight + ' id=' + objID + ' type="application/x-mplayer2" ' + objStyle + '></embed>');
}

/***** Simple Flash View *****************************************************************************************/

function fFlash(argSRC,argWIDTH,argHEIGHT,argID,argName,argWMODE)
{
var strTEMP;
strTEMP ='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ' ;
if(argID)
   strTEMP = strTEMP + ' ID="' + argID + '" ' ;

strTEMP = strTEMP + ' width="'+ argWIDTH + '" height="' + argHEIGHT + '">';
strTEMP = strTEMP + '<param name="movie" value="' + argSRC + '">';
strTEMP = strTEMP + '<param name="quality" value="high">';
strTEMP = strTEMP + '<param name="memu" value="false">';


if(argWMODE)
   strTEMP = strTEMP + '<param name="wmode" value="' + argWMODE + '">';
else
   strTEMP = strTEMP + '<param name="wmode" value="transparent">';



strTEMP = strTEMP + '<embed src="' + argSRC + '" ';
if(argID)
 strTEMP = strTEMP + ' ID="' + argID + '" ' ;

strTEMP = strTEMP + ' width="' + argWIDTH + '" height="'+ argHEIGHT + '" quality="high" menu=false pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ';
strTEMP = strTEMP + ' name="' + argName + '" ';
if(argWMODE)
   strTEMP = strTEMP + 'wmode="' + argWMODE + '"';
else
   strTEMP = strTEMP + 'wmode="transparent"';

strTEMP = strTEMP + '></embed></object>';

document.write(strTEMP);
//alert(strTEMP)
}



/*********************************************************************************************************************
 ÀÌ¹ÌÁö ¸®»çÀÌÂ¡
*********************************************************************************************************************/
function adjustImageWidth(target_img, maxWidth, maxHeight)
{
  var newHeight, newWidth;
  var newImg;

  newImg = new Image();
  newImg.src = target_img.src;
  imgw = newImg.width;
  imgh = newImg.height;

  if (imgw > maxWidth)
  {
    newWidth = maxWidth;
    newHeight = imgh;

    newWidth = Math.min(newWidth, Math.round((imgw*newHeight)/imgh));
    newHeight = Math.min(Math.round((imgh*newWidth)/imgw), newHeight);
  }
  else
  {
    newWidth = imgw;
    newHeight = imgh;
  }

  target_img.onload = null;
  target_img.src = newImg.src;
  target_img.width = newWidth;
  target_img.height = newHeight;

  if(!isNaN(maxHeight))
  {
    adjustImageHeight(target_img, maxHeight)
  }
}

function adjustImageHeight(target_img, maxHeight)
{
  var newHeight, newWidth;
  var newImg;

  newImg = new Image();
  newImg.src = target_img.src;
  imgh = newImg.height;

  if (imgh > maxHeight)
  {
    newHeight = maxHeight;
  }

  target_img.height = newHeight;
}


/*********************************************************************************************************************
 Attach File È®ÀåÀÚ Ã¼Å© fileName -> ÆÄÀÏÀüÃ¼°æ·Î, acExt -> Çã¿ëÇÒ È®ÀåÀÚ(¼Ò¹®ÀÚ¿¡ ÄÞ¸¶·Î ±¸ºÐ ex:jpg,gif)
*********************************************************************************************************************/
function GetFileName(fileName)
{
  strFileName = fileName.substr(fileName.lastIndexOf("\\")+1);

  return strFileName;
}

function ExtCheck(fileName,acExt)
{
  strFileName = fileName.substr(fileName.lastIndexOf("\\")+1);
  strExtName  = strFileName.substr(strFileName.lastIndexOf(".")+1).toLowerCase();

  if(acExt.indexOf(strExtName)<0)
  {
    return false;
  }
  return true;
}

/*********************************************************************************************************************
 Ajax Function
*********************************************************************************************************************/
function getHttprequest(url)
{
  var xmlhttp = null;

  if(window.XMLHttpRequest)
  {
    xmlhttp = new XMLHttpRequest();
  }
  else
  {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  }

  xmlhttp.open('GET', url, false);
  xmlhttp.onreadystatechange = function() {
                                            if(xmlhttp.readyState==4 && xmlhttp.status == 200 && xmlhttp.statusText=='OK')
                                            {
                                              responseText = xmlhttp.responseText;
                                            }
                                          }
  xmlhttp.send('');
  return responseText = xmlhttp.responseText;
}


/*********************************************************************************************************************
 SelecBox¿ë ³¯Â¥ ÀÚµ¿ »ý¼ºÇÔ¼ö
*********************************************************************************************************************/
function changeDay(objMonth, objDay, objYear, selValue)
{
  month = eval(objMonth.options[objMonth.selectedIndex].value);
  year = eval(objYear.options[objYear.selectedIndex].value);

  if(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12)
  {
    endDay = 31;
  }
  else if(month == 4 || month == 6 || month == 9 || month == 11)
  {
    endDay = 30;
  }
  else
  {
    if((year%4)==0)
    {
      endDay = 29;
    }
    else
    {
      endDay = 28;
    }
  }

  try
  {
    day = eval(objDay.options[objDay.selectedIndex].value) - 1;
  }
  catch (e)
  {
    day = 0;
  }

  objDay.options.length = 0;

  for(i=1; i<=endDay; i++)
  {
    if(i<10)
    {
      j = "0" + i;
    }
    else
    {
      j = "" + i;
    }

    objDay.options[objDay.options.length] = new Option(j, j);
  }

  if(day >= endDay)
  {
    day = endDay-1;
  }

  objDay.selectedIndex = day;

  if(selValue.length > 9)
  {
    selectValues = selValue.split("-");

    for(i=0; i<objYear.options.length; i++)
    {
      if(objYear.options[i].value == selectValues[0])
      {
        objYear.options[i].selected = true;
        break;
      }
    }

    for(i=0; i<objMonth.options.length; i++)
    {
      if(objMonth.options[i].value == selectValues[1])
      {
        objMonth.options[i].selected = true;
        break;
      }
    }

    for(i=0; i<objDay.options.length; i++)
    {
      if(objDay.options[i].value == selectValues[2])
      {
        objDay.options[i].selected = true;
        break;
      }
    }
  }
}

function changeDaySelect(objMonth, objDay, objYear, selValue)
{
  selectValues = selValue.split("-");

  if(selectValues.length < 3)
  {
    month = objMonth.options[objMonth.selectedIndex].value;
    year  = objYear.options[objYear.selectedIndex].value;

    if(year=='')
    {
      objMonth.selectedIndex = 0;
      objDay.selectedIndex = 0;
      return;
    }

    if(month=='')
    {
      objDay.selectedIndex = 0;
      return;
    }
  }

  if(selectValues.length > 2)
  {
    selectValues = selValue.split("-");

    for(i=0; i<objYear.options.length; i++)
    {
      if(objYear.options[i].value == selectValues[0])
      {
        objYear.options[i].selected = true;
        break;
      }
    }

    for(i=0; i<objMonth.options.length; i++)
    {
      if(objMonth.options[i].value == selectValues[1])
      {
        objMonth.options[i].selected = true;
        break;
      }
    }
  }

  month = eval(month);
  year  = eval(year);

  if(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12)
  {
    endDay = 31;
  }
  else if(month == 4 || month == 6 || month == 9 || month == 11)
  {
    endDay = 30;
  }
  else
  {
    if((year%4)==0)
    {
      endDay = 29;
    }
    else
    {
      endDay = 28;
    }
  }

  try
  {
    day = eval(objDay.options[objDay.selectedIndex].value);
  }
  catch (e)
  {
    day = 0;
  }

  objDay.options.length = 0;
  objDay.options[0] = new Option('¼±ÅÃ', '');

  for(i=1; i<=endDay; i++)
  {
    if(i<10)
    {
      j = "0" + i;
    }
    else
    {
      j = "" + i;
    }

    objDay.options[objDay.options.length] = new Option(j, j);
  }

  if(day >= endDay)
  {
    day = endDay;
  }

  objDay.selectedIndex = day;

  if(selectValues.length > 2)
  {
    for(i=0; i<objDay.options.length; i++)
    {
      if(objDay.options[i].value == selectValues[2])
      {
        objDay.options[i].selected = true;
        break;
      }
    }
  }
}


function InitSelOption(obj, startInt, endInt, sel)
{
  obj.options.length = 0;

  for(i=startInt; i<=endInt; i++)
  {
    obj.options[obj.options.length] = new Option(i, i);
    
    if( obj.options[obj.options.length-1].value == sel )
    	obj.options[obj.options.length-1].selected = true;     //¼±ÅÃµÈ´Ù
  }
}


function InitYear(obj, startYear, endYear)
{
  obj.options.length = 0;

  for(i=startYear; i<=endYear; i++)
  {
    obj.options[obj.options.length] = new Option(i, i);
  }
}

function InitYearSelect(obj, startYear, endYear)
{
  obj.options.length = 0;

  obj.options[0] = new Option('¼±ÅÃ', '');
  for(i=startYear; i<=endYear; i++)
  {
    obj.options[obj.options.length] = new Option(i, i);
  }
}


//»õÃ¢¶ç¿ì±â
function displayImage(picName, windowName, windowWidth, windowHeight){
  var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + windowWidth + ",height=" + windowHeight)
  if(winHandle != null){
    var htmlString = "<html><head><title></title></head>"
    htmlString += "<body style='margin:0'>"
    htmlString += "<a href=javascript:window.close()><img src=" + picName + " border=0 alt=´Ý±â></a>"
    htmlString += "</body></html>"
    winHandle.document.open()
    winHandle.document.write(htmlString)
    winHandle.document.close()
  }
  if(winHandle != null) winHandle.focus()
  return winHandle
}

// ¾ÆÀÌÇÁ·¹ÀÓ ³ôÀÌ ¹®Á¦
function resizeFrame(iframeObj){
        var innerBody = iframeObj.contentWindow.document.body;
        oldEvent = innerBody.onclick;
        innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
        var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
        iframeObj.style.height = innerHeight;
        var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
        iframeObj.style.width = innerWidth;
        if( !arguments[1] )        /* Æ¯Á¤ ÀÌº¥Æ®·Î ÀÎÇÑ È£Ãâ½Ã ½ºÅ©·ÑÀ» ±×³É µÐ´Ù. */
                this.scrollTo(1,1);
}



// Æ÷Åä´º½º ½æ³×ÀÏ ¸®½ºÆ® over, out ½Ã Åõ¸íµµ Á¶Àý
function ThumbEffect(obj, mode, num) {
  obj.style.cursor = "pointer";

  if(mode == "over"){
    obj.style.MozOpacity = "0";
    obj.style.filter="Alpha(opacity=0)";

    /* ¼±ÅÃµÈ ÀÌ¹ÌÁö¿¡ Å×µÎ¸® ³Ö±â */
    var ThumbFrame = document.getElementById("ThumbFrame"+num);
    ThumbFrame.style.width = "60px";
    ThumbFrame.style.height = "45px";
    ThumbFrame.style.position = "absolute";
    ThumbFrame.style.top = 0;
    ThumbFrame.style.left = 0;
    ThumbFrame.style.background = "url('/Images/Wyverns/Media/ThumbFrame.gif')";
  } else {
    var ThumbFrame = document.getElementById("ThumbFrame"+num);
    if(document.getElementById("checkNum").value!=num)
    {
      ThumbFrame.style.background = "none";
    }

    try
    {
      if(document.getElementById("checkNum").value != num)
      {
        obj.style.MozOpacity = "0.7";
        obj.style.filter="Alpha(opacity=70)";
      }
    }
    catch (e)
    {
      obj.style.MozOpacity = "0.7";
      obj.style.filter="Alpha(opacity=70)";
    }
  }
}
//-->

// ¿ÍÀÌ¹ø½º È÷½ºÅä¸® ÅØ½ºÆ®·Î º¸±â
    function ShowData() {
        if(document.getElementById("data_1").style.display == "") {
            document.getElementById("data_1").style.display = "none";
        } else {
            document.getElementById("data_1").style.display = "";
        }

    }
//-->

// ¿ÍÀÌ¹ø½º °É ÀÌ¹ÌÁö
function showPic(whichpic) {
  if (!document.getElementById("placeholder")) return true;
  var source = whichpic.getAttribute("href");
  var placeholder = document.getElementById("placeholder");
  placeholder.setAttribute("src",source);
  if (!document.getElementById("description")) return false;
  if (whichpic.getAttribute("title")) {
    var text = whichpic.getAttribute("title");
  } else {
    var text = "";
  }
  var description = document.getElementById("description");
  if (description.firstChild.nodeType == 3) {
    description.firstChild.nodeValue = text;
  }
  return false;
}

function prepareGallery() {
  if (!document.getElementsByTagName) return false;
  if (!document.getElementById) return false;
  if (!document.getElementById("imagegallery")) return false;
  var gallery = document.getElementById("imagegallery");
  var links = gallery.getElementsByTagName("a");
  for ( var i=0; i < links.length; i++) {
    links[i].onclick = function() {
      return showPic(this);
	}
    links[i].onkeypress = links[i].onclick;
  }
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

/*¹ÚÅÂÈ¯ Ãß°¡ 090507 */


function menuclick(tabMenu){
    if(tabMenu=="PTH_TAB01"){
		PTH_TAB01.style.display = "";
		PTH_TAB02.style.display = "none";
	}
    if(tabMenu=="PTH_TAB02"){
       PTH_TAB01.style.display = "none";
	   PTH_TAB02.style.display = "";
	 }
}
 function gothere(){
	  var thebox=document.myForm;
	  //newwindow=window.open("")
	 // alert(thebox.select_1.value);
	// alert(document.getElementById("ifrm1").window.);
	  document.getElementById("ifrm1").src= thebox.select_1.value;
	}
	//ÄÞº¸ ¼±ÅÃ ½Ã ÆäÀÌÁö ÀÌµ¿-->



	function ent_check()
	{
	   if(event.keyCode==13) //¿£ÅÍÅ°¶ó¸é
	   {
		login();
	   }
	}
	
	function ent_check2()
	{
	   if(event.keyCode==13) //¿£ÅÍÅ°¶ó¸é
	   {
		   login2();
	   }
	}	
    function login(){
		var id=document.form.userId.value;
		var pwd=document.form.passwd.value;
		if(id==""){
			alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä. ");
			document.form.userId.focus();
			return;
		}
		if(pwd==""){
			alert("ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä. ");
			document.form.passwd.focus();
			return;
		}

		document.form1.userId.value = document.form.userId.value;
		document.form1.passwd.value = document.form.passwd.value;
		document.form1.submit();
    }


    function login2(){

    	var id=document.form2.userId.value;
		var pwd=document.form2.passwd.value;
		if(id==""){
			alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä. ");
			document.form2.userId.focus();
			return;
		}
		if(pwd==""){
			alert("ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä. ");
			document.form2.passwd.focus();
			return;
		}

		document.formTop.userId.value = document.form2.userId.value;
		document.formTop.passwd.value = document.form2.passwd.value;
		document.formTop.submit();
    }

	
	function goPage(type){
		if(type=="policy"){
			window.location.href="/Customer/policy.asp";
		}else if(type=="agreement"){
			window.location.href="/Customer/agreement.asp";
		}else if(type=="noEmail"){
			window.location.href="/Customer/NoEmail.asp";
		}
	}
	
	// ÇÏ´Ü Footer ÆäÀÌÁö ÀÌµ¿
	function goFamilyPage(type){
		if(type=="msafer"){
			window.open("http://www.msafer.or.kr/index_new.jsp", '', '');
		}else if(type=="sktelecom"){
			window.open("http://www.sktelecom.com", '', '');
		}else if(type=="tworld"){
			window.open("http://www.tworld.co.kr", '', '');
		}else if(type=="nate"){
			window.open("http://www.nate.com", '', '');
		}else if(type=="momu"){
			window.open("http://www.momu.co.kr", '', '');
		}else if(type=="melon"){
			window.open("http://www.melon.com", '', '');
		}else if(type=="cizle"){
			window.open("http://cizle.nate.com", '', '');
		}else if(type=="gxg"){
			window.open("http://www.gxg.com", '', '');
		}else if(type=="moneta"){
			window.open("http://www.moneta.co.kr", '', '');
		}
	}

	// ·Î±×¾Æ¿ô
	function mLogOut()
	{
	  top.location.href = "/Members/Logout.asp";
	}

	// ·Î±×ÀÎ
	function mLogIn()
	{
	  top.location.href = "/Members/login.asp";
	}



// ÄíÅ°¸¦ ÀÐ¾î¼­ Á¸Àç ¿©ºÎ ¸®ÅÏ
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 "";
  }



/**
*
*  Base64 encode / decode
*  ID ÄíÅ° ¾ÏÈ£È­
*
**/
 
var Base64 = {
 
	// private property
	_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
 
	// public method for encoding
	encode : function (input) {
		var output = "";
		var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
		var i = 0;
 
		input = Base64._utf8_encode(input);
 
		while (i < input.length) {
 
			chr1 = input.charCodeAt(i++);
			chr2 = input.charCodeAt(i++);
			chr3 = input.charCodeAt(i++);
 
			enc1 = chr1 >> 2;
			enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
			enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
			enc4 = chr3 & 63;
 
			if (isNaN(chr2)) {
				enc3 = enc4 = 64;
			} else if (isNaN(chr3)) {
				enc4 = 64;
			}
 
			output = output +
			this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
			this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
 
		}
 
		return output;
	},
 
	// public method for decoding
	decode : function (input) {
		var output = "";
		var chr1, chr2, chr3;
		var enc1, enc2, enc3, enc4;
		var i = 0;
 
		input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
 
		while (i < input.length) {
 
			enc1 = this._keyStr.indexOf(input.charAt(i++));
			enc2 = this._keyStr.indexOf(input.charAt(i++));
			enc3 = this._keyStr.indexOf(input.charAt(i++));
			enc4 = this._keyStr.indexOf(input.charAt(i++));
 
			chr1 = (enc1 << 2) | (enc2 >> 4);
			chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
			chr3 = ((enc3 & 3) << 6) | enc4;
 
			output = output + String.fromCharCode(chr1);
 
			if (enc3 != 64) {
				output = output + String.fromCharCode(chr2);
			}
			if (enc4 != 64) {
				output = output + String.fromCharCode(chr3);
			}
 
		}
 
		output = Base64._utf8_decode(output);
 
		return output;
 
	},
 
	// private method for UTF-8 encoding
	_utf8_encode : function (string) {
		string = string.replace(/\r\n/g,"\n");
		var utftext = "";
 
		for (var n = 0; n < string.length; n++) {
 
			var c = string.charCodeAt(n);
 
			if (c < 128) {
				utftext += String.fromCharCode(c);
			}
			else if((c > 127) && (c < 2048)) {
				utftext += String.fromCharCode((c >> 6) | 192);
				utftext += String.fromCharCode((c & 63) | 128);
			}
			else {
				utftext += String.fromCharCode((c >> 12) | 224);
				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
				utftext += String.fromCharCode((c & 63) | 128);
			}
 
		}
 
		return utftext;
	},
 
	// private method for UTF-8 decoding
	_utf8_decode : function (utftext) {
		var string = "";
		var i = 0;
		var c = c1 = c2 = 0;
 
		while ( i < utftext.length ) {
 
			c = utftext.charCodeAt(i);
 
			if (c < 128) {
				string += String.fromCharCode(c);
				i++;
			}
			else if((c > 191) && (c < 224)) {
				c2 = utftext.charCodeAt(i+1);
				string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
				i += 2;
			}
			else {
				c2 = utftext.charCodeAt(i+1);
				c3 = utftext.charCodeAt(i+2);
				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
				i += 3;
			}
 
		}
 
		return string;
	}
}

// ¾ÆÀÌµð ±â¾ï Äí±â ½ºÅ©¸³Æ® ½ÃÀÛ
	function setCookie (name, value, expires) {
	 value= Base64.encode(value)
	  document.cookie = name + "=" + escape (value) +
		"; path=/; expires=" + expires.toGMTString();
	}

	function getCookie(Name) {
	  var search = Name + "="
	  if (document.cookie.length > 0) { // ÄíÅ°°¡ ¼³Á¤µÇ¾î ÀÖ´Ù¸é
		offset = document.cookie.indexOf(search)
		if (offset != -1) { // ÄíÅ°°¡ Á¸ÀçÇÏ¸é
		  offset += search.length
		  // set index of beginning of value
		  end = document.cookie.indexOf(";", offset)
		  // ÄíÅ° °ªÀÇ ¸¶Áö¸· À§Ä¡ ÀÎµ¦½º ¹øÈ£ ¼³Á¤
		  if (end == -1)
			end = document.cookie.length
		  return Base64.decode(unescape(document.cookie.substring(offset, end)))
		}
	  }
	  return "";
	}
	function saveid(form) {
	  var expdate = new Date();
	  // ±âº»ÀûÀ¸·Î 30ÀÏµ¿¾È ±â¾ïÇÏ°Ô ÇÔ. ÀÏ¼ö¸¦ Á¶ÀýÇÏ·Á¸é * 30¿¡¼­ ¼ýÀÚ¸¦ Á¶ÀýÇÏ¸é µÊ
	  if (form.checksaveid.checked)
		expdate.setTime(expdate.getTime() + 1000 * 3600 * 24 * 30); // 30ÀÏ
	  else
		expdate.setTime(expdate.getTime() - 1); // ÄíÅ° »èÁ¦Á¶°Ç

	  setCookie("saveid",form.userId.value,expdate);
	}

	function getid(form) {
	  form.checksaveid.checked =((form.userId.value = getCookie("saveid")) != "");
	}



	// »óÀ§·Î °¡±â
	function goTop() {
	  top.location.href = "#top";
	}
	
	function knightsProduct()
	{
		alert("»óÇ° ÁØºñÁßÀÔ´Ï´Ù.");
	}

	//ÀÌ¹ÌÁö Âî±×·¯Áü Çö»ó Ã³¸®
	function loadIMG(val1,val2){
		var imgO = new Image();
		imgO.src = val2;
		if (imgO.width > imgO.height){
			document.getElementById("P_"+val1).className = "photo_bg_h";
		} else {
			document.getElementById("P_"+val1).className = "photo_bg";
		}
	}

 //-->
