function bluring(){ 
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") {
		document.body.focus();
	}
}
document.onfocusin=bluring;


//ÆäÀÌÁö»óÀÇ ½ÇÁ¦ °´Ã¼ÀÇ À§Ä¡¸¦ ±¸ÇÏ±â
function getRealOffsetTop(o)
{
    return o ? o.offsetTop + getRealOffsetTop(o.offsetParent) : 0;
}

function getRealOffsetLeft(o)
{
    return o ? o.offsetLeft + getRealOffsetLeft(o.offsetParent) : 0;
}

function fnLayerClose(oLayer) {
	eval(oLayer + ".style.display = \'none\'");
}

//°øÅë
var hellotext="::: ¸¶ÇÇ¾Æ¿Â¶óÀÎ :::"
function hidestatus()	{
	window.status = hellotext;
	return true;
}


//·Î±×ÀÎ¿¡ ¾²½Ã´Â ÀÚ½º
function EnterCheck_Login(i)  {
	if(event.keyCode ==13)
	switch(i) {
		case 1:
			document.ms_login.upin.focus();
			break;
		case 2:
			login_submit();
			break;		
	}
}

function ClickID()
{
	if( document.ms_login.uid.value == " ¾ÆÀÌµð" )
	{
		document.ms_login.uid.value = "";
	}
}

function ClickPW()
{
	if( document.ms_login.upin.value == "ºñ¹Ð¹øÈ£" )
	{
		document.ms_login.upin.value = "";
	}
	document.ms_login.upin.style.background="#222121"; 
}


function login_submit()
{
	if (document.ms_login.uid.value =="") {
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		document.inno_login.uid.focus();
		return;
	}	
	if (document.ms_login.upin.value =="") {
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		document.ms_login.upin.focus();
		return;
	} 
	document.ms_login.submit();
}
//·Î±×ÀÎ¿¡ ¾²½Ã´Â ÀÚ½º ³¡.


function OpenWindow(url,intWidth,intHeight) { 

	var iMyWidth;
	var iMyHeight;
	iMyWidth = (window.screen.width-intWidth)/2
	if(iMyWidth<0)iMyWidth=0;	
	iMyHeight = (window.screen.height-intHeight)/2;
	if(iMyHeight<0)iMyHeight=0;
    window.open(url, "_blank", "left="+iMyWidth+",top="+iMyHeight+",width="+intWidth+",height="+intHeight+",resizable=yes,  scrollbars=no");
}

document.onmouseover=hidestatus;
document.onmouseout=hidestatus;


String.prototype.trim = function(str) { 
	str = this != window ? this : str; 
	return str.replace(/^\s+/g,'').replace(/\s+$/g,''); 
}

//¿¡·¯ ¸Þ½ÃÁö ÇÔ¼ö
function fnErrorMsg(ele, type){
	
	var hname ; //¿¡·¯³­ fromÀÇ ÇÑ±Û ÀÌ¸§ º¯¼ö

	switch(type){

		case "Req" : //ÇÊ¼öÀÔ·Â ¿¡·¯ÀÏ °æ¿ì

			if(ele.getAttribute("hname") != null){
				alert(ele.getAttribute("hname") + 'À» ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');				
			}
			else{
				alert('ÇÊ¼ö ÀÔ·Â¶õ ÀÔ´Ï´Ù. ²À ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');
			}

			ele.focus();

			break;
		

		case "Pat" :  //Çü½Ä ¿¡·¯ÀÏ °æ¿ì 

			if(ele.getAttribute("hname") != null){
				alert(ele.getAttribute("hname") + 'ÀÇ Çü½ÄÀÌ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.\n\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');				
			}
			else{
				alert('Çü½ÄÀÌ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');
			}
			ele.focus();
			break;
		

		case "Eng" :  //¿µ¹® ¿¡·¯ÀÏ °æ¿ì 

			if(ele.getAttribute("hname") != null){
				alert(ele.getAttribute("hname") + 'Àº ¿µ¹®¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');				
			}
			else{
				alert('¿µ¹®¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');
			}
			ele.focus();
			break;
		

		case "Han" :  //ÇÑ±Û ¿¡·¯ÀÏ °æ¿ì 

			if(ele.getAttribute("hname") != null){
				alert(ele.getAttribute("hname") + 'Àº ÇÑ±Û¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');				
			}
			else{
				alert('ÇÑ±Û¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');
			}
			ele.focus();
			break;
		

		case "Num" :  //¼ýÀÚ ¿¡·¯ÀÏ °æ¿ì 

			if(ele.getAttribute("hname") != null){
				alert(ele.getAttribute("hname") + 'Àº ¼ýÀÚ¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');				
			}
			else{
				alert('¼ýÀÚ¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');
			}
			ele.focus();
			break;
		

		case "Str" :  //¹®ÀÚ ¿¡·¯ÀÏ °æ¿ì 

			if(ele.getAttribute("hname") != null){
				alert(ele.getAttribute("hname") + 'Àº ¹®ÀÚ¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');				
			}
			else{
				alert('¹®ÀÚ¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');
			}
			ele.focus();
			break;
		
		case "ID" :  //¾ÆÀÌµð ¿¡·¯ÀÏ °æ¿ì 

			if(ele.getAttribute("hname") != null){
				alert(ele.getAttribute("hname") + '´Â ÇÑ±Û,Æ¯¼ö¹®ÀÚ, °ø¹é,\n\nÃ¹±ÛÀÚ¸¦ ¼ýÀÚ·Î »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');				
			}
			else{
				alert('¿µ¹®°ú ¼ýÀÚ¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');
			}
			ele.focus();
			break;

		case "Lens" :  //ÃÖÀú ÀÔ·Â ¿¡·¯ÀÏ °æ¿ì 

			if(ele.getAttribute("hname") != null){
				alert(ele.getAttribute("hname") + 'Àº ' + ele.getAttribute("mins") + 'ÀÚ ÀÌ»ó' + ele.getAttribute("maxs") + 'ÀÚ ÀÌÇÏ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');				
			}
			else{
				alert(ele.getAttribute("mins") + 'ÀÚ ÀÌ»ó' + ele.getAttribute("maxs") + 'ÀÚ ÀÌÇÏ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.\n\n´Ù½Ã ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.');
			}
			ele.focus();
			break;
		
	}

}

/*===================================================================================================*/
/*                              form check script													 */
/*===================================================================================================*/

function chkFrmValue(frm) {
	var ele; 	
	for (i = 0; i < frm.elements.length; i++ ) {
		
		ele = frm.elements[i];
			
		//¾çÂÊ ³¡ °ø¹éÃ³¸® 
		ele.value = ele.value.trim();
		
		//ÇÊ¼ö Ç×¸ñ °Ë»ç
		if(ele.getAttribute("Req") != null){			
			if(ele.value == null || ele.value == ''){				
				fnErrorMsg(ele, "Req");				
				return false;
			}
		}

		//ÆÐÅÏ°Ë»ç(ÇÑ±ÛÀÔ·Â, ¿µ¹®ÀÔ·Â, ¼ýÀÚÀÔ·Â, e-mail, ÁÖ¹Î¹øÈ£ )
		//            Han,      Eng,      Num,    Email,   Jumin 
		if(ele.getAttribute("Patt") != null){
			
			switch(ele.getAttribute("Patt")){
				case "Han"		:	{
										if(!fnChkHan(ele)){
											fnErrorMsg(ele, "Han");
											return false;
										}							
									}
									break;
				case "Eng"		:	{
										if(!fnChkEng(ele)){
											fnErrorMsg(ele, "Eng");
											return false;
										}							
									}
									break;
				case "Num"		:	{
										if(!fnChkNum(ele)){
											fnErrorMsg(ele, "Num");
											return false;
										}							
									}
									break;
				case "Email"	:	{
										if(!fnChkEmail(ele)){
											fnErrorMsg(ele, "Pat");
											return false;
										}							
									}	
									break;
									
                 case "ID"       : 	{
					 					if(fnChkNum(ele)){
											fnErrorMsg(ele, "ID");	
											return false;	
										}else{
											
											if(!fnChkID(ele)){
												fnErrorMsg(ele, "ID");
												return false;
											}
										}
									}	
									break;										
									
				 case "LOGINID"   : {
											
										if(!fnChkLoginID(ele)){
											fnErrorMsg(ele, "ID");
											return false;
										}
										
									}	
									break;										
					

				/*case "Jumin"	:	{
										ele1 = frm.elements[i];
										ele2 = frm.elements[i+1];
										if(!fnChkJumin(ele1, ele2)){
											fnErrorMsg(ele1, "Pat");
											return false;
										}					
									}
									break;*/
			}
		}

		//ÀÔ·Â ±æÀÌ °Ë»ç(ÃÖ¼ÒÀÔ·Â)
		if(ele.getAttribute("Mins") != null){
			if(ele.value.length < parseInt(ele.getAttribute("Mins"))){
				fnErrorMsg(ele, "Lens");
				return false;
			}
		}

		//ÀÔ·Â ±æÀÌ °Ë»ç(ÃÖ°íÀÔ·Â)
		if(ele.getAttribute("Maxs") != null){
			if(ele.value.length > parseInt(ele.getAttribute("Maxs"))){
				fnErrorMsg(ele, "Lens");
				return false;
			}
		}
	}
		
	return true;
}

function fnChkEmail(ele) {	//ÀÌ¸ÞÀÏ Ã¼Å© ÇÔ¼ö
	var pattern = /^[_a-zA-Z0-9-\.]+@[\.a-zA-Z0-9-]+\.[a-zA-Z]+$/;
	return (pattern.test(ele.value)) ? true : false;
}

function fnChkHan(ele) {			//ÇÑ±Û Ã¼Å© ÇÔ¼ö
	var pattern = /^[°¡-Èþ]+$/;	
	return (pattern.test(ele.value)) ? true : false;
}

function fnChkEng(ele) {			//¿µ¹® Ã¼Å© ÇÔ¼ö
	var pattern = /^[a-zA-Z/ ]+$/;
	return (pattern.test(ele.value)) ? true : false;
}


function fnChkNum(ele) {			//¼ýÀÚ Ã¼Å© ÇÔ¼ö
	var pattern = /^[0-9]+$/;
	return (pattern.test(ele.value)) ? true : false;
}

function fnChkID(ele){              //¾ÆÀÌµð Ã¼Å© ÇÔ¼ö   
    var pattern = /^[a-zA-Z0-9]+$/;    
	return (pattern.test(ele.value)) ? true : false;
}


function fnChkLoginID(ele){              //·Î±×ÀÎ½Ã ¾ÆÀÌµð Ã¼Å© ÇÔ¼ö   
    var pattern = /^[_a-zA-Z0-9-\.]+$/;    
	return (pattern.test(ele.value)) ? true : false;
}


function fnChkJumin(ele1,ele2) {
	
	ele1.value = ele1.value.trim();
	ele2.value = ele2.value.trim();

	if(ele1.value ==""){
		alert("ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸® 6ÀÚ¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
		ele1.focus();
		return false;
	}
	if(ele2.value ==""){
		alert("ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸® 7ÀÚ¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.");
		ele2.focus();
		return false;
	}

	if(!fnChkNum(ele1)){
		alert("ÁÖ¹Îµî·Ï¹øÈ£´Â ¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
		ele1.focus();
		return false;
	}

	if(!fnChkNum(ele2)){
		alert("ÁÖ¹Îµî·Ï¹øÈ£´Â ¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
		ele2.focus();
		return false;
	}

	var ssn0 = ele1.value;
	var ssn1 = ele2.value;
	
	if(ssn0.length != 6) {
		alert('ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®´Â 6ÀÚ¸®ÀÔ´Ï´Ù.');
		return false;
	}

	if(ssn1.length != 7) {
		alert('ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®´Â 7ÀÚ¸®ÀÔ´Ï´Ù.');
		return false;
	}
		
	var SSNS = ssn0 + ssn1;

	var SSN_tot = 0;
	var SSN_ad = "234567892345"
	for(i=0; i<=11; i++){
		SSN_tot = SSN_tot + parseInt(SSNS.substring(i, i+1)) * parseInt(SSN_ad.substring(i, i+1));
    }
    SSN_tot = 11 - (SSN_tot % 11);
    if(SSN_tot == 10) SSN_tot = 0
    else if(SSN_tot == 11) SSN_tot = 1
    if(parseInt(SSNS.substring(12, 13)) != SSN_tot){
		alert('ÁÖ¹Î¹øÈ£ Çü½ÄÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.');
        return false;
    }
	else return true;
}
 
/*===============================================================================================================================================================================================*/

/*** Copy Right Information ***
  * Please do not remove following information.
  * Modal Popup v1.0
  * Author: John J Kim
  * Email: john@frontendframework.com
  * URL: www.FrontEndFramework.com
  * 
  * You are welcome to modify the codes as long as you include this copyright information.
 *****************************/
 
//With the window size & the element size functions built-in
ModalPopup = function (elem,options) {
	//option default settings
	options = options || {};
	var HasBackground = (options.HasBackground!=null)?options.HasBackground:true;
	var BackgroundColor = options.BackgroundColor || '#000000';
	var BackgroundOpacity = options.BackgroundOpacity || 60; // 1-100
	BackgroundOpacity = (BackgroundOpacity > 0) ? BackgroundOpacity : 1;
	var BackgroundOnClick = options.BackgroundOnClick || function(){};
	var BackgroundCursorStyle = options.BackgroundCursorStyle || "default";
	var Zindex = options.Zindex || 90000;
	var AddLeft = options.AddLeft || 0; //in px
	var AddTop = options.AddTop || 0; //in px
	var nX = options.nX || 0;
	var nY = options.nY || 0;

	function _Convert(val) {
		if (!val) {return;}
		val = val.replace("px","");
		if (isNaN(val)) {return 0;}
		return parseInt(val);
	}
	var popup = document.getElementById(elem);
	if (!popup) {return;}
	//set the popup layer styles
	var winW = (document.layers||(document.getElementById&&!document.all)) ? window.outerWidth : (document.all ? document.body.clientWidth : 0);
	var winH = window.innerHeight ? window.innerHeight :(document.getBoxObjectFor ? Math.min(document.documentElement.clientHeight, document.body.clientHeight) : ((document.documentElement.clientHeight != 0) ? document.documentElement.clientHeight : (document.body ? document.body.clientHeight : 0)));
	//display the popup layer
	popup.style.display = "block";
	popup.style.visibility = "visible";
	var currentStyle;
	if (popup.currentStyle)	{ 
		currentStyle = popup.currentStyle; 
	}
	else if (window.getComputedStyle) {
		currentStyle = document.defaultView.getComputedStyle(popup, null);
	} else {
		currentStyle = popup.style;
	}

	var elemW = popup.offsetWidth -
		_Convert(currentStyle.marginLeft) -
		_Convert(currentStyle.marginRight) -
		_Convert(currentStyle.borderLeftWidth) -
		_Convert(currentStyle.borderRightWidth);

	var elemH = popup.offsetHeight -
		_Convert(currentStyle.marginTop) -
		_Convert(currentStyle.marginBottom) -
		_Convert(currentStyle.borderTopWidth) -
		_Convert(currentStyle.borderBottomWidth);

	popup.style.position = "absolute";
	popup.style.left = (nX) + "px";
	popup.style.top = (nY) + "px";
	popup.style.zIndex = Zindex + 1;

	if (HasBackground) {		
		if (!ModalPopup._BackgroundDiv) {
			ModalPopup._BackgroundDiv = document.createElement('div');
			ModalPopup._BackgroundDiv.style.display = "none";
			ModalPopup._BackgroundDiv.style.width = "100%";
			ModalPopup._BackgroundDiv.style.position = "absolute";
			ModalPopup._BackgroundDiv.style.top = "0px";
			ModalPopup._BackgroundDiv.style.left = "0px";
			document.body.appendChild(ModalPopup._BackgroundDiv);
		}
		ModalPopup._BackgroundDiv.onclick =  BackgroundOnClick;
		ModalPopup._BackgroundDiv.style.background = BackgroundColor;	
		ModalPopup._BackgroundDiv.style.height = document.all ? Math.max(Math.max(document.documentElement.offsetHeight, document.documentElement.scrollHeight), Math.max(document.body.offsetHeight, document.body.scrollHeight)) : (document.body ? document.body.scrollHeight : ((document.documentElement.scrollHeight != 0) ? document.documentElement.scrollHeight : 0)) + "px";
		ModalPopup._BackgroundDiv.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + BackgroundOpacity +")";
		ModalPopup._BackgroundDiv.style.MozOpacity = BackgroundOpacity / 100;
		ModalPopup._BackgroundDiv.style.opacity = BackgroundOpacity / 100;
		ModalPopup._BackgroundDiv.style.zIndex = Zindex;
		ModalPopup._BackgroundDiv.style.cursor = BackgroundCursorStyle;

		//Display the background
		ModalPopup._BackgroundDiv.style.display = "";
	}

}

ModalPopup.Close = function(id) {
	if (id) {
		document.getElementById(id).style.display = "none";
		document.getElementById(id).style.visibility = "hidden";
	} 
	if  (ModalPopup._BackgroundDiv) {
		ModalPopup._BackgroundDiv.style.display = "none";
	}
}

// textarea ¹®ÀÚ¼ö Á¦ÇÑ
// onChange="CheckStrLen('1000',this);" onKeyUp="CheckStrLen('1000',this);"
function CheckStrLen(maxlen,field)
 {
   var temp; //µé¾î¿À´Â ¹®ÀÚ°ª...
   var msglen;
   msglen = maxlen*2;
   var value= field.value;
  
   l =  field.value.length;
   tmpstr = "" ;

   if (l == 0)
   {
    value = maxlen*2;
   }
   else
   {
    for(k=0;k<l;k++)
    {
     temp =value.charAt(k);

     if (escape(temp).length > 4)
   msglen -= 2;
     else
   msglen--;
   
     if(msglen < 0)
     {
   alert("ÃÑ ¿µ¹® "+(maxlen*2)+"ÀÚ ÇÑ±Û " + maxlen + "ÀÚ ±îÁö º¸³»½Ç¼ö ÀÖ½À´Ï´Ù.");
    field.value= tmpstr;
   break;
     }
     else
     {
   tmpstr += temp;
     }
    }
   }
 }

//¾Æ¹ÙÅ¸ °ü·Ã.

 function getCookieVal (offset) 
{
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1) endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (cookieName) {

   var search = cookieName + "=";
  var cookie = document.cookie;

  // ÇöÀç ÄíÅ°°¡ Á¸ÀçÇÒ °æ¿ì
  if( cookie.length > 0 )
  {
   // ÇØ´ç ÄíÅ°¸íÀÌ Á¸ÀçÇÏ´ÂÁö °Ë»öÇÑ ÈÄ Á¸ÀçÇÏ¸é À§Ä¡¸¦ ¸®ÅÏ.
   startIndex = cookie.indexOf( cookieName );

   // ¸¸¾à Á¸ÀçÇÑ´Ù¸é
   if( startIndex != -1 )
   {
    // °ªÀ» ¾ò¾î³»±â À§ÇØ ½ÃÀÛ ÀÎµ¦½º Á¶Àý
    startIndex += cookieName.length;

    // °ªÀ» ¾ò¾î³»±â À§ÇØ Á¾·á ÀÎµ¦½º ÃßÃâ
    endIndex = cookie.indexOf( ";", startIndex );

    // ¸¸¾à Á¾·á ÀÎµ¦½º¸¦ ¸øÃ£°Ô µÇ¸é ÄíÅ° ÀüÃ¼±æÀÌ·Î ¼³Á¤
    if( endIndex == -1) endIndex = cookie.length;

    // ÄíÅ°°ªÀ» ÃßÃâÇÏ¿© ¸®ÅÏ
	var temp;
	temp = unescape( cookie.substring( startIndex + 1, endIndex ));
	if(temp == ";")
		return false;
	else
		return temp;
   }
   else
   {
    // ÄíÅ° ³»¿¡ ÇØ´ç ÄíÅ°°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì
    return false;
   }
  }
  else
  {
   // ÄíÅ° ÀÚÃ¼°¡ ¾øÀ» °æ¿ì
   return false;
  }
 
}

function SetCookie (name, value) {
   var argv = SetCookie.arguments;
   var argc = SetCookie.arguments.length;
   var expires = (2 < argc) ? argv[2] : null;
   var path = (3 < argc) ? argv[3] : null;
   var domain = (4 < argc) ? argv[4] : null;
   var secure = (5 < argc) ? argv[5] : false;
   document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "; domain=www.mafiaonline.kr" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");
   document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "; domain=mafiaonline.nowgame.co.kr" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");
   document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "; domain=web.humoruniv.korea.com" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");
} 

function deleteCookie( cookieName )
{
	var expireDate = new Date();
	//¾îÁ¦ ³¯Â¥¸¦ ÄíÅ° ¼Ò¸ê ³¯Â¥·Î ¼³Á¤ÇÑ´Ù.
	expireDate.setDate( expireDate.getDate() - 1 );
	document.cookie = cookieName + "= " + "; expires=" + expireDate.toGMTString() + "; path=/";
}


function viewCookie()
 {
  if( document.cookie.length > 0 )
	alert(document.cookie);
  else
    alert("ÀúÀåµÈ ÄíÅ°°¡ ¾ø½À´Ï´Ù.");
 }


function ClanOut() 
{ 
	if ( confirm("Å»ÅðÇÏ½Ã¸é ÇØ´çÅ¬·£¿¡ Àç°¡ÀÔÀÌ Èûµé¼öµµ ÀÖ½À´Ï´Ù. Å¬·£¿¡¼­ Å»ÅðÇÏ½Ã°Ú½À´Ï±î?") == false )
	{
		return;
	}
	

	if (document.clanout.ReqClanCode.value =="") 
	{
		alert("Á¤º¸°¡ Àß¸øµÇ¾ú½À´Ï´Ù.34");
		return;
	}

	if (document.clanout.RetYn.value =="") 
	{
		alert("Á¤º¸°¡ Àß¸øµÇ¾ú½À´Ï´Ù.35");
		return;
	} 
	//document.clanout.login_submit();
	document.clanout.submit();
}

function ReqClanJoinCancel()
{
	if ( confirm("Å¬·£°¡ÀÔ ½ÅÃ»À» Ãë¼Ò ÇÏ½Ã°Ú½À´Ï±î?") == false )
	{
		return;
	}
	document.ReqJoinCancel.submit();
}
 
function ReqExpireClanHost()
{
	if ( confirm("È®ÀÎÀ» ´©¸£½Ã¸é ¾Æ¹«°Íµµ ¹¯Áö¾Ê°í 2ÃÊ³»¿¡ ÇØÃ¼µË´Ï´Ù. Å¬·£À» ÇØÃ¼ÇÏ½Ã°Ú½À´Ï±î? ") == false )
	{
		return;
	}
	document.ReqExpireClan.submit();
}


function RightBanner() 
{ 
	var xMax = document.body.clientWidth;
	var yMax = document.body.clientHeight; 

	var xOffset = (xMax-200)/2+510;
	var yOffset = 175;//(yMax-150)/2+50; 
	//var xOffset = screen.availWidth / 2 + 10 / 2 + 'px'; 
	//var yOffset = 100;//screen.availHeight;// / 2 + 0 / 2 + 'px';
	//Áß½É¿¡¼­ ¿À¸¥ÂÊÀ¸·Î 20, ¾Æ·¡·Î 40ÇÈ¼¿¿¡ Ç×»ó À§Ä¡ÇÏ´Â ·¹ÀÌ¾î 
	var divMenu = document.all['LayerBanner'].style; 
	divMenu.top = yOffset; 
	divMenu.left = xOffset; 
	document.getElementById('LayerBanner').style.visibility = "visible"; 
}
 
////////////////////////////////////////////////////////////////////////////////////////////////////////
// ·¹ÀÌ¾îÆË¾÷Ãâ·ÂÇÔ¼ö --> °í°´¼¾ÅÍ ´äº¯ÀÖÀ½
// add by nextnine
	var IE5=(document.getElementById && document.all)? true : false;
	var W3C=(document.getElementById)? true: false;
	var currIDb=null, currIDs=null, xoff=0, yoff=0; zctr=0; totz=0;

	function trackmouse(evt){
			if((currIDb!=null) && (currIDs!=null)){
					var x=(IE5)? event.clientX+document.body.scrollLeft : evt.pageX;
					var y=(IE5)? event.clientY+document.body.scrollTop : evt.pageY;
							currIDb.style.left=x+xoff+'px';
							currIDs.style.left=x+xoff+10+'px';
							currIDb.style.top=y+yoff+'px';
							currIDs.style.top=y+yoff+10+'px';
					return false;
			}
	}

	function stopdrag(){
			currIDb=null;
			currIDs=null;
			NS6bugfix();
	}

	function grab_id(evt){
			xoff=parseInt(this.IDb.style.left)-((IE5)? event.clientX+document.body.scrollLeft : evt.pageX);
			yoff=parseInt(this.IDb.style.top)-((IE5)? event.clientY+document.body.scrollTop : evt.pageY);
			currIDb=this.IDb;
			currIDs=this.IDs;
	}

	function NS6bugfix(){
			if(!IE5){
					self.resizeBy(0,1);
					self.resizeBy(0,-1);
			}
	}

	function incrzindex(){
			zctr=zctr+2;
			this.subb.style.zIndex=zctr;
			this.subs.style.zIndex=zctr-1;
	}

	function createPopup(id, title, width, height, x , y , isdraggable, boxcolor, barcolor, shadowcolor, text, textcolor, textptsize, textfamily ){
			if(W3C){
					zctr+=2;
					totz=zctr;
					var txt='';
							txt+='<div id="'+id+'_s" style="position:absolute; left:'+(x+7)+'px; top:'+(y+7)+'px; width:'+width+'px; height:'+height+'px; background-color:'+shadowcolor+'; filter:alpha(opacity=50); visibility:visible"> </div>';
							txt+='<div id="'+id+'_b" style="border:outset '+barcolor+' 2px; position:absolute; left:'+x+'px; top:'+y+'px; width:'+width+'px; overflow:hidden; height:'+height+'px; background-color:'+boxcolor+'; visibility:visible">';
							txt+='<div style="width:'+width+'px; height:16px; background-color:'+barcolor+'; padding:0px; border:1px"><table cellpadding="0" cellspacing="0" border="0" width="'+(IE5? width-4 : width)+'"><tr><td width="'+(width-20)+'"><div id="'+id+'_h" style="width:'+(width-20)+'px; height:14px; font: bold 12px Tahoma; cursor:move; color:'+textcolor+'"> '+title+'</div></td><td align="right"><a onmousedown="document.getElementById(\''+id+'_s\').style.display=\'none\'; document.getElementById(\''+id+'_b\').style.display=\'none\';return false"><img src="http://www.blueb.co.kr/SRC/javascript/image/close.gif" border="0" height="15" width="15"></a></td></tr></table></div>';
							txt+='<div id="'+id+'_ov" width:'+width+'px; style="margin:5px; color:'+textcolor+'; font:'+textptsize+'pt '+textfamily+';">'+text+'</div></div>';
							document.write(txt);
							this.IDh=document.getElementById(id+'_h');
							this.IDh.IDb=document.getElementById(id+'_b');
							this.IDh.IDs=document.getElementById(id+'_s');
							this.IDh.IDb.subs=this.IDh.IDs;
							this.IDh.IDb.subb=this.IDh.IDb;
							this.IDh.IDb.IDov=document.getElementById(id+'_ov');
							if(IE5){
									this.IDh.IDb.IDov.style.width=width-6;
									this.IDh.IDb.IDov.style.height=height-22;
									this.IDh.IDb.IDov.style.scrollbarBaseColor=boxcolor;
									this.IDh.IDb.IDov.style.overflow="auto";
							}
							else{
									this.IDh.IDs.style.MozOpacity=.5;
							}
							this.IDh.IDb.onmousedown=incrzindex;
							if(isdraggable){
									this.IDh.onmousedown=grab_id;
									this.IDh.onmouseup=stopdrag;
							}
					}
			}

	if(W3C)document.onmousemove=trackmouse;
	if(!IE5 && W3C)window.onload=NS6bugfix;  
	// ·¹ÀÌ¾î ÆË¾÷ ¿Ï·á
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
