var UrlHttp		= "http://www.cdonline.com.tw";
var UrlHttps	= "https://secure.cdonline.com.tw";

//Flash Menu
function Fun_GoMenu(menuNo){
	var go = window.top.document.location;		
	if (menuNo == "011") {go.href = UrlHttp + "/carpediem/notice_list.asp";}
	if (menuNo == "012") {go.href = UrlHttp + "/carpediem/update_list.asp";}
	if (menuNo == "013") {go.href = UrlHttp + "/carpediem/information_list.asp";}
	//
	if (menuNo == "021") {go.href = UrlHttp + "/gameinfo/sceanario_prologe.asp";}
	if (menuNo == "022") {go.href = UrlHttp + "/gameinfo/map_page01.asp";}
	if (menuNo == "023") {go.href = UrlHttp + "/gameinfo/character_clan.asp";}
	if (menuNo == "024") {go.href = UrlHttp + "/gameinfo/item_weapchel.asp";}
	if (menuNo == "025") {go.href = UrlHttp + "/gameinfo/monster_page01.asp";}
	if (menuNo == "026") {go.href = UrlHttp + "/gameinfo/skill_knight.asp";}
	if (menuNo == "027") {go.href = UrlHttp + "/gameinfo/quest_info.asp";}
	if (menuNo == "028") {go.href = UrlHttp + "/gameinfo/guide1_down.asp";}
	//
	if (menuNo == "031") {go.href = UrlHttps + "/itemmall/item_shop.asp";}
	if (menuNo == "032") {go.href = UrlHttp + "";}
	if (menuNo == "033") {go.href = UrlHttps + "/itemmall/point_charged_List.asp";}
	if (menuNo == "034") {go.href = UrlHttps + "/itemmall/point_spend_List.asp";}
	if (menuNo == "035") {go.href = UrlHttps + "/itemmall/point_charge_des.asp";}
	if (menuNo == "036") {go.href = UrlHttps + "/itemmall/point_charge.asp";}
	if (menuNo == "037") {go.href = UrlHttp + "";}
	if (menuNo == "038") {go.href = UrlHttp + "";}
	if (menuNo == "039") {go.href = UrlHttps + "/itemmall/shopping_handbook.asp";}
		//
	if (menuNo == "041") {go.href = UrlHttp + "";}
	if (menuNo == "042") {go.href = UrlHttp + "/community/freeboard_list.asp";}
	if (menuNo == "043") {go.href = UrlHttp + "";}
	if (menuNo == "044") {go.href = UrlHttp + "/community/gisadaninput.asp";}
	if (menuNo == "045") {go.href = UrlHttp + "";}
	if (menuNo == "046") {go.href = UrlHttp + "";}
	if (menuNo == "047") {go.href = UrlHttp + "";}
	//
	if (menuNo == "051") {go.href = UrlHttp + "/download/client.asp";}
	if (menuNo == "052") {go.href = UrlHttp + "/download/movie_openning.asp";}
	if (menuNo == "053") {go.href = UrlHttp + "/download/wallpaper01.asp";}
	if (menuNo == "054") {go.href = UrlHttp + "";}
	//
	if (menuNo == "061") {go.href = UrlHttp + "/Customer/Service_Guide.asp";}
	if (menuNo == "062") {go.href = UrlHttp + "/servicecenter/Faq_List.asp";}
	if (menuNo == "063") {go.href = UrlHttp + "/Customer/Help_Request.asp";}
	if (menuNo == "064") {go.href = UrlHttp + "";}
	if (menuNo == "065") {go.href = UrlHttp + "/Customer/Policy_2.asp";}
}


var sUrlString = top.window.location.href.split("/");
var gServerUrl = sUrlString[0]+"//"+sUrlString[2];
var gDiaryUrl = gServerUrl.replace("www","diary");

var textareaObj = {
	'textareaDecrease' : function(id, row) {
		if ($(id).rows - row > 0)
			$(id).rows -= row;
	},
	'textareaOriginal' : function(id, row) {
		$(id).rows = row;
	},
	'textareaIncrease' : 	function(id, row) {
		$(id).rows += row;
	}
}

var formChkObj = {
	'returnFalseForm' : function(obj,msg) {
		window.alert(msg);
		if ($(obj).type!='hidden') { $(obj).focus(); }
		return false;
	},
	'returnRadioCheck' : function(objName) {
		var sReturnValue = '';
		obj = document.getElementsByName(objName);
		for(var i = 0; i < obj.length; i++) {
			if (obj[i].checked == true) {
				sReturnValue =  obj[i].value;
			}
		}
		return sReturnValue;
	},
	'returnSelectCheck' : function(objName) {
		var sReturnValue = '';
		for(var i = 0; i < $(objName).length; i++) {
			if ($(objName).options[i].selected == true) {
				sReturnValue =  $(objName).options[i].value;
			}
		}
		return sReturnValue;
	},
	'checkID' : function (str,min,max) {
		return (min <= str.length && str.length <= max && /^[a-z0-9]+$/.test(str) && /^[a-z]/.test(str));
	},
	'checkPass' : function (str,min,max) {
		return (min <= str.length && str.length <= max && /^[a-z0-9]+$/.test(str));
	},
	'checkNumber' : function (number,min,max) {
		return (min <= number.length && number.length <= max && /^[0-9]+$/.test(number));
	},
	'checkEmailChk' : function(emailStr) {
		var checkTLD=1;
		var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
		var emailPat=/^(.+)@(.+)$/;
		var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
		var validChars="\[^\\s" + specialChars + "\]";
		var quotedUser="(\"[^\"]*\")";
		var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
		var atom=validChars + '+';
		var word="(" + atom + "|" + quotedUser + ")";
		var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
		var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
		var matchArray=emailStr.match(emailPat);

		if (matchArray==null) {
			return false;
		}
		var user=matchArray[1];
		var domain=matchArray[2];

		for (i=0; i<user.length; i++) {
			if (user.charCodeAt(i)>127) {
				return false;
			}
		}
		for (i=0; i<domain.length; i++) {
			if (domain.charCodeAt(i)>127) {
				return false;
			}
		}

		if (user.match(userPat)==null) {
			return false;
		}

		var IPArray=domain.match(ipDomainPat);
		if (IPArray!=null) {
			for (var i=1;i<=4;i++) {
				if (IPArray[i]>255) {
					return false;
				}
			}
		}

		var atomPat=new RegExp("^" + atom + "$");
		var domArr=domain.split(".");
		var len=domArr.length;
		for (i=0;i<len;i++) {
			if (domArr[i].search(atomPat)==-1) {
				return false;
			}
		}

		if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) {
			return false;
		}

		if (len<2) {
			return false;
		}
	},
	// ÁÖ¹Î¹øÈ£ Ã¼Å©
	// ³â = birth[0];
	// ¿ù = birth[1];
	// ÀÏ = birth[2];
	// if(birth[3]==true) ¿Ü±¹ÀÎ;
	'checkPersonalNo' : function(personal_no) {
		personal_no = personal_no.replace(/[^\d]+/g, '');
		pattern = /^[0-9]{6}[1-8][0-9]{6}$/;

		if(!pattern.test(personal_no)) {
			return false;
		}
		var birth = new Array();
		birth[0] = personal_no.substr(0, 2);
		switch(personal_no.charAt(6)) {
		case '1':
		case '2':
			birth[0] = ('19' + birth[0]) * 1;
			birth[3] = false;
			break;
		case '3':
		case '4':
			birth[0] = ('20' + birth[0]) * 1;
			birth[3] = false;
			break;
		case '5':
		case '6':
			birth[0] = ('19' + birth[0]) * 1;
			birth[3] = true;
			break;
		case '7':
		case '8':
			birth[0] = ('20' + birth[0]) * 1;
			birth[3] = true;
			break;
		/*case '9': // ÀÌ·¸°Ô ´ÄÀº »ç¶÷Àº ÀÖ¾îµµ ¾È¹Þ¾Æ¿ä. À§ÀÇ Á¤±Ô½Ä¿¡¼­ ¾È¹ÞÀ½.
		case '0':
			birth[0] = ('18' + birth[0]) * 1;
			birth[3] = true;
			break;*/
		}

		birth[1] = personal_no.substr(2, 2) * 1;
		birth[2] = personal_no.substr(4, 2) * 1;

		if(birth[1] < 1 || birth[1] > 12) {
			return false;
		}
		if(birth[2] < 1 || birth[2] > 31) {
			return false;
		}
		var check = 0;
		var mul = 2;

		if(birth[3]) {
			if(((personal_no.charAt(7) * 10 + personal_no.charAt(8)) % 2) != 0) {
				return false;
			}
		}
		for(i = 0; i < 12; i ++) {
			check += personal_no.charAt(i) * mul;
			mul ++;
			if(mul > 9) {
				mul = 2;
			}
		}

		check = 11 - (check % 11);

		if(check > 9) {
			check %= 10;
		}
		if(birth[3]) {
			check += 2;
			if(check > 9) {
				check %= 10;
			}
		}
		if(check != personal_no.charAt(12)) {
			return false;
		}
		return birth;
	},
	// »ç¾÷ÀÚ¹øÈ£ Ã¼Å©
	'checkBizNum' : function(biznum) {
		var sum = 0;
		var getlist =new Array(10);
		var chkvalue =new Array("1","3","7","1","3","7","1","3","5");
		for(var i=0; i<10; i++) { getlist[i] = biznum.substring(i, i+1); }
		for(var i=0; i<9; i++) { sum += getlist[i]*chkvalue[i]; }
		sum = sum + parseInt((getlist[8]*5)/10);
		sidliy = sum % 10;
		sidchk = 0;
		if(sidliy != 0) { sidchk = 10 - sidliy; }
		else { sidchk = 0; }
		if(sidchk != getlist[9]) { return false; }
		return true;
	}
}



//================================================================================
//		Á¦ÀÛÀÏ : 2006.03.10
//		¿øÁ¦ÀÛÀÚ : http://blog.daum.net/battlej/ º£Æ²Á¦ÀÌ
//		¿ë   µµ : ¾×Æ¼ºêX IE ÆÐÄ¡¿¡ µû¸¥ ÀÚµ¿ ÀÚ¹Ù½ºÅ©¸³Æ® Ãâ·Â ¼Ò½º
//		»ç¿ë : <SCRIPT>embedObj.mEmbed('src=/img/main.swf','width=642','height=170');</SCRIPT>
//================================================================================
var embedObj = {
	'get' : function(arrayKey, arrayValue, Value) {
		count = arrayKey.length;
		for(i=0;i<count;i++) {
			if(arrayKey[i]==Value) {
				return arrayValue[i];
				break;
			}
		}
	},
	'mEmbed' : function() {
		var key = new Array();
		var value = new Array();
		error_check=0;
		for(i=0;i<this.mEmbed.arguments.length;i++) {
			data = this.mEmbed.arguments[i].split('/=/');
			key[i] = data[0];
			value[i] = data[1];
		}

		contents = '';
		srcdata = this.get(key,value,'src');
		//if(/\.(...)$/.test(srcdata)) {
			flashon = 1;
		//}

		classid = this.get(key,value,'classid');
		codebase = this.get(key,value,'codebase');
		if(flashon==1) {
			classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
			codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.c-ab#version=6,0,29,0';
		}
		if(classid && codebase) {
			contents += '<object';
			if(classid) {
				contents += ' classid="' + classid + '"';
			}
			if(codebase) {
				contents += ' codebase="' + codebase + '"';
			}
			count = key.length;
			for(i=0;i<count;i++) {
				if(value[i]!='') {
					if(key[i]!='src') {
						contents += ' ' + key[i] + '="' + value[i] + '"';
					}
				}
			}
			contents += '>';
			for(i=0;i<count;i++) {
				if(value[i]!='') {
					if(flashon==1 && key[i]=='src') {
						contents += '<param name="movie" value="' + value[i] + '" />';
					} else {
						contents += '<param name="' + key[i] + '" value="' + value[i] + '" />';
					}
				}
			}
		}
		contents += '<embed';
		for(i=0;i<count;i++) {
			if(value[i]!='') {
				contents += ' ' + key[i] + '="' + value[i] + '"';
			}
		}
		contents += '>';
		contents += '</embed>';
		if(classid && codebase) {
			contents += '</object>';
		}
		document.write(contents);
	}
}



// aFunc ¿¡ °á°ú°ªÀ» Á¤ÀûÀ¸·Î Ç¥ÇöÇÒ¶§¸¸ °¡´É
var getAjax = {
	'loadAjax' : function(aUrl,aPars,aMethod,aFunc,aType) {
		var loadAjax = new Ajax.Request(
			aUrl,
			{
				method: aMethod,
				parameters: aPars,
				onComplete: this.aResult.bind(this,aFunc,aType)
			}
		)
	},
	'aResult' : function(aFunc,aType,originalRequest) {
		if (aType == "json") {
			var fReturn = originalRequest.responseText;
			//window.alert(fReturn);
			var fReturn = eval("(" + fReturn + ")");
		}
		eval(aFunc)(fReturn);
	}
}





function changeSelectMove(objName) {
	var move_index = $(objName).selectedIndex;
	window.location = $(objName).options[move_index].value;
}
function viewImg(url) {
	viewimg = window.open(url,'viewimg','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=570,height=600');
}
function openWindow(URL,Name,Features) {
	window.open(URL,Name,Features);
}
function searchChk() {
	if (!document.search.s_que.value) {
		window.alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.');
		document.search.s_que.focus();
		return false;
	}
}



function imgLoad(imgObj,imgFile) {
	$(imgObj).src = imgFile;
}




/*
fListScale : ÇÑÆäÀÌÁö Ãâ·ÂÇÒ °Ô½Ã¹°¼ö
fPageScale : ÆäÀÌÁö¼ö¸¦ Ç¥½ÃÇÒ °¹¼ö
fTotal : ÀüÃ¼ °Ô½Ã¹°¼ö
fStart : ¸®½ºÆ®¸¦ »Ñ¸± ½ÃÀÛÁ¡(ÃÖ±Ù°Ô½Ã¹°·Î order by ÇØ¼­ »Ì¾Æ ³»´Â ÀÚ·á¶ó¸é °¡Àå ÃÖ±Ù ÀÚ·á°¡ 0¹øÀÌ µÊ
fPagingUrl : Å¬¸¯½Ã ³Ñ¾î°¥ ÆäÀÌÁö
*/
function getPaging(fListScale,fPageScale,fTotal,fStart,fPagingUrl) {
	var fReturn = "";
	var fPage;
	var fPP;
	var fNP;
	var fPreStart;
	var fLn;
	var fVk;
	var fNstart;
	var fLast;

	if(fTotal > fListScale) {
		fPage =  Math.floor(fStart/(fListScale*fPageScale));

		fReturn = fReturn + "<table border='0' cellpadding='0' cellspacing='1'><tr><td align='center' class='paging'> ";

		fPP=fStart-fListScale;
		fNP=fStart+fListScale ;

		// Ã³À½À¸·Î ÀÌµ¿
		if(fPP>=0) {
			fReturn = fReturn + " | <a href='" + fPagingUrl + "&sStart=0'>Ã³À½</a> ";
		}

		// sPageScale ¸¸Å­ ¾ÕÀ¸·Î ÀÌµ¿
		if( fStart+1 >  fListScale*fPageScale ) {
			fPreStart = fListScale*(fPage*fPageScale - 1);
			fReturn  = fReturn + " | <a href='" + fPagingUrl + "&sStart=" + fPreStart + "'>ÀÌÀü</a> ";
		}

		// sPageScale ¸¸Å­ Ãâ·Â
		for(i=0; i < fPageScale ; i++) {
			fLn = (fPage * fPageScale + i)*fListScale;
			fVk= fPage * fPageScale + i+1;
			if(fLn<fTotal) {
				if(fLn!=fStart) { fReturn  = fReturn + " | <a href='" + fPagingUrl + "&sStart=" + fLn + "' class='otherpage'>" + fVk + "</a> "; }
				else { fReturn  = fReturn + " | <span style='color:#FF8600;font-weight:bold;'>" + fVk + "</span> "; }
			}
		}

		// sPageScale ¸¸Å­ µÚ·Î ÀÌµ¿
		if(fTotal > ((fPage+1)*fListScale*fPageScale)) {
			fNstart=(fPage+1)*fListScale*fPageScale;
			fReturn  = fReturn + " | <a href='" + fPagingUrl + "&sStart=" + fNstart + "'>´ÙÀ½</a> ";
		}

		// ¸¶Áö¸· ÆäÀÌÁö
		if(fNP<fTotal) {
			fLast = (Math.floor(fTotal/fListScale))*fListScale;
			fReturn  = fReturn + " | <a href='" + fPagingUrl + "&sStart=" + fLast + "'>¸¶Áö¸·</a> ";
		}

		fReturn  = fReturn + " | </td></tr></table>";
	}
	return fReturn;
}




/*
fListScale : ÇÑÆäÀÌÁö Ãâ·ÂÇÒ °Ô½Ã¹°¼ö
fPageScale : ÆäÀÌÁö¼ö¸¦ Ç¥½ÃÇÒ °¹¼ö
fTotal : ÀüÃ¼ °Ô½Ã¹°¼ö
fStart : ¸®½ºÆ®¸¦ »Ñ¸± ½ÃÀÛÁ¡(ÃÖ±Ù°Ô½Ã¹°·Î order by ÇØ¼­ »Ì¾Æ ³»´Â ÀÚ·á¶ó¸é °¡Àå ÃÖ±Ù ÀÚ·á°¡ 0¹øÀÌ µÊ
fFuncName : AJAX ·ÎµåÇÒ ÇÔ¼ö¸í
fParam : ·ÎµåÇÒ AJAX ¿¡ sStart ¸¦ Á¦¿ÜÇÑ ÀÎÀÚ°ª
*/
function getAJAXPaging(fListScale,fPageScale,fTotal,fStart,fFuncName,fParam) {
	var fReturn = "";
	var fPage;
	var fPP;
	var fNP;
	var fPreStart;
	var fLn;
	var fVk;
	var fNstart;
	var fLast;

	if(fTotal > fListScale) {
		fPage =  Math.floor(fStart/(fListScale*fPageScale));

		fReturn = fReturn + "<table border='0' cellpadding='5' cellspacing='0'><tr><td align='center' class='paging'> ";

		fPP=fStart-fListScale;
		fNP=fStart+fListScale ;

		// Ã³À½À¸·Î ÀÌµ¿
		if(fPP>=0) {
			fReturn = fReturn + " | <a href=\"javascript:" + fFuncName + "(" + fParam + ",0);\">Ã³À½</a> ";
		}

		// sPageScale ¸¸Å­ ¾ÕÀ¸·Î ÀÌµ¿
		if( fStart+1 >  fListScale*fPageScale ) {
			fPreStart = fListScale*(fPage*fPageScale - 1);
			fReturn  = fReturn + " | <a href=\"javascript:" + fFuncName + "(" + fParam + "," + fPreStart + ");\">ÀÌÀü</a> ";
		}

		// sPageScale ¸¸Å­ Ãâ·Â
		for(i=0; i < fPageScale ; i++) {
			fLn = (fPage * fPageScale + i)*fListScale;
			fVk= fPage * fPageScale + i+1;
			if(fLn<fTotal) {
				if(fLn!=fStart) { fReturn  = fReturn + " | <a href=\"javascript:" + fFuncName + "(" + fParam + "," + fLn + ");\" class='otherpage'>" + fVk + "</a> "; }
				else { fReturn  = fReturn + " | <span style='color:#FF8600;font-weight:bold;'>" + fVk + "</span> "; }
			}
		}

		// sPageScale ¸¸Å­ µÚ·Î ÀÌµ¿
		if(fTotal > ((fPage+1)*fListScale*fPageScale)) {
			fNstart=(fPage+1)*fListScale*fPageScale;
			fReturn  = fReturn + " | <a href=\"javascript:" + fFuncName + "(" + fParam + "," + fNstart + ");\">´ÙÀ½</a> ";
		}

		// ¸¶Áö¸· ÆäÀÌÁö
		if(fNP<fTotal) {
			fLast = (Math.floor(fTotal/fListScale))*fListScale;
			fReturn  = fReturn + " | <a href=\"javascript:" + fFuncName + "(" + fParam + "," + fLast + ");\">¸¶Áö¸·</a> ";
		}

		fReturn  = fReturn + " | </td></tr></table>";
	}
	return fReturn;
}




function 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 "";
}





var Calendar = {
	'target' : '',
	'eldefine' : function (mEvent) {
		this.el = (Prototype.Browser.IE == true) ? mEvent.srcElement : mEvent.target
	},
	'Calendar' : function (obj) {
		var now = obj.value.split("-");
		var x, y;
		this.stime;

		this.target = obj;																// Object ÀúÀå;

		x = (document.layers) ? loc.pageX : obj.offsetLeft;
		y = (document.layers) ? loc.pageY : obj.offsetTop;
		while((obj = obj.offsetParent) != null){
			x += obj.offsetLeft;
			y += obj.offsetTop;
		}
		$('calendarLayer').style.top = y+20 + 'px';
		$('calendarLayer').style.left = x + 'px';
		$('calendarLayer').style.display = ($('calendarLayer').style.display == "block") ? "none" : "block";

		if (now.length == 3) {														// Á¤È®ÇÑÁö °Ë»ç
			this.Show_cal(now[0],now[1],now[2]);											// ³Ñ¾î¿Â °ªÀ» ³â¿ùÀÏ·Î ºÐ¸®
		}
		else {
			now = new Date();
			this.Show_cal(now.getFullYear(), now.getMonth()+1, now.getDate());			// ÇöÀç ³â/¿ù/ÀÏÀ» ¼³Á¤ÇÏ¿© ³Ñ±è.
		}
	},
	'doOver' : function (mEvent) {
		this.eldefine(mEvent);
		var cal_Day = this.el.title;

		if (cal_Day.length > 7) {													// ³¯ÀÚ °ªÀÌ ÀÖÀ¸¸é.
			this.el.style.borderTopColor = this.el.style.borderLeftColor = "buttonhighlight";
			this.el.style.borderRightColor = this.el.style.borderBottomColor = "buttonshadow";
		}
		window.clearTimeout(this.stime);
	},
	'doClick' : function (mEvent) {
		this.eldefine(mEvent);
		cal_Day = this.el.title;
		this.el.style.borderColor = "red";							// Å×µÎ¸® »öÀ» »¡°£»öÀ¸·Î
		if (cal_Day.length > 7) {													// ³¯ÀÚ °ªÀÌÀÖÀ¸¸é
			this.target.value=cal_Day													// °ª ¼³Á¤
		}
		$('calendarLayer').style.display='none';												// È­¸é¿¡¼­ Áö¿ò}
	},
	'doOut' : function (mEvent) {
		this.eldefine(mEvent);
		cal_Day = this.el.title;
		if (cal_Day.length > 7) {
			this.el.style.borderColor = "white";
		}
	},
	'day2' : function (d) {
		return (parseInt(d) < 10) ? "0" + parseInt(d) : "" + parseInt(d) ;
	},
	'Show_cal' : function (sYear,sMonth,sDay) {
		var Months_day = new Array(0,31,28,31,30,31,30,31,31,30,31,30,31)
		var Weekday_name = new Array("ÀÏ", "¿ù", "È­", "¼ö", "¸ñ", "±Ý", "Åä");
		var intThisYear = new Number(), intThisMonth = new Number(), intThisDay = new Number();
		$('calendarLayer').innerHTML = "";
		datToday = new Date();													// ÇöÀç ³¯ÀÚ ¼³Á¤

		intThisYear = parseInt(sYear);
		intThisMonth = parseInt(sMonth);
		intThisDay = parseInt(sDay);

		if (intThisYear == 0) intThisYear = datToday.getFullYear();				// °ªÀÌ ¾øÀ» °æ¿ì
		if (intThisMonth == 0) intThisMonth = parseInt(datToday.getMonth())+1;	// ¿ù °ªÀº ½ÇÁ¦°ª º¸´Ù -1 ÇÑ °ªÀÌ µÅµ¹·Á Áø´Ù.
		if (intThisDay == 0) intThisDay = datToday.getDate();

		switch(intThisMonth) {
			case 1:
					intPrevYear = intThisYear -1;
					intPrevMonth = 12;
					intNextYear = intThisYear;
					intNextMonth = 2;
					break;
			case 12:
					intPrevYear = intThisYear;
					intPrevMonth = 11;
					intNextYear = intThisYear + 1;
					intNextMonth = 1;
					break;
			default:
					intPrevYear = intThisYear;
					intPrevMonth = parseInt(intThisMonth) - 1;
					intNextYear = intThisYear;
					intNextMonth = parseInt(intThisMonth) + 1;
					break;
		}

		NowThisYear = datToday.getFullYear();										// ÇöÀç ³â
		NowThisMonth = datToday.getMonth()+1;										// ÇöÀç ¿ù
		NowThisDay = datToday.getDate();											// ÇöÀç ÀÏ

		datFirstDay = new Date(intThisYear, intThisMonth-1, 1);						// ÇöÀç ´ÞÀÇ 1ÀÏ·Î ³¯ÀÚ °´Ã¼ »ý¼º(¿ùÀº 0ºÎÅÍ 11±îÁöÀÇ Á¤¼ö(1¿ùºÎÅÍ 12¿ù))
		intFirstWeekday = datFirstDay.getDay();										// ÇöÀç ´Þ 1ÀÏÀÇ ¿äÀÏÀ» ±¸ÇÔ (0:ÀÏ¿äÀÏ, 1:¿ù¿äÀÏ)

		intSecondWeekday = intFirstWeekday;
		intThirdWeekday = intFirstWeekday;

		datThisDay = new Date(intThisYear, intThisMonth, intThisDay);				// ³Ñ¾î¿Â °ªÀÇ ³¯ÀÚ »ý¼º
		intThisWeekday = datThisDay.getDay();										// ³Ñ¾î¿Â ³¯ÀÚÀÇ ÁÖ ¿äÀÏ

		varThisWeekday = Weekday_name[intThisWeekday];								// ÇöÀç ¿äÀÏ ÀúÀå

		intPrintDay = 1																// ´ÞÀÇ ½ÃÀÛ ÀÏÀÚ
		secondPrintDay = 1
		thirdPrintDay = 1

		Stop_Flag = 0

		if ((intThisYear % 4)==0) {													// 4³â¸¶´Ù 1¹øÀÌ¸é (»ç·Î³ª´©¾î ¶³¾îÁö¸é)
			if ((intThisYear % 100) == 0) {
				if ((intThisYear % 400) == 0) {
					Months_day[2] = 29;
				}
			} else {
				Months_day[2] = 29;
			}
		}
		intLastDay = Months_day[intThisMonth];										// ¸¶Áö¸· ÀÏÀÚ ±¸ÇÔ
		Stop_flag = 0

		Cal_HTML = "" +
				"<table class='calendarLayer' style='border-width:1px;border-style:solid;'>" +
				"<tr>" +
				"<td>" +
				"	<table width='100%' border='0' cellpadding='0' cellspacing='0' onmouseover='javascript:Calendar.doOver(event);' onmouseout='javascript:Calendar.doOut(event);' style='font-size:8pt;font-family:Tahoma;'>" +
				"	<tr align='center'>" +
				"	<td colspan='7' nowrap='nowrap' align='center'>" +
				"		<span title='Àü¿ù' style='cursor:pointer;' onClick='javascript:Calendar.Show_cal("+intPrevYear+","+intPrevMonth+",1);'><img src='/image/common/scrap_btn_premonth.gif' align='absmiddle' /></span> " +
				"		<b style='color:#000000'>"+ intThisYear +". "+ intThisMonth +"</b>" +
				"		<span title='Â÷¿ù' style='cursor:pointer;' onClick='javascript:Calendar.Show_cal("+intNextYear+","+intNextMonth+",1);'><img src='/image/common/scrap_btn_nextmonth.gif' align='absmiddle' /></span>" +
				"	</td>" +
				"	</tr>" +
				"	<tr><td height='2'></td></tr>" +
				"	<tr align='center' bgcolor='ThreedFace' style='color:White;font-weight:bold;color:#000000;'>" +
				"	<td>ÀÏ</td>" +
				"	<td>¿ù</td>" +
				"	<td>È­</td>" +
				"	<td>¼ö</td>" +
				"	<td>¸ñ</td>" +
				"	<td>±Ý</td>" +
				"	<td>Åä</td>" +
				"</tr>";

		for (intLoopWeek=1; intLoopWeek < 7; intLoopWeek++) {						// ÁÖ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÃÖ´ë 6ÁÖ
			Cal_HTML += "<tr align='right' bgcolor='white'>"
			for (intLoopDay=1; intLoopDay <= 7; intLoopDay++) {						// ¿äÀÏ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÀÏ¿äÀÏ ºÎÅÍ
				if (intThirdWeekday > 0) {											// Ã¹ÁÖ ½ÃÀÛÀÏÀÌ 1º¸´Ù Å©¸é
					Cal_HTML += "<td onClick='javascript:Calendar.doClick(event);'>";
					intThirdWeekday--;
				}
				else {
					if (thirdPrintDay > intLastDay) {								// ÀÔ·Â ³¯Â¦ ¿ù¸»º¸´Ù Å©´Ù¸é
						Cal_HTML += "<td onClick='javascript:Calendar.doClick(event);'>";
					}
					else {														// ÀÔ·Â³¯Â¥°¡ ÇöÀç¿ù¿¡ ÇØ´ç µÇ¸é
						Cal_HTML += "<td onClick='javascript:Calendar.doClick(event);' title='"+intThisYear+"-"+this.day2(intThisMonth).toString()+"-"+this.day2(thirdPrintDay).toString()+"' style='cursor:pointer;border:1px solid white;";
						if (intThisYear == NowThisYear && intThisMonth==NowThisMonth && thirdPrintDay==intThisDay) {
							Cal_HTML += "background-color:cyan;";
						}

						switch(intLoopDay) {
							case 1:													// ÀÏ¿äÀÏÀÌ¸é »¡°£ »öÀ¸·Î
								Cal_HTML += "color:red;"
								break;
							case 7:
								Cal_HTML += "color:blue;"
								break;
							default:
								Cal_HTML += "color:black;"
								break;
						}

						Cal_HTML += "'>"+thirdPrintDay;

					}
					thirdPrintDay++;

					if (thirdPrintDay > intLastDay) {								// ¸¸¾à ³¯Â¥ °ªÀÌ ¿ù¸» °ªº¸´Ù Å©¸é ·çÇÁ¹® Å»Ãâ
						Stop_Flag = 1;
					}
				}
				Cal_HTML += "&nbsp;</td>";
			}
			Cal_HTML += "</tr>";
			if (Stop_Flag==1) break;
		}
		Cal_HTML += "</table></td><tr></table>";

		$('calendarLayer').innerHTML = Cal_HTML;
	}
}
document.write("<div id='calendarLayer' oncontextmenu='return false' ondragstart='return false' onselectstart='return false' style='display:none;width:160px;position:absolute; z-index: 200'></div>");



var getCalendar = {
	'target' : '',
	'eldefine' : function (mEvent) {
		this.el = (Prototype.Browser.IE == true) ? mEvent.srcElement : mEvent.target
	},
	'Calendar' : function (obj,toObj) {
		var now = obj.value.split("-");
		var x, y;
		this.stime;
		this.toObj = toObj;

		this.target = obj;																// Object ÀúÀå;

		x = (document.layers) ? loc.pageX : obj.offsetLeft;
		y = (document.layers) ? loc.pageY : obj.offsetTop;
		while((obj = obj.offsetParent) != null){
			x += obj.offsetLeft;
			y += obj.offsetTop;
		}
		$(this.toObj).style.top = y+20 + 'px';
		$(this.toObj).style.left = x-50 + 'px';
		$(this.toObj).style.display = ($(this.toObj).style.display == "block") ? "none" : "block";

		if (now.length == 3) {														// Á¤È®ÇÑÁö °Ë»ç
			this.Show_cal(now[0],now[1],now[2]);											// ³Ñ¾î¿Â °ªÀ» ³â¿ùÀÏ·Î ºÐ¸®
		}
		else {
			now = new Date();
			this.Show_cal(now.getFullYear(), now.getMonth()+1, now.getDate());			// ÇöÀç ³â/¿ù/ÀÏÀ» ¼³Á¤ÇÏ¿© ³Ñ±è.
		}
	},
	'doOver' : function (mEvent) {
		this.eldefine(mEvent);
		var cal_Day = this.el.title;

		if (cal_Day.length > 7) {													// ³¯ÀÚ °ªÀÌ ÀÖÀ¸¸é.
			this.el.style.borderTopColor = this.el.style.borderLeftColor = "buttonhighlight";
			this.el.style.borderRightColor = this.el.style.borderBottomColor = "buttonshadow";
		}
		window.clearTimeout(this.stime);
	},
	'doClick' : function (mEvent,toObj) {
		this.toObj = toObj
		this.eldefine(mEvent);
		cal_Day = this.el.title;
		this.el.style.borderColor = "red";							// Å×µÎ¸® »öÀ» »¡°£»öÀ¸·Î
		if (cal_Day.length > 7) {													// ³¯ÀÚ °ªÀÌÀÖÀ¸¸é
			this.target.value=cal_Day													// °ª ¼³Á¤
		}
	},
	'doOut' : function (mEvent) {
		this.eldefine(mEvent);
		cal_Day = this.el.title;
		if (cal_Day.length > 7) {
			this.el.style.borderColor = "white";
		}
	},
	'day2' : function (d) {
		return (parseInt(d) < 10) ? "0" + parseInt(d) : "" + parseInt(d) ;
	},
	'Show_cal' : function (sYear,sMonth,sDay) {
		var Months_day = new Array(0,31,28,31,30,31,30,31,31,30,31,30,31)
		var Weekday_name = new Array("ÀÏ", "¿ù", "È­", "¼ö", "¸ñ", "±Ý", "Åä");
		var intThisYear = new Number(), intThisMonth = new Number(), intThisDay = new Number();
		$(this.toObj).innerHTML = "";
		datToday = new Date();													// ÇöÀç ³¯ÀÚ ¼³Á¤

		intThisYear = parseInt(sYear);
		intThisMonth = parseInt(sMonth);
		intThisDay = parseInt(sDay);

		if (intThisYear == 0) intThisYear = datToday.getFullYear();				// °ªÀÌ ¾øÀ» °æ¿ì
		if (intThisMonth == 0) intThisMonth = parseInt(datToday.getMonth())+1;	// ¿ù °ªÀº ½ÇÁ¦°ª º¸´Ù -1 ÇÑ °ªÀÌ µÅµ¹·Á Áø´Ù.
		if (intThisDay == 0) intThisDay = datToday.getDate();

		switch(intThisMonth) {
			case 1:
					intPrevYear = intThisYear -1;
					intPrevMonth = 12;
					intNextYear = intThisYear;
					intNextMonth = 2;
					break;
			case 12:
					intPrevYear = intThisYear;
					intPrevMonth = 11;
					intNextYear = intThisYear + 1;
					intNextMonth = 1;
					break;
			default:
					intPrevYear = intThisYear;
					intPrevMonth = parseInt(intThisMonth) - 1;
					intNextYear = intThisYear;
					intNextMonth = parseInt(intThisMonth) + 1;
					break;
		}

		NowThisYear = datToday.getFullYear();										// ÇöÀç ³â
		NowThisMonth = datToday.getMonth()+1;										// ÇöÀç ¿ù
		NowThisDay = datToday.getDate();											// ÇöÀç ÀÏ

		datFirstDay = new Date(intThisYear, intThisMonth-1, 1);						// ÇöÀç ´ÞÀÇ 1ÀÏ·Î ³¯ÀÚ °´Ã¼ »ý¼º(¿ùÀº 0ºÎÅÍ 11±îÁöÀÇ Á¤¼ö(1¿ùºÎÅÍ 12¿ù))
		intFirstWeekday = datFirstDay.getDay();										// ÇöÀç ´Þ 1ÀÏÀÇ ¿äÀÏÀ» ±¸ÇÔ (0:ÀÏ¿äÀÏ, 1:¿ù¿äÀÏ)

		intSecondWeekday = intFirstWeekday;
		intThirdWeekday = intFirstWeekday;

		datThisDay = new Date(intThisYear, intThisMonth, intThisDay);				// ³Ñ¾î¿Â °ªÀÇ ³¯ÀÚ »ý¼º
		intThisWeekday = datThisDay.getDay();										// ³Ñ¾î¿Â ³¯ÀÚÀÇ ÁÖ ¿äÀÏ

		varThisWeekday = Weekday_name[intThisWeekday];								// ÇöÀç ¿äÀÏ ÀúÀå

		intPrintDay = 1																// ´ÞÀÇ ½ÃÀÛ ÀÏÀÚ
		secondPrintDay = 1
		thirdPrintDay = 1

		Stop_Flag = 0

		if ((intThisYear % 4)==0) {													// 4³â¸¶´Ù 1¹øÀÌ¸é (»ç·Î³ª´©¾î ¶³¾îÁö¸é)
			if ((intThisYear % 100) == 0) {
				if ((intThisYear % 400) == 0) {
					Months_day[2] = 29;
				}
			} else {
				Months_day[2] = 29;
			}
		}
		intLastDay = Months_day[intThisMonth];										// ¸¶Áö¸· ÀÏÀÚ ±¸ÇÔ
		var Stop_flag = 0

		Cal_HTML = "" +
				"<table class='calendarLayer'>" +
				"<tr>" +
				"<td>" +
				"	<table width='100%' border='0' cellpadding='0' cellspacing='0' onmouseover='javascript:getCalendar.doOver(event);' onmouseout='javascript:getCalendar.doOut(event);' style='font-size:8pt;'>" +
				"	<tr align='center'>" +
				"	<td colspan='7' nowrap='nowrap' align='center'>" +
				"		<span title='Àü¿ù' style='cursor:pointer;' onClick='javascript:getCalendar.Show_cal("+intPrevYear+","+intPrevMonth+",1);'><img src='/image/common/scrap_btn_premonth.gif' align='absmiddle' /></span> " +
				"		<b style='color:#000000'>"+ intThisYear +". "+ intThisMonth +"</b>" +
				"		<span title='Â÷¿ù' style='cursor:pointer;' onClick='getCalendar.Show_cal("+intNextYear+","+intNextMonth+",1);'><img src='/image/common/scrap_btn_nextmonth.gif' align='absmiddle' /></span>" +
				"	</td>" +
				"	</tr>" +
				"	<tr><td height='2'></td></tr>";
		for (intLoopWeek=1; intLoopWeek < 7; intLoopWeek++) { // ÁÖ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÃÖ´ë 6ÁÖ
			Cal_HTML += "<tr align='right' bgcolor='white'>"
			for (intLoopDay=1; intLoopDay <= 7; intLoopDay++) { // ¿äÀÏ´ÜÀ§ ·çÇÁ ½ÃÀÛ, ÀÏ¿äÀÏ ºÎÅÍ
				if (intThirdWeekday > 0) { // Ã¹ÁÖ ½ÃÀÛÀÏÀÌ 1º¸´Ù Å©¸é
					Cal_HTML += "<td onClick=\"javascript:getCalendar.doClick(event,'" + this.toObj + "');\">";
					intThirdWeekday--;
				}
				else {
					if (thirdPrintDay > intLastDay) {	 // ÀÔ·Â ³¯Â¦ ¿ù¸»º¸´Ù Å©´Ù¸é
						Cal_HTML += "<td onClick=\"javascript:getCalendar.doClick(event,'" + this.toObj + "');\">";
					}
					else { // ÀÔ·Â³¯Â¥°¡ ÇöÀç¿ù¿¡ ÇØ´ç µÇ¸é
						Cal_HTML += "<td onClick=\"javascript:getCalendar.doClick(event,'" + this.toObj + "');\" title='"+intThisYear+"-"+this.day2(intThisMonth).toString()+"-"+this.day2(thirdPrintDay).toString()+"' style='cursor:pointer;border:1px solid white;";
						if (intThisYear == NowThisYear && intThisMonth==NowThisMonth && thirdPrintDay==intThisDay) {
							Cal_HTML += "background-color:#FFFC26;";
						}

						switch(intLoopDay) {
							case 1: // ÀÏ¿äÀÏÀÌ¸é »¡°£ »öÀ¸·Î
								Cal_HTML += "color:red;"
							break;
							case 7:
								Cal_HTML += "color:blue;"
							break;
							default:
								Cal_HTML += "color:black;"
							break;
						}
						Cal_HTML += "'>"+thirdPrintDay;

					}
					thirdPrintDay++;

					if (thirdPrintDay > intLastDay) {	 // ¸¸¾à ³¯Â¥ °ªÀÌ ¿ù¸» °ªº¸´Ù Å©¸é ·çÇÁ¹® Å»Ãâ
						Stop_Flag = 1;
					}
				}
				Cal_HTML += "&nbsp;</td>";
			}
			Cal_HTML += "</tr>";
			if (Stop_Flag==1) break;
		}
		Cal_HTML += "</table></td><tr></table>";

		$(this.toObj).innerHTML = Cal_HTML;
	}
}



// IE Àü¿ë ÇÔ¼ö Layer ³»ÀÇ °´Ã¼¸¦ ±×´ë·Î º¹»ç
function getSelectObj(fObj) {
	//var tmpObj = document.getElementById(id);
	//var doc = document.body.createTextRange();
	//doc.moveToElementText(tmpObj);
	//doc.select();
	//doc.execCommand('copy');

	for (i=0; i<document.all.length; i++) {
		document.all(i).unselectable = "on";
	}
	$(fObj).contentEditable = "true"
	$(fObj).unselectable = "off";
	$(fObj).focus();

	document.execCommand('SelectAll', true, null);
	document.execCommand('Copy', true, null);
	document.execCommand('Unselect', true, null);

	$(fObj).contentEditable = "false";
	for (i=0; i<document.all.length; i++) {
		document.all(i).unselectable = "off";
	}
	window.alert('º¹»ç°¡ µÇ¾ú½À´Ï´Ù.');
}
// IE Àü¿ë ÇÔ¼ö Layer ³»ÀÇ ¼Ò½º¸¦ ±×´ë·Î º¹»ç
function getSelectSource(fObj) {
	window.clipboardData.setData('Text', $(fObj).innerHTML);
	window.alert('º¹»ç°¡ µÇ¾ú½À´Ï´Ù.');
}



function checkLoginCaem() {
	if ($('id').value == '') {
		return formChkObj.returnFalseForm('id','½Ð¿é¤J±b¸¹');
	}
	if ($('pwd').value == '') {
		return formChkObj.returnFalseForm('pwd','½Ð¿é¤J±K½X');
	}
}
function checkLoginAnycall() {
	if ($('anycall_id').value == '') {
		return formChkObj.returnFalseForm('anycall_id','¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.');
	}
	if ($('anycall_pw').value == '') {
		return formChkObj.returnFalseForm('anycall_pw','ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.');
	}
}
function ctrLoginForm (fObj) {
	if (fObj == 'loginFormCaem') {
		$('loginFormCaem').style.display = 'block';
		$('loginFormAnycall').style.display = 'none';
	}
	else {
		$('loginFormCaem').style.display = 'none';
		$('loginFormAnycall').style.display = 'block';
	}
}



// object,embed Å×±× °ü·Ã ¼öÁ¤.
function InsertObject(strd) {
	document.write(strd);
}
function pw_find() {
	var urlname = "/member/pwfind.asp";
	window.open(urlname, "browse_org","height=270, width=401, menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
}

function gameStart1() {
	var ntWin;
	ntWin = window.open("/inc/yh_loginCheck_mall.asp?url=/yh_gamestart.asp","yh_gamestart","top=0,left=0,width=800,height=500, menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
}
function gameStart2() {
	window.open("/inc/yh_loginCheck.asp?url=/input_jumin2.asp","yh_gamestart","top=0,left=0,width=800,height=500 menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
}
function gameStart3() {
    window.open("/inc/yh_loginCheck.asp?url=/input_jumin2.asp","yh_gamestart","top=0,left=0,width=800,height=500 menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
}
function gameStartAnycall() {
    window.open("/yh_gameStart.asp","yh_gamestart","top=0,left=0,width=800,height=500 menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
}







<!--
// JavaScript.js
// ÁÖ¼Ò¿¡ Äõ¸®¹®À» ³ÖÀ¸¸é ¸ÞÀÎÀ¸·Î º¸³»¹ö¸°´Ù
function urlParse() {
	var checkURL = document.URL; // URL °®±¸¿À±â
	cURL = checkURL.toLowerCase(); //´ë¹®ÀÚ·Î ÀÔ·ÂÇØµµ ¼Ò¹®ÀÚ·Î ¹Ù²Û´Ù

	checkLen1 = cURL.indexOf('from'); // Äõ¸®¹® Æ÷ÇÔÇÏ´Â ¹®ÀÚ¿­ °ª ¹ÝÈ¯
	checkLen2 = cURL.indexOf('select');
	checkLen3 = cURL.indexOf('delete');
	checkLen4 = cURL.indexOf('update');
	checkLen5 = cURL.indexOf('set');

	if (checkLen1 != -1) {
		if (checkLen2 != -1) {
			location.href = "/main.html"
		} else if (checkLen3 != -1) {
			location.href = "/main.html"
		}
	}

	if (checkLen4 != -1) {
		if (checkLen5 != -1) {
			location.href = "/main.html"
		}
	}
}

urlParse();

//OSTµè±â ÆË¾÷
function music_play(music_num) {
	var ntWin;
	Murl = "/download/music_play.asp?music_num=" + music_num
	//ntWin = window.open(Murl,"OST","fullscreen=no,scrollbars=no,width=290,height=150");
	alert('«Øºc¤¤');
}

//¼ýÀÚ¸¸ ÀÔ·ÂµÇ°Ô
function inputNumber() {
	if (event.keyCode < 48 || event.keyCode > 57 ) {
		event.returnValue = false;
	}
}

//Row¿¡ MouseOver½Ã
function func_MouseOver(obj, bgcolor) {
	obj.bgColor = bgcolor;
}

//Row¿¡ MouseOut½Ã
function func_MouseOut(obj, bgcolor) {
	obj.bgColor = bgcolor;
}

//ÀÌº¥Æ® ÁÂÇ¥ ÀúÀåÇÏ±â...
xpos	= 0;
ypos	= 0;
function setPosition(e) {
	if(document.layers) {
		xpos = e.pageX;
		ypos = e.pageY;
	}
	else {
		xpos = event.clientX + document.body.scrollLeft;
		ypos = event.clientY + document.body.scrollTop;
	}
}

//ID/ºñ¹Ð¹øÈ£ È®ÀÎÆû º¸¿©ÁÖ±â
var confirmFlag	= false;
function go_ConfirmForm(flag) {
	var frm = document.MyForm;
	var frm1= document.all;
	if (flag != "") {
		if (confirmFlag == false) {
			frm1.confirmLayer.style.display	= "";
			frm1.confirmLayer.style.top		= ypos - 100;
			frm1.confirmLayer.style.left	= xpos - 75;
			frm.confirm_flag.value					= flag;
			frm1.confirmLayer.style.height			= 55;
			frm1.confirmTrLayer_pswd.style.display	= "";
			frm.pswd.disabled	= false;
			frm.pswd.focus();
			confirmFlag = true;
		}
		else {
			frm1.confirmLayer.style.display			= "none";
			frm.confirm_flag.value					= "";
			frm1.confirmTrLayer_pswd.style.display	= "none";
			frm.pswd.disabled	= true;
			confirmFlag	= false;
		}
	}
	else {
		frm1.confirmLayer.style.display			= "none";
		frm.confirm_flag.value					= "";
		frm1.confirmTrLayer_pswd.style.display	= "none";
		frm.pswd.disabled	= true;
		confirmFlag	= false;
	}
}

// object,embed Å×±× °ü·Ã ¼öÁ¤.
function InsertObject(strd) {
	document.write(strd);
}



function gameStart() {
	var ntWin;
	ntWin = window.open("/inc/yh_loginCheck_mall.asp?url=/yh_gamestart.asp","yh_gamestart","top=0,left=0,fullscreen=no,scrollbars=no,width=800,height=500");
}

//½Ç¸í ÀÎÁõ
function gameStart1() {
	url="/inc/yh_loginCheck.asp?url=/input_jumin_game.asp?gubun=2";
	//url = "/inc/yh_loginCheck_mall.asp?url=/input_jumin_game.asp?gubun=2";
	window.open(url,'','width=800,height=500,top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}

//°ÔÀÓ À¥½ÇÇà ÆäÀÌÁö ¿­±â
function gameStart2() {
	var ntWin;
	ntWin = window.open("/inc/yh_loginCheck_mall.asp?url=/yh_gamestart.asp","yh_gamestart","top=0,left=0,fullscreen=no,scrollbars=no,width=800,height=500");
}

function gameStart3() {
	window.open("/inc/yh_loginCheck.asp?url=/input_jumin2.asp","yh_gamestart","top=0,left=0,width=800,height=500 menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
	//alert("Ä«¸£Æäµð¿¥¿¡ ¿À½Å °ÍÀ» È¯¿µÇÕ´Ï´Ù.");
}

function login() {
	if(login_frm.id.value=="") {
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä..");
		login_frm.id.focus();
		return false;
	}
	if(login_frm.pwd.value=="") {
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä..");
		login_frm.pwd.focus();
		return false;
	}
	document.login_frm.submit();
}

function pw_find() {
	var urlname = "/member/pwfind.asp";
	window.open(urlname, "browse_org","height=270, width=401, menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
}

function member_out(id) {
	var userid = id;
	var urlname = "/member/member_out.asp?userid='"+userid+"'";
	window.open(urlname, "browse_org","height=270,width=401, menubar=no,directories=no,resizable=no,status=no,scrollbars=no");
}

function MM_openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}

//ÃæÀüÇÏ±â ÆË¾÷
function pay_charge() {
	w = 500;
	h = 400;
	var cnj_left = (screen.width-w) / 2;
	var cnj_top = (screen.height-h) / 2;
	url="/itemmall/login_flag2.asp";
	window.open(url,'','width=500,height=400,top='+cnj_top+',left='+cnj_left+',marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	//alert("ÃæÀüÀ» ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
}

//¾ßÈÄ ÃæÀüÇÏ±â ÆË¾÷
function pay_charge_yh() {
	w = 800;
	h = 500;
	var cnj_left = (screen.width-w) / 2;
	var cnj_top = (screen.height-h) / 2;
	url="/inc/yh_loginCheck_mall.asp?url=/itemmall/login_flag2.asp";
	window.open(url,'charge','width=800,height=500,top='+cnj_top+',left='+cnj_left+',marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	//alert("ÃæÀüÀ» ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
}

//¾ÆÀÌÅÛ±¸¸ÅÇÏ±â ÆË¾÷
function pay_pop(url) {
	//alert("¾ÆÀÌÅÛÀ» ±¸¸ÅÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
	window.open(url,'','width=412,height=330,top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
}

//¾ßÈÄÈ¸¿ø ¾ÆÀÌÅÛ±¸¸ÅÇÏ±â ÆË¾÷
function pay_pop_yh(url1) {
	var fCookie = getCookie('gnicookie');
	if (fCookie.indexOf("isAnycall=Y") == -1) { // ¾Ö´ÏÄÝ È¸¿øÀÌ ¾Æ´Ï¶ó¸é
		w = 800;
		h = 500;
		var cnj_left = (screen.width-w) / 2;
		var cnj_top = (screen.height-h) / 2;
		var url="/inc/yh_loginCheck_mall.asp?url=" + url1;
		window.open(url,'pay_pop','width=800,height=500,top='+cnj_top+',left='+cnj_left+',marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	}
	else {
		window.open(url1,'','width=412,height=330,top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	}
	//alert("¾ÆÀÌÅÛÀ» ±¸¸ÅÇÏ½Ç ¼ö ¾ø½À´Ï´Ù."+ url);
}

//¾ÆÀÌÅÛ¸ô ¸·±â ÀÓ½Ã
function close_itemmall() {
	alert("¾ÆÀÌÅÛ¸ô ¾÷µ¥ÀÌÆ® °ü°è·Î 30ºÐ°£ Á¢¼ÓÀ» ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
	location.href="<%=UrlHttp%>";
}
//close_itemmall();
//-->



// main.asp
function jumin_pop() {
	url = "/input_jumin.asp";
	window.open(url,'','width=286,height=186,top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}

//ÀÚ¼¼È÷º¸±â ÆË¾÷(ÀÏ¹Ý¾ÆÀÌÅÛ)
function more_pop(d) {
	url = "/itemmall/item_more.asp?id_x="+d;
	window.open(url,'','width=400,height=420,top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}

//ÀÚ¼¼È÷º¸±â ÆË¾÷(½ºÅ²¾ÆÀÌÅÛ)
function more_pop2(d) {
	url = "/itemmall/item_moreSkin.asp?id_x="+d;
	window.open(url,'','width=466,height=630,top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
}

//ÃßÃµ¼ö ÆË¾÷¶ç¿ì±â
function Recom() {
	window.open('/event/050415/pop_votelist.asp','recommend',"width=316,height=200,scrollbars=yes");
}

function vote_input(f) {
	var collection;
	var i;
	var string;

	collection = document.f_research.ans;

	for (i=0;i<collection.length;i++) {
		if (collection[i].checked) {
			window.open("vote_input.asp?rs_id="+f+"&ans="+collection[i].value, "vote","width=382,height=357");
 			return;
		}
	}
	alert("ÅõÇ¥ÇØÁÖ¼¼¿©~");
}


function vote_result(f){
	window.open("vote_result.asp?idx="+f, "vote","width=382,height=357");
 	return;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// ÄíÅ°Á¤º¸ °¡Á®¿À±â
function getCookie(strName)
{
	var strArg = new String(strName + "=");
	var nArgLen, nCookieLen, nEnd;
	var i = 0, j;

	nArgLen    = strArg.length;
	nCookieLen = document.cookie.length;

	if(nCookieLen > 0) {
		while(i < nCookieLen) {
			j = i + nArgLen;
			if(document.cookie.substring(i, j) == strArg) {
				nEnd = document.cookie.indexOf (";", j);
				if(nEnd == -1) nEnd = document.cookie.length;
				return unescape(document.cookie.substring(j, nEnd));
			}
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
	}
	return("");
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function pop_hold(a) {
	if (a == "no") {
		document.location.href = "/itemmall/item_myhold.asp";
	}
	else{
		url = "/itemmall/item_hold_check.asp"
		window.open(url,'','width=400,height=575,top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}
}

function pop_present(a) {
	if (a == "no") {
		document.location.href = "<%=UrlHttps%>/itemmall/item_present_receive.asp";
	}
	else {
		url = "<%=UrlHttps%>/itemmall/item_present_check.asp"
		window.open(url,'','width=400,height=575,top=0,left=0,marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}
}

//2008/8/27
//for member join
function intcheckjoin()
{
	if((event.keyCode<48)||((event.keyCode>57)&&(event.keyCode<97))||(event.keyCode>122)){event.returnValue=false;}
}
//CHECK - use join page
function onlyNumEng(){
	if((event.keyCode<48)||((event.keyCode>=58)&&(event.keyCode<=64))||((event.keyCode>=91)&&(event.keyCode<=96))||(event.keyCode>122)){event.returnValue=false;}
}

function intcheckJO(sval)
{
	var i = 0;
	for(m=0;m<sval.length;m++){
		if((sval.charCodeAt(m)<48)||((sval.charCodeAt(m)>57)&&(sval.charCodeAt(m)<65))||((sval.charCodeAt(m)>90)&&(sval.charCodeAt(m)<97))||(sval.charCodeAt(m)>122)){i++;}
	}
	if ( i > 0 ){	return true	;}
	else{	return false	;}

}

function intcheckTF(sval){
	var i = 0;
	for(m=0;m<sval.length;m++){
		if((sval.charCodeAt(m)==37)){i++;}
		if((sval.charCodeAt(m)==39)){i++;}
		if((sval.charCodeAt(m)==59)){i++;}
		if((sval.charCodeAt(m)==61)){i++;}
	}
	if ( i > 0 ){	return true	;}
	else{	return false	;}

}

function intcheck(){
if((event.keyCode==34)){event.returnValue=false;}
if((event.keyCode==37)){event.returnValue=false;}
if((event.keyCode==39)){event.returnValue=false;}
if((event.keyCode==59)){event.returnValue=false;}
if((event.keyCode==61)){event.returnValue=false;}
if((event.keyCode==45)){event.returnValue=false;}
}

function isInt(x) 
{
   var y=parseInt(x);
   if (isNaN(y)) return false;
   return x==y && x.toString()==y.toString();
} 

function OnlyTaiwanCharCount(val) 
{
	var tmp_val = val;
	var charCnt = 0;

	for (i=0 ; i<tmp_val.length ; i++ ){
		if (tmp_val.charCodeAt(i) != 32)
		{
			if (!( ( tmp_val.charCodeAt(i) >= 65 ) && ( tmp_val.charCodeAt(i) <= 122 ) )) {	// alphabet
				if (!( ( tmp_val.charCodeAt(i) >= 0x30 ) && ( tmp_val.charCodeAt(i) <= 0x39 ) )) { //number
					if (! ((tmp_val.charCodeAt(i) > 0x3130 && tmp_val.charCodeAt(i) < 0x318F) || (tmp_val.charCodeAt(i) >= 0xAC00 && tmp_val.charCodeAt(i) <= 0xD7A3)) )	// hangul
					{
						if(! (( tmp_val.charCodeAt(i) >= 65281 ) && ( tmp_val.charCodeAt(i) <= 65374 )) )
						{
							charCnt = charCnt + 1;
						}
					}
				}
			}
		}
	}
	return charCnt;
}

function Only2ByteCheck( szValue)
{
  var tmpStr = new String(szValue);
  var temp = tmpStr.length;

  var onechar;
  for ( k=0; k<temp; k++ )
  {
    onechar = tmpStr.charAt(k);
    if ( !(escape(onechar).length > 4))
    {
    	//1 Byte
		return true;
    }
  }

	return false;
}

function Only2ByteInput(){
	if(event.keyCode>=33&&event.keyCode<=126){event.returnValue=false;}
 	//if((event.keyCode >= 12592) && (event.keyCode <= 12687))	{ event.returnValue = false;}

}

function NoTaiwanCharCount(val) {
	var tmp_name = val;
	var charCnt = 0;
	//alert(tmp_name.length);
	for (i=0 ; i<tmp_name.length ; i++ ){
		//alert(i+"//"+tmp_name.charCodeAt(i));	
		if ( ( tmp_name.charCodeAt(i) >= 65 ) && ( tmp_name.charCodeAt(i) <= 122 ) ) 	// alphabet
		{	charCnt = charCnt + 1;}
		else if ( ( tmp_name.charCodeAt(i) >= 0x30 ) && ( tmp_name.charCodeAt(i) <= 0x39 ) )	//number
		{	charCnt = charCnt + 1;}
		else if( ((tmp_name.charCodeAt(i) > 0x3130 && tmp_name.charCodeAt(i) < 0x318F) || (tmp_name.charCodeAt(i) >= 0xAC00 && tmp_name.charCodeAt(i) <= 0xD7A3)) )	// hangul
		{	charCnt = charCnt + 1;}
		else if( ( tmp_name.charCodeAt(i) >= 65281 ) && ( tmp_name.charCodeAt(i) <= 65374 ) )	// full alphabet(korea key + 65248)
		{	charCnt = charCnt + 1;}
	}
	return charCnt;
}


function Fun_NumberChk(a)
{
	var strAll = "1234567890";
	    
	for (i=0; i < a.length; i++)
	{
		if(strAll.indexOf(a.substring(i,i+1))<0)
		{
			//No Number
			return false;
		}
	}
	return true;
}

//CHECK - only number 
function only_number()
{
	if((event.keyCode<48)||(event.keyCode>57))
	event.returnValue=false;
}
//
//==============================================================
//ºô§}¡G http://cpatch.org/unicode/
//--------------------------------------------------------------
//¥»µ{¦¡¬°¦Û¥Ñ³nÅé¡C¥ô¦ó¤H±o¦r«¬¦w¸Ë¡B½Æ»s¡B´²§G¥»³nÅé¡C±©¤£±o§ï
//ÅÜ®M¥ó¤º®e¤§§¹¾ã¡C¥ç¤£±o¥H¥»®M¥ó¶i¦æ³c½æ¡B¥X¯²©Î¨ä¥Lª½±µ©Î¶¡±µ
//Àç§Q¤§¦æ¬°¡C
//
// Program written by HO        (http://cpatch.org/unicode/)
//        *b5jpcovt by Tim      (http://timc.idv.tw/htmlfx/)
// Copyright (C) 2003

var table = new Array(256);
table[0] = [65535,65535,65535,65535,65535,65535,65535,65535,1,0,59374,1983,65535,65535,65535,65535,];
table[1] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[2] = [0,0,0,0,0,0,0,0,0,0,0,0,11904,512,0,0,];
table[3] = [32,0,0,0,0,0,0,0,0,65534,1019,65534,1019,0,0,0,];
table[4] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[5] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[6] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[7] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[8] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[9] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[10] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[11] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[12] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[13] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[14] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[15] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[16] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[17] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[18] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[19] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[20] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[21] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[22] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[23] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[24] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[25] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[26] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[27] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[28] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[29] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[30] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[31] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[32] = [0,13176,244,18476,0,0,0,0,0,0,4096,0,0,0,0,0,];
table[33] = [552,0,0,0,0,0,1023,0,0,975,0,0,0,0,0,0,];
table[34] = [0,50528,20009,48,0,4,203,0,0,544,32,32768,0,0,0,0,];
table[35] = [128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[36] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[37] = [4101,4369,4112,4112,0,65535,65535,31,65534,56,3,12300,51392,0,60,0,];
table[38] = [608,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,];
table[39] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[40] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[41] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[42] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[43] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[44] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[45] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[46] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[47] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[48] = [65295,28727,1022,1,0,0,0,0,0,0,0,0,0,0,0,0,];
table[49] = [65504,65535,1023,0,0,0,0,0,0,65532,0,0,0,0,0,0,];
table[50] = [0,0,65535,65535,15,0,0,0,65535,65535,65535,1,0,0,0,0,];
table[51] = [0,0,0,0,0,0,0,0,49152,28672,2,0,16400,38,0,0,];
table[52] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[53] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[54] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[55] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[56] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[57] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[58] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[59] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[60] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[61] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[62] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[63] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[64] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[65] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[66] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[67] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[68] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[69] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[70] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[71] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[72] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[73] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[74] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[75] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[76] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[77] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[78] = [65419,50035,26688,6927,59820,62284,512,49160,31068,51774,31094,1608,12255,63472,826,43263,];
table[79] = [61239,9023,45060,64857,62410,65535,56991,65529,44031,32247,49152,36588,61119,65499,53251,17914,];
table[80] = [64225,57342,49135,4267,65515,64682,61247,9469,30893,32630,61452,60927,53238,11514,63481,60267,];
table[81] = [8189,38335,26231,49087,15355,65204,31662,4578,42625,16830,5173,29379,32112,29073,3,10091,];
table[82] = [22475,28879,18226,3567,32474,64628,65030,48564,16287,35786,32329,22528,8847,60396,35420,56763,];
table[83] = [61280,46823,41999,62099,14267,21662,53323,39855,50196,63444,12464,2580,12040,35024,65406,6447,];
table[84] = [65498,64263,32753,31723,50671,16,39423,65023,31191,1383,65511,64971,50175,16448,28663,48526,];
table[85] = [57338,1175,62656,23551,60795,53479,1150,63712,65439,46910,32254,34862,65533,48767,33790,63172,];
table[86] = [62295,47357,54912,61309,22375,18312,65405,50143,61695,14249,32224,28924,16239,60570,19635,34433,];
table[87] = [16286,56668,63245,18457,65187,7,44886,14591,38925,61368,16445,46944,55502,36917,29375,16383,];
table[88] = [32759,31249,63419,44031,65280,28606,43324,65138,53231,61723,56171,64522,50150,61310,39836,62992,];
table[89] = [61512,5876,65205,20866,51121,5563,28295,64479,58431,25549,49663,32382,65003,32095,30587,64766,];
table[90] = [38411,56298,25129,21480,14303,65007,14069,48513,56344,64701,53988,65535,16343,65504,32623,45048,];
table[91] = [39854,28377,62971,61717,31145,48635,23100,44463,56250,8108,29180,33657,31991,50015,57343,1383,];
table[92] = [65434,33895,5428,57227,63987,13171,63421,24090,48960,41023,65535,491,57280,53213,29952,43987,];
table[93] = [63683,61142,17405,47103,24239,16935,39852,63110,10199,63164,63367,13751,43725,57718,18919,58015,];
table[94] = [21596,45042,11071,25048,64571,48056,65487,31613,49045,7392,32253,17407,24566,65534,54255,50382,];
table[95] = [36278,44476,25564,4587,57177,9168,48820,62427,8167,56263,65379,64228,45611,25591,60731,44474,];
table[96] = [65025,32511,65527,700,13055,61245,65532,32773,30715,48373,269,65527,65531,48954,87,57343,];
table[97] = [61307,48509,56200,51412,65523,60796,24046,22271,32269,44127,65430,54655,16366,49472,28665,65511,];
table[98] = [30619,36471,28351,58461,28623,24351,57471,65247,55259,510,65280,64379,65492,8159,63488,65535,];
table[99] = [64399,123,48896,32604,65535,2035,60320,15847,63423,64471,65471,24579,65533,49133,61371,639,];
table[100] = [65088,56829,65023,58105,26635,64287,64483,45053,40868,63469,31357,63503,61118,4053,47965,64927,];
table[101] = [62171,15353,65151,60364,34666,29690,38396,40956,4255,64247,56759,48077,63614,60621,62310,15423,];
table[102] = [65533,45119,59895,1662,38574,65030,54646,24535,16337,41971,52999,28599,40913,32580,31577,54237,];
table[103] = [44859,43453,32207,65338,64480,63211,46081,65535,31482,47039,49152,4093,65407,65311,65276,38399,];
table[104] = [0,46556,61283,16190,64383,27,59392,64502,40687,47327,65439,63,31696,62975,57307,16383,];
table[105] = [65008,191,33824,48061,57143,65502,65389,4083,24652,24315,65531,64251,65118,537,31220,63966,];
table[106] = [42999,60410,491,65332,60371,61299,45015,49216,29371,56575,61823,12248,47340,65035,56739,7947,];
table[107] = [36637,18383,45355,65502,32750,55923,9471,52164,63325,52210,60669,46317,49145,19933,39389,64397,];
table[108] = [47999,44923,56827,51545,64591,64181,45027,27999,65535,16253,30720,65499,46847,32511,64431,559,];
table[109] = [65435,61383,65445,65535,7,50944,63487,65521,32765,447,56320,64956,49141,65535,65407,16127,];
table[110] = [41,48640,63999,65407,28411,64894,52223,926,58112,64477,52479,63199,65535,4479,63488,64502,];
table[111] = [59375,55100,65263,57327,49163,60863,65247,64973,31733,16637,65535,46943,65503,63792,64479,56471,];
table[112] = [65267,49138,36831,57279,6015,60902,3967,13651,17532,34686,64018,17851,60896,30622,32791,49113,];
table[113] = [32341,56969,49519,1095,31454,63325,22527,10501,34551,65173,38835,62255,53247,40821,29175,64279,];
table[114] = [13550,60953,14284,61281,40918,61260,54927,64477,31603,28143,55294,42033,24191,38871,3931,65496,];
table[115] = [40323,31694,8940,56575,30269,61319,57319,65005,20479,41212,15223,56316,15853,32732,28585,62832,];
table[116] = [16379,11328,65407,33919,60503,57015,59036,61999,4075,54709,45035,60903,35887,65520,21375,59632,];
table[117] = [47517,46591,65382,59279,55681,48656,40060,58305,40145,10035,3260,65389,64695,61367,41183,65535,];
table[118] = [48907,65147,41983,13631,5068,38861,30263,64295,53206,32364,60496,60721,26492,64540,63226,24511,];
table[119] = [4026,44591,41901,32766,64752,56948,65519,61952,64447,65186,15791,48383,63124,24505,62381,16271,];
table[120] = [62060,40991,65519,447,30504,28677,65333,55811,54011,51194,16319,23581,65338,60467,47023,65180,];
table[121] = [21046,31391,49146,59170,40951,64767,12219,46621,60678,7677,32215,61407,60195,61798,32473,3520,];
table[122] = [15677,57279,51525,47747,32209,40400,31623,53107,40947,50165,57101,50686,3251,33538,59513,44736,];
table[123] = [51059,28431,64893,2367,65521,343,25339,511,64948,15347,45075,17330,24275,65328,4095,60319,];
table[124] = [65263,61955,16367,64393,14249,40601,57081,42796,14131,49654,33198,65086,23840,62199,54661,27095,];
table[125] = [65535,65535,56071,65391,50431,55679,61390,48655,61819,61534,63183,65463,24311,61316,55243,3807,];
table[126] = [65288,64767,60991,65535,5119,55295,44815,32765,48583,8186,0,0,0,0,0,0,];
table[127] = [0,0,0,59200,48440,63795,32747,65261,32744,31862,46071,65519,65199,55479,65391,64447,];
table[128] = [63739,56311,5970,58105,34248,30023,37008,58351,40692,16237,60974,1334,63420,32755,41083,32575,];
table[129] = [1383,60256,47806,26113,64728,22591,51959,34783,49101,65440,23501,65215,46845,61351,30703,57244,];
table[130] = [16311,63607,40231,47100,51893,57327,64346,61878,60473,61215,64447,32763,13,56062,48635,20095,];
table[131] = [13311,23232,49141,40958,65471,95,0,65016,65482,28669,53245,40961,57343,64498,57279,65407,];
table[132] = [65242,2063,47624,49151,31485,61143,64491,26617,57412,65427,57239,40791,65271,2271,57216,65247,];
table[133] = [65477,63486,65531,26627,26619,27642,32767,24546,65535,65395,34783,59387,60413,63399,49022,61383,];
table[134] = [7923,57218,30463,57214,31177,55933,61374,7835,31968,30715,34750,65531,7167,65499,16220,20448,];
table[135] = [32767,24334,30719,56767,61519,65535,65535,4088,41918,64991,64540,65533,8061,64414,48639,57052,];
table[136] = [16239,47867,57215,64495,32027,12012,44942,62199,31503,53230,7574,30662,65031,65525,55682,32735,];
table[137] = [24294,51199,65262,31215,39510,65487,65119,56926,35182,63976,62558,59076,1,48764,15231,56799,];
table[138] = [54685,59887,13484,56915,62835,19447,31567,40703,47358,18286,3579,65349,44029,64510,59863,56831,];
table[139] = [60919,32767,56829,32491,53223,47103,48617,61329,23925,55164,0,0,0,0,0,0,];
table[140] = [0,0,0,64128,65518,46321,49014,12271,46711,30655,40895,65533,38335,63150,30207,32571,];
table[141] = [42997,2809,0,0,0,0,64464,11229,63027,39551,64939,55036,63974,49131,57311,62495,];
table[142] = [42749,65535,19199,62331,32695,65273,46847,7516,32758,58879,8059,9220,48645,63902,56291,57330,];
table[143] = [28655,65023,54905,52220,60413,61439,31,0,0,38912,57672,32791,27252,254,28031,65009,];
table[144] = [47231,65267,57375,61814,61078,31551,60301,65533,44543,52147,34031,57727,19882,49136,48959,65087,];
table[145] = [60415,65495,65503,53119,65531,34285,55103,1980,44799,65039,64943,30399,64239,14267,32732,41914,];
table[146] = [46847,22263,24824,59359,65377,19679,45307,65349,32237,16378,8191,6908,65535,58287,51155,57219,];
table[147] = [64343,61309,61439,4984,65216,24567,13499,24291,63245,61430,55294,191,62877,63479,20958,65504,];
table[148] = [65225,895,24321,49135,40945,24743,61213,61951,15,0,0,0,0,0,0,0,];
table[149] = [0,0,0,0,0,0,0,15488,64333,55583,31546,65251,16361,56447,63,0,];
table[150] = [0,20480,62751,48647,64541,63771,48158,29183,28665,23486,22422,39707,32767,65532,34606,45031,];
table[151] = [60405,62287,57341,59173,3036,23876,22343,64989,60735,30608,32127,35528,64250,62457,8234,61259,];
table[152] = [62975,31183,43987,2981,63354,64399,36541,31,0,0,62208,64846,6743,34816,44716,30292,];
table[153] = [6061,52735,65458,62511,23466,56319,2,0,0,29632,63978,11839,64142,48127,30396,65491,];
table[154] = [61182,32370,32445,59383,63359,52989,4085,0,0,0,43264,56219,42183,37247,63690,32462,];
table[155] = [32122,51175,52157,56494,64894,36726,37331,31987,485,19503,60791,41824,2011,24312,7671,8577,];
table[156] = [27616,12444,15162,64222,32595,50165,25037,1978,0,0,0,0,0,0,9952,48894,];
table[157] = [1017,60341,58221,59851,39983,49118,40835,43967,8183,65493,47071,57342,64942,65519,64382,61437,];
table[158] = [43775,28351,0,0,0,0,0,46624,32717,48798,25267,22769,61709,64891,59889,48893,];
table[159] = [50883,24429,65341,27135,65487,64500,56571,20471,8192,4407,21,0,0,0,0,0,];
table[160] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[161] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[162] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[163] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[164] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[165] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[166] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[167] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[168] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[169] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[170] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[171] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[172] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[173] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[174] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[175] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[176] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[177] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[178] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[179] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[180] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[181] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[182] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[183] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[184] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[185] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[186] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[187] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[188] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[189] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[190] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[191] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[192] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[193] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[194] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[195] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[196] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[197] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[198] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[199] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[200] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[201] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[202] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[203] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[204] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[205] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[206] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[207] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[208] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[209] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[210] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[211] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[212] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[213] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[214] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[215] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[216] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[217] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[218] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[219] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[220] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[221] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[222] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[223] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[224] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[225] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[226] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[227] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[228] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[229] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[230] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[231] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[232] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[233] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[234] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[235] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[236] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[237] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[238] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[239] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[240] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[241] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[242] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[243] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[244] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[245] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[246] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[247] = [65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,];
table[248] = [65535,65535,65535,65535,511,0,0,0,0,0,0,0,0,0,0,256,];
table[249] = [65535,65535,61439,65535,65535,65535,65535,65023,65535,65503,65535,65535,65535,65535,65407,65533,];
table[250] = [16383,32485,15460,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[251] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[252] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[253] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,];
table[254] = [0,0,0,65531,65055,65271,3967,0,0,0,0,0,0,0,0,0,];
table[255] = [65534,65535,65535,65535,65535,32767,16,0,0,0,0,0,0,0,43,0,];

function b5jpcovt(unicode)
{
	if ((unicode >= 63223) && (unicode <= 63391))
	{
		if ((unicode >= 63223) && (unicode <= 63305)) unicode -= 50870; 
		else if ((unicode >= 63306) && (unicode <= 63391)) unicode -= 50857; 
	}
	else if (unicode == 63219)
	{
		unicode = 12540; 
	}

	return unicode;
}

function char_check(code) 
{
	var i = Math.floor(code / 256);
	var j = Math.floor(code / 16) % 16;
	var k = code % 16;
	var check = (table[i])[j];
	return ( ( check >> k ) & 1 == 1 );
}

function checkStringHasNotBig5Char(content)
{
	var hasNotBig5Char = false;

	for ( var i = 0; i < content.length; i++ ) 
    {		
        if (!char_check(b5jpcovt(content.charCodeAt(i))))
        {
            alert('"'+content.charAt(i) + '" ¸Ó¦r¥»¨t²Î¤£¤ä´©½Ð´À´«');
            hasNotBig5Char = true;
            break;
        }
	}
	return hasNotBig5Char;
}