//  ºñµ¿±â½Ä ÆÄÀÏºÒ·¯¿À±â ½ÃÀÛ
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;
   }
//  ºñµ¿±â½Ä ÆÄÀÏºÒ·¯¿À±â ³¡	

// ¸¶¿ì½º¿À¹ö ½ÃÀÛ
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.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_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 AddClipboard(value) {
window.clipboardData.setData('Text',value);
alert(value + '°¡(ÀÌ) º¹»çµÇ¾ú½À´Ï´Ù.');
}
// Å¬¸³º¸µå¿¡ º¹»çÇÏ±â ³¡



// ÇÃ¸®Ä¿ Çö»ó ¸·±â ½ÃÀÛ
try {
	document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}
// ÇÃ¸®Ä¿ Çö»ó ¸·±â ³¡



// »õÃ¢ °ü·Ã ½ÃÀÛ
function Open_Window(Filename,w_name,w_size,h_size,scroll_on)
{
window.open(Filename,w_name,'toolbar=no,status=no,width='+w_size+',height='+h_size+',directories=no,scrollbars='+scroll_on+',location=no,resize=no,menubar=no');
}

function PopUp(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// »õÃ¢ °ü·Ã ³¡



// »õÃ¢´Ý°í¹Ù·Î°¡±â
function closeWindow(mainLink)
{
opener.location.href=mainLink;
window.close();
}



function image_open(url, winName, width, height, ckScroll, ckTool)
{
	var window_top = 50;
	var window_left =  50;
	if(!ckTool){ckTool='no';}
	window.open(url,winName,'width='+ width +',height=' + height + ',scrollbars=' + ckScroll + ',toolbar=' + ckTool + ',top=' + window_top + ',left=' + window_left + '');
}



//isEmpty(°ø¹é°Ë»çÇÔ¼ö)
function isEmpty( data )
{
   for ( var i = 0 ; i < data.length ; i++ )
   {
      if ( data.substring( i, i+1 ) != " " )
         return false;
   }
   return true;
}



//ÇÑ±ÛÀÔ·ÂÈ®ÀÎÇÏ±â
function CheckHangul(name) {
    strarr = new Array(name.value.length);
    schar = new Array('/','.','>','<',',','?','}','{',' ','\\','|','(',')','+','=');

    for (i=0; i<name.value.length; i++)
    {
        for (j=0; j<schar.length; j++)
        {
            if (schar[j] ==name.value.charAt(i))
            {
                //alert(escape(name.value.charAt(i)) );
                alert("ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
                name.focus();
                return false;
            }
            else
                continue;
        }

        strarr[i] = name.value.charAt(i)
        if ((strarr[i] >=0) && (strarr[i] <=9))
		{
            alert("ÀÌ¸§¿¡ ¼ýÀÚ°¡ ÀÖ½À´Ï´Ù. ÀÌ¸§Àº ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
			name.focus();
            return false;
		}
        else if ((strarr[i] >='a') && (strarr[i] <='z'))
		{
            alert("ÀÌ¸§¿¡ ¾ËÆÄºªÀÌ ÀÖ½À´Ï´Ù. ÀÌ¸§Àº ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
			name.focus();
            return false;
		}
        else if ((strarr[i] >='A') && (strarr[i] <='Z'))
		{
            alert("ÀÌ¸§¿¡ ¾ËÆÄºªÀÌ ÀÖ½À´Ï´Ù. ÀÌ¸§Àº ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
			name.focus();
            return false;
		}
        else if ((escape(strarr[i]) > '%60') && (escape(strarr[i]) <'%80') )
		{
            alert("ÀÌ¸§¿¡ Æ¯¼ö¹®ÀÚ°¡ ÀÖ½À´Ï´Ù. ÀÌ¸§Àº ÇÑ±ÛÀÔ·Â¸¸ °¡´ÉÇÕ´Ï´Ù.");
			name.focus();
            return false;
		}
        else
        {
        //      alert(escape(strarr[i]) );
				continue;
        }

    }
        return true;
}




//ÀÔ·Â±æÀÌ Ã¼Å©ÇÔ¼ö(¹ÙÀÌÆ®ºñ±³)
function CheckLen(textname,bytesname){
	var t;
	var msglen;
	msglen=0; 
	l=textname.value.length; 
	for(k=0;k<l;k++){
		t=textname.value.charAt(k);
		if(escape(t).length>4) msglen+=2; 
		else msglen++;
	} 
	bytesname.value=msglen; 
}

//ÀÔ·Â±æÀÌÃ¼Å©ÇÏ±â ÇÔ¼ö(´Ü¼øºñ±³)
function CheckLen1(name,minlen,maxlen) {
        if (name.value.length < minlen)
        {
            // alert("ÀÔ·ÂµÈ °ªÀÇ ±æÀÌ°¡ Âª½À´Ï´Ù!");
            name.focus();
            return false;
        }
        else if (name.value.length > maxlen)
        {
            // alert("ÀÔ·ÂµÈ °ªÀÇ ±æÀÌ°¡ ³Ê¹« ±é´Ï´Ù!");
            name.focus();
            return false;
        }
        else
            return true;
}


// Æ¯¼ö¹®ÀÚ Ã¼Å©
function Check_nonChar(id_text)
{
	var nonchar = '~`!@#$%^&*()-_=+\|<>?,./;:"';
	var numeric = '1234567890';
	var nonkorean = nonchar+numeric; 
	
	var i ; 
	for ( i=0; i < id_text.length; i++ )  {
		if( nonkorean.indexOf(id_text.substring(i,i+1)) > 0) {
			break ; 
		}
	}
	
	if ( i != id_text.length ) {
		return false ; 
	}
	else{
		return true ;
	} 
	
	return false;
}


// ¼ýÀÚ °Ë»ç ½ÃÀÛ 
function IsNumber(formname) {
	var theform = eval("document.theform." + formname);
	for(var i = 0; i < theform.value.length; i++) {
		var chr = theform.value.substr(i,1);
		if(chr < '0' || chr > '9') {            
			return false;
		}
	}
	return true;   
}
// ¼ýÀÚ °Ë»ç ³¡	

		
// Æ®¸² ½ÃÀÛ 
function TrimString(SrcString)
{

   /* ¿ÞÂÊ Æ®¸²   */
   len = SrcString.length;
   for(i=0;i<len;i++)
   {
      if(SrcString.substring(0,1) == " ")
      {
         SrcString = SrcString.substring(1);
      }
      else
      {
         break;
      }
   }

   /* ¿À¸¥ÂÊ Æ®¸²   */
   len = SrcString.length;
   for(i=len;i>0;i--)
   {
      if(SrcString.substring(i-1) == " ")
      {
         SrcString = SrcString.substring(0,i-1);
      }
      else
      {
         break;
      }
   }

   return SrcString;
}
// Æ®¸² ³¡




// ¼ýÀÚÅ°¸¸ ÀÔ·Â //
function NumObj(obj){
	if (event.keyCode >= 48 && event.keyCode <= 57) { //¼ýÀÚÅ°¸¸ ÀÔ·Â
		return true;
	} else {
		event.returnValue = false;
	}
}

// ¼ýÀÚÅ° & "-" ¸¸ ÀÔ·Â (ÀüÈ­¹øÈ£µî)//
function DNumObj(obj){
	if ( event.keyCode == 45 || (event.keyCode >= 48 && event.keyCode <= 57)) { //¼ýÀÚÅ°¸¸ ÀÔ·Â
		return true;
	} else {
		event.returnValue = false;
	}
}



// ÄÞ¸¶ ½ÃÀÛ
function Comma_in(itvalue)
{	
	//confirm(itvalue); // test
	
	var Rz = '';
	var Rs = '';
	var Rc = 0;
	itvalue = parseInt(itvalue);
	var Rh = (itvalue < 0) ? 1 : 0;itvalue += '';
	var Orglength = itvalue.length;
	for(i = Orglength; i >= 0 ; i--)
	{
		Rz = itvalue.charAt(i);
		Rs = Rz + Rs;
		if(Rc % 3 == 0 && i > Rh && i < Orglength)
		{
			Rs = ',' + Rs;
		}
		Rc++;
	}
	return (Rs);
}
// ÄÞ¸¶ ³¡
	
	

// input tag ÀÌµ¿ ½ÃÀÛ
function movenext(obj1,obj2,length){
	if (obj1.value.length == length) obj2.focus();
}
// input tag ÀÌµ¿ ³¡






// ÀÌ¹ÌÁöÆÄÀÏÇü½Ä Ã¼Å© ½ÃÀÛ 
extArray = new Array(".gif", ".jpg", ".png", ".bmp");
function LimitAttach(f_name,f_field,file) {
	
	var form = eval("document." + f_name +"." + f_field);

	allowSubmit = false;
	if (!file) return;
	while (file.indexOf("\\") != -1)
	file = file.slice(file.indexOf("\\") + 1);
	ext = file.slice(file.indexOf(".")).toLowerCase();
	for (var i = 0; i < extArray.length; i++) {
	if (extArray[i] == ext) { allowSubmit = true; break; }
	}
	if (allowSubmit) { 
		return true;
	} else {
		return false;
	}
}
// ÀÌ¹ÌÁöÆÄÀÏÇü½Ä Ã¼Å© ³¡


// ÀÔ·Âµ¥ÀÌÅÍÇü½Ä È¹ÀÎ //

//spec
var NUM = "0123456789";
var Si2801 = "abcdefghijklmnopqrstuvwxyz";
var i2801 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+Si2801;	
var UNDER="-";

function TypeCheck (s, spc) {
		var i;

		for(i=0; i< s.length; i++) {
			if (spc.indexOf(s.substring(i, i+1)) < 0) {
				return false;
			}
		}        
		return true;
}



// Link Sign //
function bluring(){
 if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;







function toggle_sub (obj , ac ) {
obj = eval (obj)
if ( ac == 'show' ) {
obj.style.display = '';
}
else {
obj.style.display = 'none';
}
}




/***********************************************************************
* ½ºÅ©·Ñ¸µ ½ÃÀÛ
***********************************************************************/

	self.onError=null;
	currentX = currentY = 0;  
	whichIt = null;           
	lastScrollX = 0; lastScrollY = 0;
	NS = (document.layers) ? 1 : 0;
	IE = (document.all) ? 1: 0;
	// STALKER CODE -->
	function heartBeat() {
        if (document.body==null)return;
		if(document.all.floater==null)return;
		if(IE) {
			  diffY = document.body.scrollTop; 
 			  diffX = 0; 
		       }
	    if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
		if(diffY != lastScrollY) {
	                percent = .1 * (diffY - lastScrollY);
	                if(percent > 0) percent = Math.ceil(percent);
	                else percent = Math.floor(percent);
			if(IE) document.all.floater.style.pixelTop += percent;
			if(NS) document.floater.top += percent; 
	                lastScrollY = lastScrollY + percent;
	    }
		if(diffX != lastScrollX) {
			percent = .1 * (diffX - lastScrollX);
			if(percent > 0) percent = Math.ceil(percent);
			else percent = Math.floor(percent);
			if(IE) document.all.floater.style.pixelLeft += percent;
			if(NS) document.floater.top += percent;
			lastScrollY = lastScrollY + percent;
		}	
	}	
	if(NS || IE) action = window.setInterval("heartBeat()",1);


/***********************************************************************
* ½ºÅ©·Ñ¸µ ³¡
***********************************************************************/









/***********************************************************************
* ½ºÅ©·Ñ¸µ2 ½ÃÀÛ
***********************************************************************/

	self.onError=null;
	currentX2 = currentY2 = 0;  
	whichIt2 = null;           
	lastScrollX2 = 0; lastScrollY2 = 0;
	NS = (document.layers) ? 1 : 0;
	IE = (document.all) ? 1: 0;
	// STALKER CODE -->
	function heartBeat2() {
        if (document.body==null)return;
		if(document.all.floater2==null)return;
		if(IE) {
			  diffY2 = document.body.scrollTop; 
 			  diffX2 = 0; 
		       }
	    if(NS) { diffY2 = self.pageYOffset; diffX2 = self.pageXOffset; }
		if(diffY2 != lastScrollY2) {
	                percent2 = .1 * (diffY2 - lastScrollY2);
	                if(percent2 > 0) percent2 = Math.ceil(percent2);
	                else percent2 = Math.floor(percent2);
			if(IE) document.all.floater2.style.pixelTop += percent2;
			if(NS) document.floater2.top += percent2; 
	                lastScrollY2 = lastScrollY2 + percent2;
	    }
		if(diffX2 != lastScrollX2) {
			percent2 = .1 * (diffX2 - lastScrollX2);
			if(percent2 > 0) percent2 = Math.ceil(percent2);
			else percent2 = Math.floor(percent2);
			if(IE) document.all.floater2.style.pixelLeft += percent2;
			if(NS) document.floater2.top += percent2;
			lastScrollY2 = lastScrollY2 + percent2;
		}	
	}	
	if(NS || IE) action = window.setInterval("heartBeat2()",1);


/***********************************************************************
* ½ºÅ©·Ñ¸µ2 ³¡
***********************************************************************/







// ¾ÆÀÌÇÁ·¹ÀÓ ¸®»çÀÌÁî ½ÃÀÛ 

//  var ifr= parent.document.all? parent.document.all.iframeBody : parent.document.getElementById("iframeBody") ; 

  function do_resize() { 
  resizeFrame(1); 
  } 

 //°¡·Î±æÀÌ´Â À¯µ¿ÀûÀÎ °æ¿ì°¡ µå¹°±â ¶§¹®¿¡ ÁÖ¼®Ã³¸®! 
 function resizeFrame(re) { 
  if (ifr) { 
  var innerHeight = document.body.scrollHeight + (document.body.offsetHeight - document.body.clientHeight); 
//var innerWidth = document.body.scrollWidth + (document.body.offsetWidth - document.body.clientWidth); 

  if (ifr.style.height != innerHeight) //ÁÖ¼®Á¦°Å½Ã ´ÙÀ½ ±¸¹®À¸·Î ±³Ã¼ -> if (ifr.style.height != innerHeight || ifr.style.width != innerWidth) 
  { 
    ifr.style.height = innerHeight; 
    //ifr.style.width = innerWidth; 
  } 
  if(!re) { 
    try{ 
    document.body.attachEvent('onclick',do_resize); 
    //document.body.attachEvent('onkeyup',do_resize); 
    //±ÛÀÛ¼º »óÈ²¿¡¼­ Å¬¸¯¾øÀÌ Å¸ÀÌÇÎÇÏ¸é¼­ Ã¢ÀÌ ´Ã¾î³ª´Â »óÈ²ÀÌ¸é À­ÁÙ ÁÖ¼®Á¦°Å 
    } catch(e) { 
    document.body.addEventListener("click", do_resize, false); 
    //document.body.addEventListener("keyup", do_resize, false); 
    //±ÛÀÛ¼º »óÈ²¿¡¼­ Å¬¸¯¾øÀÌ Å¸ÀÌÇÎÇÏ¸é¼­ Ã¢ÀÌ ´Ã¾î³ª´Â »óÈ²ÀÌ¸é À­ÁÙ ÁÖ¼®Á¦°Å 
    } 
  } 
  } 
 } 

// ¾ÆÀÌÇÁ·¹ÀÓ ¸®»çÀÌÁî ³¡ 












// ÇÃ·¡½¬ Å×±× ÇÔ¼ö ½ÃÀÛ

function getObj_Activex(id) {
  document.write(document.getElementById(id).value);
}


function FlashScript(fname,fwidth,fheight,fid,pType)
{
	var returnMsg;
	returnMsg = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+fwidth+'" height="'+fheight+'">';
	returnMsg = returnMsg + '<param name="movie" value="'+fname+'">';
	returnMsg = returnMsg + '<param name="swLiveConnect" value="true">';
	returnMsg = returnMsg + '<param name="quality" value="high">';
	returnMsg = returnMsg + '<param name="menu" value="false">';
	returnMsg = returnMsg + '<param name="wmode" value="transparent">';
	returnMsg = returnMsg + '<embed src="'+fname+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+fwidth+'" height="'+fheight+'"></embed>';
	returnMsg = returnMsg + '</object>';

	if(pType == 0)
	{
		document.write(returnMsg); 
	}
	else
	{
		return returnMsg; 
	}	
}

    
// ÇÃ·¡½¬ Å×±× ÇÔ¼ö ³¡  






// »çÀÌÆ® ¹Ù·Î°¡±â
function goFSite(URLs)
{
	if(URLs != "")
	{
		window.open (URLs, "", "");
	}
}		

function go(url) {
	document.location.href=url;
}

// Æ®¸®±¸Á¶ ¸Þ´º ½ÃÀÛ
var GBCpath="";
function HiliteBold(keyword,groupid)
{
	var innerRng='oBold';
	var outerRng='oBoldOuter';
	var innerRng,outerRng;
	var str = keyword;
	array_str = str.split("  ");

//	ename=eval(name);


	var rng = document.body.createTextRange();
	var rng2 = document.body.createTextRange();
	for (i=0;i<array_str.length;i++) {
		rng.moveToElementText(document.all(innerRng));
		rng2.moveToElementText(document.all(outerRng));
		if (array_str[i] != "")
		{
			while (rng.findText(array_str[i]) && rng2.inRange(rng) != false)
			{
				rng.pasteHTML("<span class='u_dot bl bold'>" + array_str[i] + "</span>");
				if (groupid) StartTreeOn(groupid);

			}
		}
	}
}

function reSize(name,keyword,groupid,cpath) {
	ename=eval(name);
	GBCpath=cpath;
	if(keyword) HiliteBold(name,keyword,groupid,name);
	var ParentFrame=ename.document.body;
	var ContentFrame=document.all[name];
	ContentFrame.style.height = ParentFrame.scrollHeight + (ParentFrame.offsetHeight - ParentFrame.clientHeight);
	ContentFrame.style.width = ParentFrame.scrollWidth + (ParentFrame.offsetWidth - ParentFrame.clientWidth);
}

var start=0;
function StartTreeOn(groupid) {
	start++;
	id2=eval("p_"+groupid);
	if(start==1) {
		var xid=document.getElementById(groupid).style;
		if(groupid && xid.display=='none') {
			xid.display='';
			GJ_SetCookie (groupid,'1',1,GBCpath);
			var url=location.href;
			var no=new String("02");
			if (url.indexOf("/nhn/")>0){no="01";}
			if(url.indexOf("/naver/")>0){no="02";}
			if(url.indexOf("/jrnaver/")>0){no="03";}
			if(url.indexOf("/hangame/")>0){no="04";}
			if(url.indexOf("/entoi/")>0){no="05";}
			id2.src="/image/common/ico_minus"+no+".gif";
		}
	}
}

function AutoTreeSwitch(id,path,no) {
	all_table_div = document.getElementsByTagName("table");
	all_img_div = document.getElementsByTagName("img");

	for (i=0;i<all_table_div.length;i++) {
		if(all_table_div[i].id) {
			all_table_div[i].style.display='none';
			id2=eval("p_"+all_table_div[i].id);
			id2.src="/image/common/ico_plus"+no+".gif";
		}
	}
	tid=document.getElementById(id).style;
	id2=eval("p_"+id);
	if (tid.display==''){
		tid.display='none';
//		GJ_SetCookie (id,'0',1,path);
		id2.src="/image/common/ico_plus"+no+".gif";
	}else{
		tid.display='';
//		GJ_SetCookie (id,'1',1,path);
		id2.src="/image/common/ico_minus"+no+".gif";
	}

}

function AutoTree(id,no) {
//	tid=document.getElementById(id).style
//	id2=eval("p_"+id);
//	if (GJ_GetCookie(id)==1) {
//		tid.display='';
//		id2.src="/image/common/ico_minus"+no+".gif";
//	}
}

function ALLTreeOpenANDClose(it,path,no) {
	all_table_div = document.getElementsByTagName("table");

	if (GJ_GetCookie(it+"_iz")==0) {
		for (i=0;i<all_table_div.length;i++) {
			if (all_table_div[i].id.indexOf(it)==0) {
				all_table_div[i].style.display='';
				id2=eval("p_"+all_table_div[i].id);

				GJ_SetCookie (all_table_div[i].id,'1',1,path);
				id2.src="/image/common/ico_minus"+no+".gif";
			}
		}
		GJ_SetCookie (it+"_iz",'1',1,path);
	}else{
		for (i=0;i<all_table_div.length;i++) {
			if (all_table_div[i].id.indexOf(it)==0) {
				all_table_div[i].style.display='none';
				id2=eval("p_"+all_table_div[i].id);
				GJ_SetCookie (all_table_div[i].id,'0',1,path);
				id2.src="/image/common/ico_plus"+no+".gif";
			}
		}
		GJ_SetCookie (it+"_iz",'0',1,path);
	}
}


/* --------------------------------
	ÄíÅ° ÀúÀå
-------------------------------- */
function GJ_SetCookie(name, value, expiredays,path) { 
	var todayDate = new Date(); 
	todayDate.setDate(todayDate.getDate() + expiredays); 
	document.cookie = name + "=" + escape(value) + "; path="+path+"; expires=" + todayDate.toGMTString() + ";" 
} 


// Æ®¸®±¸Á¶ ¸Þ´º ³¡  





// ÄíÅ°ÀúÀå2 ½ÃÀÛ
function usercookie(name,value,expire,domain,secure)   { 
  str = ''; 
  str +=  name + "=" + value; 
  str += ( (expire) ? "; expires=" + makeGMT(expire) : "") ; 
  str += ( (domain) ? "; domain=" + domain : "") ; 
  str += ( (secure) ? "; secure" : ""); 
  document.cookie = str; 
//  alert("ÄíÅ° ¼³Á¤µÇ´Â ¹®ÀÚ¿­ : " + str); 
  } 

function makeGMT(stay_time)   { 
   _time = new Date(); 
   _time.setTime(_time.getTime() + 60 * 60 * 1000 * stay_time); 
   return _time.toGMTString(); 
   } 
   



function get_str(wan_str)   { 
   var cs = document.cookie; 
   var prefix = wan_str + "=";       
   var cSI = cs.indexOf(prefix);     
   if (cSI == -1) { 
         return null; 
         } 
   else   { 
      var cEI = cs.indexOf(";", cSI + prefix.length);       
      if (cEI == -1)   ret_str =  cs.slice(cSI + prefix.length, cs.length); 
      else          ret_str = cs.slice(cSI + prefix.length, cEI);   
      } 
           return ret_str;     
  } 
  
// ÄíÅ°ÀúÀå2 ³¡





// PNG »ç¿ë ½ÃÀÛ 
function setPng24(obj) { 
    obj.width=obj.height=1; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = 
    "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 
// PNG »ç¿ë ³¡




// °­Á¦ Á¾·á ½Ã ¾È³»Ã¢ ¿­±â ½ÃÀÛ 
function act_pop(FileName){
	window.open('/member/logout_pop.asp','page_close','width=1,height=1,statusbar=no,scrollbars=no,toolbar=no,channelmode=no');
}

function ExitePage(){
	
	var iX = window.document.body.offsetWidth - window.event.clientX ;
	var iY = window.event.clientY ;
	
	if (iX <=30 && iY < 0 )
	{
	act_pop();
	}
}

function ExitePage2(){
	if (self.screenTop > 9000) {
	//	alert('´ÝÈû'+document.readyState+self.screenTop);
	} else {
		if(document.readyState == "complete") {
	//		alert('»õ·Î°íÄ§'+document.readyState+self.screenTop);
		} else if(document.readyState == "loading") {
			act_pop();
		}
	}
}
// °­Á¦ Á¾·á ½Ã ¾È³»Ã¢ ¿­±â ³¡







// ¼ûÀº ¸Þ´º ½ÃÀÛ
	function hide_table(name,line)
	{
		submenu=eval(name+".style");
        if(line=='on'){ submenu.display='block'; }
        else{ submenu.display='none'; }
	}
// ³¡	



// ¼ûÀº ¸Þ´º2 ½ÃÀÛ
	function hide_table2(name,line)
	{
		submenu=eval(name+".style");
		
		var act_f = eval("document.form_" + name +".py_act");
		act = TrimString(act_f.value);
		
		if (act_f.value=='on') {
			act_f.value = "off";
			submenu.display='none';
		} else {
			act_f.value = "on";
			submenu.display='block';
		}


	}
// ³¡	



// ¼ûÀº ·¹ÀÌ¾î ½ÃÀÛ
	function hide_layer(form, name)
	{
		submenu=eval(name+".style");
		
		var act_f = form;
		act = TrimString(act_f.value);
		
		if (act_f.value=='yes') {
			act_f.value = "no";
			submenu.display='none';
		} else {
			act_f.value = "yes";
			submenu.display='block';
		}


	}
// ¼ûÀº ·¹ÀÌ¾î ³¡	


// ¼ûÀº ·¹ÀÌ¾î 2 ½ÃÀÛ
function toggle( rownum )
{
	var form = eval(rownum);
	if( form.style.display == 'none' )
	{ form.style.display = ""; }
	else 
	{ form.style.display = "none"; }
}
// ¼ûÀº ·¹ÀÌ¾î 2 ³¡

 
 
// È¸¿øÁ¤º¸º¸±â ½ÃÀÛ 
function mem_view(userid,mode)
{
	var oForm = document.createElement("<form name=fomAction></form>");
	oForm.method = "post";
	oForm.action = "/admin/member/mem_view_pop.asp";
	oForm.target = "mem_view"; 
	window.open("",'mem_view','toolbar=no,status=no,width=650,height=550,directories=no,scrollbars=yes,location=no,resize=no,menubar=no');
	
	var oInputHidden1 = document.createElement("<input type=hidden name=userid>");
	var oInputHidden2 = document.createElement("<input type=hidden name=mode>");
	oInputHidden1.value = userid;
	oInputHidden2.value = mode;
	
	oForm.appendChild(oInputHidden1);
	oForm.appendChild(oInputHidden2);
	document.body.appendChild(oForm);
	
	oForm.submit();
}
// È¸¿øÁ¤º¸º¸±â ³¡ 






// ¸ÞÀÏº¸³»±â
function mail_form(name,email,o_email)
{
window.open("/admin/pop_mail_form.asp?name="+ name +"&email="+ email +"&o_email="+ o_email +"",'mail_form','toolbar=no,status=no,width=600,height=500,directories=no,scrollbars=no,location=no,resize=no,menubar=no');
}


// µ¥ÀÌÅÍº¸±â
function data_view(FileName,width,height) {
	window.open(FileName,'data_view','toolbar=no,status=no,width='+ width +',height='+ height +',directories=no,scrollbars=yes,location=no,resize=no,menubar=no');
}




// ÀÔ·Â ±ÛÀÚ¼ö Á¦ÇÑ ½ÃÀÛ
function textCounter(theField,maxChars,maxLines,maxPerLine) {
	var strTemp = "";
	var strLineCounter = 0;
	var strCharCounter = 0;
	for (var i = 0; i < theField.value.length; i++)	{
		var strChar = theField.value.substring(i, i + 1);

		if (strChar == '\n') {
						
			strTemp += strChar;
			strCharCounter = 1;
			strLineCounter += 1;
		} else if (strCharCounter >= maxPerLine) {
//			alert("¿£ÅÍ");
			strTemp += '\n' + strChar;
			strCharCounter = 1;
			strLineCounter += 1;
		} else {
			strTemp += strChar;

			if (escape(strChar).length > 4) { 
//			   alert("ÇÑ±Û");
			strCharCounter += 2;     // ÇÑ±ÛÀÌ¸é 2¸¦ ´õÇÑ´Ù. 
			} else {  
			strCharCounter++;      // ±×¹ÜÀÇ °æ¿ì´Â 1À» ´õÇÑ´Ù.
			}
		}
	}
	
	if (maxChars <= strCharCounter) {
		alert("ÀÔ·Â±ÛÀÚ¸¦ ÃÊ°úÇÏ¿´½À´Ï´Ù.");
		theField.value = strTemp.substring(0,theField.value.length-1);
	}
	if (maxLines <= strLineCounter) {
		alert("ÀÔ·ÂÁÙ¼ö¸¦ ÃÊ°úÇÏ¿´½À´Ï´Ù.");
//		theField.value = strTemp.substring(0,theField.value.length-1);
	}
	// theCharCounter.value = maxChars - strTemp.length;
	// theLineCounter.value = maxLines - strLineCounter;
}
// ÀÔ·Â ±ÛÀÚ¼ö Á¦ÇÑ ³¡

// Å°º¸µå ¸·±â ½ÃÀÛ
function processKey()
{
        if( (event.ctrlKey == true && (event.keyCode == 78 || event.keyCode == 82)) ||
        (event.keyCode >= 112 && event.keyCode <= 123) )
            {
        event.keyCode = 0;
        event.cancelBubble = true;
        event.returnValue = false;
            }
}
// Å°º¸µå ¸·±â ³¡

// ÇÁ¸°Æ® ¼³Á¤ ½ÃÀÛ
function printWindow() 
{
	factory.printing.header = "";
	factory.printing.footer = "";
	factory.printing.portrait = true;
	factory.printing.leftMargin = 0.0;
	factory.printing.topMargin = 0.0;
	factory.printing.rightMargin = 0.0;
	factory.printing.bottomMargin = 0.0;
//	factory.printing.printBackground = true;
	factory.printing.Print(true,window);
}
// ÇÁ¸°Æ® ¼³Á¤ ³¡

// ÆäÀÌÁö º¸±â
function PageView(Page,Tpage) {

	if (Page != "print") {
		document.all["cover"].style.display = 'none';
		for (i=1;i<=Tpage;i++) {
			f=eval("document.all[\""+i+"p\"]");
			f.style.display = 'none';
			document.all[i  + "p_m"].className = "hand cFF";
			document.all["cover_m"].className = "hand cFF";
		}
		document.all[Page].style.display = 'block';
		document.all[Page].className = "break";
		document.all[Page + "_m"].className = "hand bold cFF";
		window.scrollTo(0,0);
	} else {
		document.all["floater"].style.display = 'none';	
		document.all["factory"].style.display = 'none';	
		document.all["cover"].style.display = 'block';	
		document.all["cover"].className = "";
		for (i=1;i<=Tpage;i++) {
			f=eval("document.all[\""+i+"p\"]");
			f.style.display = 'block';	
			f.className = "break";
			document.all[i  + "p_m"].className = "hand cFF";
			document.all["cover_m"].className = "hand cFF";
		}
		window.scrollTo(0,0);		
		printWindow();
		
	}

} 


// ÆäÀÌÁö ¼û±â±â
function disply_div(Tpage) {
	for (i=1;i<=Tpage;i++) {
		f=eval("document.all[\""+i+"p\"]");
		f.style.display = 'none';
	}
	
}   


function getY(obj) {
    var y = 0;
    while(obj.offsetParent) {
	y += obj.offsetTop;
	obj = obj.offsetParent;
    }
    return y;
}

function getX(obj) {
    var x = 0;
    while(obj.offsetParent) {
	x += obj.offsetLeft;
	obj = obj.offsetParent;
    }
    return x;
}


function help_pop(obj,pobj){
	var price_pop = document.getElementById(pobj);
	if(price_pop.style.display == 'block'){
		price_pop.style.display = 'none';
	}else{
		price_pop.style.display = 'block';
		price_pop.style.top = getY(obj) + obj.offsetHeight + 5;
		price_pop.style.left = getX(obj) - (price_pop.offsetWidth*0.3);
	}
}







function setCookie (name,value,path,domain,secure) {
   var expires = new Date();
   expires.setMonth(expires.getMonth() + 1)

  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

function getCookie (name) {
 var arg = name + "=";
 var alen = arg.length;
 var clen = document.cookie.length;
 var i = 0;
 while (i < clen) {
     var j = i + alen;
     if (document.cookie.substring(i, j) == arg)
       return getCookieVal (j);
     i = document.cookie.indexOf(" ", i) + 1;
     if (i == 0) break;
 }
 return null;
}

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}






