/* FF¿Í IE°ü·Ã */
function setButAlign(obj) {
	obj.style.verticalAlign = "baseline";
}

/* ÀÍ½ºÇÃ·Î·¯ ¹öÀüº° */
function setMainHeight(obj,size) {
	if (userAgent.indexOf('MSIE 7.0') < 1) {
		obj.style.height = size +"px";
	}
}
function setMainWidth(obj,size) {
	if (userAgent.indexOf('MSIE 7.0') < 1) {
		obj.style.width = size +"px";
	}
}
function setButMargin(obj) {
	obj.style.margin = "0px 0px 0px 0px";
}
function setButWidth(obj) {
	obj.style.width = parseInt(obj.firstChild.offsetWidth,10) +"px";
	obj.style.margin = "0px 2px 0px 3px";
}
function setButHeight(obj) {
	obj.style.height = "20px";
}

/*  firstChildNode °¡ Àß ¾ÈµÉ¶§  */
/**
 * Throughout, whitespace is defined as one of the characters
 *  "\t" TAB \u0009
 *  "\n" LF  \u000A
 *  "\r" CR  \u000D
 *  " "  SPC \u0020
 *
 * This does not use Javascript's "\s" because that includes non-breaking
 * spaces (and also some other characters).
 */


/**
 * Determine whether a node's text content is entirely whitespace.
 *
 * @param nod  A node implementing the |CharacterData| interface (i.e.,
 *             a |Text|, |Comment|, or |CDATASection| node
 * @return     True if all of the text content of |nod| is whitespace,
 *             otherwise false.
 */
function is_all_ws( nod ) {
	// Use ECMA-262 Edition 3 String and RegExp features
	return !(/[^\t\n\r ]/.test(nod.data));
}


/**
 * Determine if a node should be ignored by the iterator functions.
 *
 * @param nod  An object implementing the DOM1 |Node| interface.
 * @return     true if the node is:
 *                1) A |Text| node that is all whitespace
 *                2) A |Comment| node
 *             and otherwise false.
 */

function is_ignorable( nod ) {
	return ( nod.nodeType == 8) || // A comment node
				( (nod.nodeType == 3) && is_all_ws(nod) ); // a text node, all ws
}

/**
 * Version of |previousSibling| that skips nodes that are entirely
 * whitespace or comments.  (Normally |previousSibling| is a property
 * of all DOM nodes that gives the sibling node, the node that is
 * a child of the same parent, that occurs immediately before the
 * reference node.)
 *
 * @param sib  The reference node.
 * @return     Either:
 *               1) The closest previous sibling to |sib| that is not
 *                  ignorable according to |is_ignorable|, or
 *               2) null if no such node exists.
 */
function node_before( sib ) {
	while ((sib = sib.previousSibling)) {
		if (!is_ignorable(sib)) return sib;
	}
	return null;
}

/**
 * Version of |nextSibling| that skips nodes that are entirely
 * whitespace or comments.
 *
 * @param sib  The reference node.
 * @return     Either:
 *               1) The closest next sibling to |sib| that is not
 *                  ignorable according to |is_ignorable|, or
 *               2) null if no such node exists.
 */
function node_after( sib ) {
	while ((sib = sib.nextSibling)) {
		if (!is_ignorable(sib)) return sib;
	}
	return null;
}

/**
 * Version of |lastChild| that skips nodes that are entirely
 * whitespace or comments.  (Normally |lastChild| is a property
 * of all DOM nodes that gives the last of the nodes contained
 * directly in the reference node.)
 *
 * @param sib  The reference node.
 * @return     Either:
 *               1) The last child of |sib| that is not
 *                  ignorable according to |is_ignorable|, or
 *               2) null if no such node exists.
 */
function last_child( par ) {
	var res=par.lastChild;
	while (res) {
		if (!is_ignorable(res)) return res;
		res = res.previousSibling;
	}
	return null;
}

/**
 * Version of |firstChild| that skips nodes that are entirely
 * whitespace and comments.
 *
 * @param sib  The reference node.
 * @return     Either:
 *               1) The first child of |sib| that is not
 *                  ignorable according to |is_ignorable|, or
 *               2) null if no such node exists.
 */
function first_child( par ) {
	var res=par.firstChild;
	while (res) {
		if (!is_ignorable(res)) return res;
		res = res.nextSibling;
	}
	return null;
}

/**
 * Version of |data| that doesn't include whitespace at the beginning
 * and end and normalizes all whitespace to a single space.  (Normally
 * |data| is a property of text nodes that gives the text of the node.)
 *
 * @param txt  The text node whose data should be returned
 * @return     A string giving the contents of the text node with
 *             whitespace collapsed.
 */
function data_of( txt ) {
	var data = txt.data;
	// Use ECMA-262 Edition 3 String and RegExp features
	data = data.replace(/[\t\n\r ]+/g, " ");
	if (data.charAt(0) == " ")
		data = data.substring(1, data.length);
	if (data.charAt(data.length - 1) == " ")
		data = data.substring(0, data.length - 1);
	return data;
}
/*  firstChildNode °¡ Àß ¾ÈµÉ¶§  */




/* ¹®ÀÚ¿­ Ã¼Å© ÇÔ¼ö */
function isValidID(str) {
	var pattern = /^[a-z0-9_-]{3,20}$/;
	return (pattern.test(str)) ? true : false;
}

function isValidPW(str) {
	var pattern = /^[a-z0-9_-`~!@#$%^&*)(+]{4,20}$/;
	return (pattern.test(str)) ? true : false;
}

function isValidPhone(str) {
	var pattern = /(^0[0-9]{1,2})-([1-9][0-9]{1,3})-([0-9]{4})/;
	return (pattern.test(str)) ? true : false;
}

function isValidNumber(str) {
	var pattern = /(^[0-9])/;
	return (pattern.test(str)) ? true : false;
}
/* ¹®ÀÚ¿­ Ã¼Å© ÇÔ¼ö */

/* ¸Þ´º ·Ñ¿À¹ö ÇÔ¼ö */
var originPosition = '0px';
var originAxis = 'Y';
function rollOver(obj, size, axis) {
	var imbObj = obj.firstChild;
	if(appName == "Microsoft Internet Explorer") {
		originAxis = axis;
		if (axis == "X") {
			var bgPositionX = "";
			var bgPositionY = "";
			if (obj.currentStyle) {
				bgPositionX = imbObj.currentStyle["marginLeft"];
				bgPositionY = imbObj.currentStyle["marginTop"];
			}
			imbObj.style.marginLeft = bgPositionX;
			imbObj.style.marginTop = "-"+ size +"px";
		}
		else {
			var bgPositionX = "";
			var bgPositionY = "";
			if (imbObj.currentStyle) {
				//alert(imbObj.currentStyle["marginLeft"])
				bgPositionX = imbObj.currentStyle["marginLeft"];
				bgPositionY = imbObj.currentStyle["marginTop"];
			}
			imbObj.style.marginLeft = "-"+ size +"px";
			imbObj.style.marginTop = bgPositionY;
		}
	}
}
function rollOut(obj) {
	var imbObj = obj.firstChild;
	if(appName == "Microsoft Internet Explorer") {
		if (originAxis == "X") {
			var bgPositionX = "";
			if (obj.currentStyle) {
				bgPositionX = obj.currentStyle["backgroundPositionX"];
			}
			obj.style.backgroundPosition = bgPositionX +" "+ originPosition;
		}
		else {
			var bgPositionY = "";
			if (imbObj.currentStyle) {
				bgPositionY = imbObj.currentStyle["marginTop"];
			}
			imbObj.style.marginLeft = '0px';
			imbObj.style.marginTop = bgPositionY;
		}
	}
}

/* ¸µÅ© ÇÔ¼ö */
function gotoUrl(strUrl) {
	window.location.href = strUrl;
}

function gotoUrlMenu(strUrl, linktype, size) {
	if (linktype == "") {
		window.location.href = strUrl;
	}
	else if (linktype == "blank") {
		window.open(strUrl);
	}
	else if (linktype == "all") {
		mbookzView2(strUrl,'OiizDNBTA5Tztohh',1,'Y','namgu');
	}
	else {
		var sizeA = size.split(",");
		var popStr = "width="+ sizeA[0] +", height="+ sizeA[1] +", top=5, left=5, toolbar=no, location=no,";
		popStr += "directories=no, status=yes, menubar=no, scrollbars="+ sizeA[2] +", resizable=no"
		var newWin = window.open(strUrl, "", popStr);
	}
}

function ffCurrentStyle (obj, stl) {
	var computedStyle;
	computedStyle = document.defaultView.getComputedStyle(obj, null);
	return computedStyle[stl];
}

/* strReplace */
function strReplace(org, dest, str) {
	var reg = new RegExp(org, "g");
	return str.replace(reg, dest);
}

/* ¸Þ´º »ý¼º */
function initMenu(objName, size, axis) {
	var gap = "0px";
	var codination = 0;
	var totalGap = 0; 
	var obj = document.getElementById(objName);
	var menuItem = obj.getElementsByTagName("li");
	var j = 0;
	gotoMenuUrl = function(obj) {
		window.location.href = obj.getElementsByTagName("a").item(0).href
	}
	for (i=0;i < menuItem.length; i++) {
		var linkItem = menuItem[i].getElementsByTagName("a");
		if (linkItem.length > 0) {
			if (menuItem.item(i).className == "menuOn") {
				gap = -size +"px ";
			}
			else {
				gap = "0px";
			}
			if (axis == "Y") {
				codination = menuItem[i].clientHeight;
				menuItem.item(i).style.backgroundPosition = gap +" "+ -(codination * j) +"px";
			}
			else {
				codination = menuItem[i].clientWidth;
				menuItem.item(i).style.backgroundPosition = -(codination * j) +"px "+ gap;
			}
			menuItem.item(i).style.cursor = "pointer";
			menuItem.item(i).title = linkItem.item(0).firstChild.nodeValue;
			var linkUrl = linkItem.item(0).href;
			gotoUrlThis = function () { gotoMenuUrl(this) }
			rollOverThis = function () { rollOver(this, size, axis) }
			rollOutthis = function () { rollOut(this) }
			if (window.addEventListener) {
				menuItem.item(i).addEventListener("click", gotoUrlThis, false);
				menuItem.item(i).addEventListener("mouseover", rollOverThis, false);
				menuItem.item(i).addEventListener("mouseout", rollOutthis, false);
			}
			else {
				menuItem.item(i).setAttribute("onclick", gotoUrlThis);
				menuItem.item(i).setAttribute("onmouseover", rollOverThis);
				menuItem.item(i).setAttribute("onmouseout", rollOutthis);
			}
			j++;
		}
	}
}

/* ¹öÆ°»çÀÌÁî Á¶Àý */
function initButton(objName) {
	var firstChildItem = document.getElementById(objName).childNodes[0];
	if (firstChildItem.nodeName == "#text") firstChildItem = document.getElementById(objName).childNodes[1];
	var totWidth = 0;
	var totHeight = 0;
	var elmLength = firstChildItem.childNodes.length;
	for (i=elmLength-1;i>=0;i--) {
		if (firstChildItem.childNodes[i].nodeName  != "#text") {
			totWidth += firstChildItem.childNodes[i].offsetWidth;
			totHeight = firstChildItem.childNodes[i].offsetHeight;
		}
		else {
			firstChildItem.removeChild(firstChildItem.childNodes[i]);
		}
	}
	firstChildItem.style.width = totWidth +"px";
	firstChildItem.style.height = (totHeight) +"px";
	firstChildItem.parentNode.style.width = totWidth +"px";
	firstChildItem.parentNode.style.height = (totHeight) +"px";
}
/* ¹öÆ°»çÀÌÁî Á¶Àý */

/* Select ÄÞº¸¹Ú½º µðÀÚÀÎ - ÀÛ¾÷Áß */
function beautyCombo(obj) {
	//alert(obj.offsetWidth)
	var cLength = obj.length;
	var parentObj = obj.parentNode;
	var ulObj = document.createElement("ul");
	ulObj.id = obj.id +"_view";
	ulObj.style.width = obj.offsetWidth +"px";
	ulObj.style.height = "20px";
	ulObj.style.height = "auto";
	ulObj.style.margin = "0px 0px 0px 0px";
	ulObj.style.padding = "0px 0px 0px 0px";
	ulObj.style.border = "1px solid #CCCCCC";
	ulObj.style.listStyle = "none";
	parentObj.appendChild(ulObj);
	var liObj = document.createElement("li");
	liObj.style.width = (obj.offsetWidth-10) +"px";
	liObj.style.height = "18px";
	liObj.style.margin = "0px 0px 0px 0px";
	liObj.style.padding = "2px 0px 0px 0px";
	liObj.style.listStyle = "none";
	liObj.style.cssFloat = "left";
	var newText  = document.createTextNode(obj[0].text);
	liObj.appendChild(newText);
	ulObj.appendChild(liObj);
	obj.style.display = "none";
}

// Fade È¿°ú ¸Þ´º
function fadeMenu(objname,after) {
	var obj = document.getElementById(objname);
	var text_field = document.getElementById("image_exp");
	var zoomButton = document.getElementById("zoombut");
	var downButton = document.getElementById("downbut");
	if (document.all) {
		obj.filters.blendTrans.stop();
		obj.filters.blendTrans.Apply();
		obj.src = after;
		obj.filters.blendTrans.Play();
	}
	else {
		fadeImg(objname,after);
		obj.style.opacity = 1;
	}
}

function fadeImg(objname,afteri) {
	timer=setInterval("modOpaci('"+objname+"','O');",20);
}

function modOpaci(objName,drct){
	var obje = document.getElementById(objName);
	var opacityVal;
	if (Browser.indexOf('MSIE') < 0) {
		opacityVal = parseFloat(obje.style.opacity);
	}
	else {
		opacityVal = parseFloat(obje.filters.alpha.opacity);
	}
	if(drct == "I") {
		if (Browser.indexOf('MSIE') < 0) {
			if (opacityVal < 1) {
				opacityVal += 0.1;
				obje.style.opacity = opacityVal;
			}
			else {
				clearInterval(timer);
			}
		}
		else {
			if (opacityVal < 100) {
				opacityVal += 10;
				obje.filters.alpha.opacity = opacityVal;
				obje.filters.alpha.style = "2";
				obje.filters.alpha.finishopacity = opacityVal;
			}
			else {
				clearInterval(timer);
			}
		}
	}
	if(drct == "O") {
		if (Browser.indexOf('MSIE') < 0) {
			if (opacityVal > 0.1) {
				opacityVal -= 0.1;
				obje.style.opacity = opacityVal;
			}
			else {
				clearInterval(timer);
			}
		}
		else {
			if (opacityVal > 10) {
				opacityVal -= 10;
				obje.filters.alpha.opacity = opacityVal;
				obje.filters.alpha.style = "2";
				obje.filters.alpha.finishopacity = opacityVal;
			}
			else {
				clearInterval(timer);
			}
		}
	}
}

/* È­¸é °¡¸®±â (¹ÝÅõ¸í) */
function objEclipse() {
	disSelectObj = document.createElement("DIV");
	document.body.appendChild(disSelectObj);
	disSelectObj.style.position = "absolute";
	disSelectObj.style.top = "0px";
	disSelectObj.style.left = "0px";
	disSelectObj.style.width = "100%";
	disSelectObj.style.height = "100%";
	iframeObj = document.createElement("iframe");
	disSelectObj.appendChild(iframeObj);
	iframeObj.style.width = "100%";
	iframeObj.style.height = "100%";
	iframeObj.style.margin = "0";
	iframeObj.style.border = "0 none transparent";
	disSelectObj.style.display = "block";
	if (Browser.indexOf('MSIE') > -1) {
		if (disSelectObj.offsetHeight < document.body.scrollHeight) {
			disSelectObj.style.height = document.body.scrollHeight +"px";
		}
	}
	else {
		if (disSelectObj.offsetHeight < document.documentElement.scrollHeight) {
			disSelectObj.style.height = document.documentElement.scrollHeight +"px";
		}
	}
	disSelectObj.style.zIndex = "205";
	disSelectObj.style.backgroundColor = "#FFFFFF";
	if (Browser.indexOf('MSIE') < 0) {
		disSelectObj.style.opacity = 0.8;
	}
	else {
		disSelectObj.style.filter = "alpha(opacity=80, style=2, finishopacity=80)";
	}
}

/* °¡¸° È­¸é ¿ø·¡´ë·Î */
function disobjEclipse() {
	iframeObj = null;
	disSelectObj.style.position = "absolute";
	disSelectObj.style.top = "0px";
	disSelectObj.style.left = "0px";
	disSelectObj.style.width = "0px";
	disSelectObj.style.height = "0px";
	disSelectObj.style.display = "none";
	disSelectObj = null;
}

/* ¸Þ½ÃÁö ¹Ú½º ¶ç¿ì±â(¹ÝµÎ¸íÀ¸·Î È­¸éÀ» °¡¸° ÈÄ) */
function showMessageObj(Inhtml){
	messageObj = document.createElement("DIV");
	document.body.appendChild(messageObj);
	var scrollGap = 0;
	if (Browser == "MSIE 6.0" || Browser == "MSIE 5.5") {
		scrollGap = document.body.scrollTop;
	}
	else {
		scrollGap = document.documentElement.scrollTop;
	}
	if (!disSelectObj) { 
		objEclipse();
	}
	messageObj.style.position = "absolute";
	messageObj.style.top = "40%";
	messageObj.style.left = "50%";
	messageObj.style.padding = "2px 2px 2px 2px";
	messageObj.style.display = "block";
	messageObj.innerHTML = Inhtml;
	var firstChild = first_child(messageObj);
	var leftGap = parseInt((firstChild.offsetWidth/2),10);
	var topGap = parseInt((firstChild.offsetHeight/2),10);
	messageObj.style.marginTop = (-1*(topGap-scrollGap)) +"px";
	messageObj.style.marginLeft = (-1*leftGap) +"px";
	messageObj.style.zIndex = "206";
}

/* ¸Þ½ÃÁö ¹Ú½º ¶ç¿ì±â(¹ÝµÎ¸íÀ¸·Î È­¸éÀ» °¡¸®±â ¾øÀ½) */
function showMessageObjNon(Inhtml,srcObj,posi){
	if (messageObj == null || messageObj == "undefined") {
		messageObj = document.createElement("DIV");
		//document.body.appendChild(messageObj);
		//srcObj.insertAdjacentElement("afterEnd", messageObj);
		document.body.appendChild(messageObj);
	}
	//srcObj.clientWidth;
	messageObj.style.position = "absolute";
	messageObj.style.width = "auto";
	messageObj.style.height = "auto";
	messageObj.innerHTML = "";
	
	innerMessage = document.createElement("DIV");
	messageObj.appendChild(innerMessage);

	innerMessage.style.position = "relative";
	innerMessage.style.background = "#FFFFFF";
	//innerMessage.style.padding = "2px 2px 2px 2px";
	innerMessage.style.top = "0px";
	innerMessage.style.left = "0px";
	innerMessage.style.border = "1px solid #c0c0c0";
	innerMessage.style.display = "block";

	dataObj = document.createElement("DIV");
	innerMessage.appendChild(dataObj);

	dataObj.innerHTML = Inhtml;
	var wWidth = dataObj.firstChild.offsetWidth;
	var wHeight = dataObj.firstChild.offsetHeight;
	dataObj.style.position = "absolute";
	dataObj.style.width = wWidth +"px";
	dataObj.style.height = wHeight +"px";
	dataObj.style.top = "0px";
	dataObj.style.left = "0px";
	dataObj.style.zIndex = "203";
	dataObj.style.display = "block";
	var ifStr = "<iframe name=\"blockFrame\" id=\"blockFrame\" src=\""+ _URL["blank"] +"\" frameborder=\"0\" scrolling=\"no\" style=\"position:relative;width:"+ wWidth +"px;height:"+ wHeight +"px;margin:0;z-index:201;\"></iframe>";
	innerMessage.innerHTML = innerMessage.innerHTML + ifStr;
	var scrollGap = 0;
	if (Browser == "MSIE 6.0" || Browser == "MSIE 5.5") {
		scrollGap = document.body.scrollTop;
	}
	else {
		scrollGap = document.documentElement.scrollTop;
	}
	messageObj.style.background = "#FFFFFF";
	messageObj.style.position = "absolute";
	messageObj.style.top = "50%";
	messageObj.style.left = "50%";
	messageObj.style.padding = "2px 2px 2px 2px";
	var firstChild = first_child(messageObj);
	var leftGap = parseInt((firstChild.offsetWidth/2),10);
	var topGap = parseInt((firstChild.offsetHeight/2),10);
	messageObj.style.marginTop = (-1*(topGap-scrollGap)) +"px";
	messageObj.style.marginLeft = (-1*leftGap) +"px";
	messageObj.style.display = "block";
	messageObj.style.zIndex = "202";
}

/* ¸Þ½ÃÁö ¹Ú½º ¶ç¿ì±â(¹ÝµÎ¸íÀ¸·Î È­¸éÀ» °¡¸®±â ¾øÀ½, À§Ä¡ÁöÁ¤) */
function showMessageObjNonPos(Inhtml,srcObj, posX, posY){
	if (PopObj == null || PopObj == "undefined") {
		PopObj = document.createElement("DIV");
		//document.body.appendChild(PopObj);
		//srcObj.insertAdjacentElement("afterEnd", PopObj);
		document.body.appendChild(PopObj);
	}
	//srcObj.clientWidth;
	PopObj.style.position = "absolute";
	PopObj.style.width = "auto";
	PopObj.style.height = "auto";
	PopObj.innerHTML = "";
	
	innerMessage = document.createElement("DIV");
	PopObj.appendChild(innerMessage);

	innerMessage.style.position = "relative";
	//innerMessage.style.background = "#FFFFFF";
	//innerMessage.style.padding = "2px 2px 2px 2px";
	innerMessage.style.top = "0px";
	innerMessage.style.left = "0px";
	//innerMessage.style.border = "1px solid #c0c0c0";
	innerMessage.style.display = "block";

	dataObj = document.createElement("DIV");
	innerMessage.appendChild(dataObj);

	dataObj.innerHTML = Inhtml;
	var wWidth = dataObj.firstChild.offsetWidth;
	var wHeight = dataObj.firstChild.offsetHeight;
	dataObj.style.position = "absolute";
	dataObj.style.width = wWidth +"px";
	dataObj.style.height = wHeight +"px";
	dataObj.style.top = "0px";
	dataObj.style.left = "0px";
	dataObj.style.zIndex = "203";
	dataObj.style.display = "block";
	//var ifStr = "<iframe name=\"blockFrame\" id=\"blockFrame\" src=\""+ _URL["blank"] +"\" frameborder=\"0\" scrolling=\"no\" style=\"position:relative;width:"+ wWidth +"px;height:"+ wHeight +"px;margin:0;z-index:201;\"></iframe>";
	//innerMessage.innerHTML = innerMessage.innerHTML + ifStr;
	var scrollGap = 0;
	if (Browser == "MSIE 6.0" || Browser == "MSIE 5.5") {
		scrollGap = document.body.scrollTop;
	}
	else {
		scrollGap = document.documentElement.scrollTop;
	}
	//PopObj.style.background = "#FFFFFF";
	PopObj.style.position = "absolute";
	PopObj.style.top = posY +"px";
	PopObj.style.left = posX +"px";
	PopObj.style.padding = "2px 2px 2px 2px";
	PopObj.style.display = "block";
	if (Browser.indexOf('MSIE') < 0) {
		disSelectObj.style.opacity = 0.8;
	}
	else {
		disSelectObj.style.filter = "alpha(opacity=80, style=2, finishopacity=80)";
	}
	PopObj.style.zIndex = "202";
}


/* ¸Þ½ÃÁö ¹Ú½º ¶ç¿ì±â(¹ÝµÎ¸íÀ¸·Î È­¸éÀ» °¡¸®±â ¾øÀ½, À§Ä¡ÁöÁ¤) + Fade in*/
function showMsgONPFade(Inhtml,srcObj, posX, posY){
	if (PopObj == null || PopObj == "undefined") {
		PopObj = document.createElement("DIV");
		PopObj.id = "PopObj";
		//document.body.appendChild(PopObj);
		//srcObj.insertAdjacentElement("afterEnd", PopObj);
		document.body.appendChild(PopObj);
	}
	//srcObj.clientWidth;
	PopObj.style.position = "absolute";
	PopObj.style.width = "auto";
	PopObj.style.height = "auto";
	PopObj.innerHTML = "";
	
	innerMessage = document.createElement("DIV");
	PopObj.appendChild(innerMessage);

	innerMessage.style.position = "relative";
	//innerMessage.style.background = "#FFFFFF";
	//innerMessage.style.padding = "2px 2px 2px 2px";
	innerMessage.style.top = "0px";
	innerMessage.style.left = "0px";
	//innerMessage.style.border = "1px solid #c0c0c0";
	innerMessage.style.display = "block";

	dataObj = document.createElement("DIV");
	dataObj.id = "dataObj";
	innerMessage.appendChild(dataObj);

	dataObj.innerHTML = Inhtml;
	var wWidth = dataObj.firstChild.offsetWidth;
	var wHeight = dataObj.firstChild.offsetHeight;
	dataObj.style.position = "absolute";
	dataObj.style.width = wWidth +"px";
	dataObj.style.height = wHeight +"px";
	dataObj.style.top = "0px";
	dataObj.style.left = "0px";
	dataObj.style.zIndex = "203";
	dataObj.style.display = "block";
	//var ifStr = "<iframe name=\"blockFrame\" id=\"blockFrame\" src=\""+ _URL["blank"] +"\" frameborder=\"0\" scrolling=\"no\" style=\"position:relative;width:"+ wWidth +"px;height:"+ wHeight +"px;margin:0;z-index:201;\"></iframe>";
	//innerMessage.innerHTML = innerMessage.innerHTML + ifStr;
	var scrollGap = 0;
	if (Browser == "MSIE 6.0" || Browser == "MSIE 5.5") {
		scrollGap = document.body.scrollTop;
	}
	else {
		scrollGap = document.documentElement.scrollTop;
	}
	//PopObj.style.background = "#FFFFFF";
	PopObj.style.position = "absolute";
	PopObj.style.top = posY +"px";
	PopObj.style.left = posX +"px";
	PopObj.style.padding = "2px 2px 2px 2px";
	PopObj.style.zIndex = "202";
	PopObj.style.display = "block";
	if (Browser.indexOf('MSIE') < 0) {
		PopObj.style.opacity = 0.1;
		timer=setInterval("modOpaci('PopObj','I');",20);
	}
	else {
		var tempObj = document.getElementById("detailFrame");
		tempObj.style.filter = "alpha(opacity=10, style=2, finishopacity=10)";
		timer=setInterval("modOpaci('detailFrame','I');",20);
	}
	//timer=setInterval("modOpaci('PopObj','I');",80);
}

/* ¶ç¿î ¸Þ½ÃÁö ¹Ú½º¸¸ ¾ø¾Ö±â */
function hidePopObj() {
	PopObj.style.position = "absolute";
	PopObj.style.top = "0";
	PopObj.style.left = "0";
	PopObj.innerHTML = "";
	PopObj.style.marginTop = "0";
	PopObj.style.marginLeft = "0";
	PopObj.style.zIndex = "1";
	PopObj.style.display = "none";
	PopObj = null;
}

/* ¶ç¿î ¸Þ½ÃÁö ¹Ú½º¸¸ ¾ø¾Ö±â */
function hideMessageObj() {
	messageObj.style.position = "absolute";
	messageObj.style.top = "0";
	messageObj.style.left = "0";
	messageObj.innerHTML = "";
	messageObj.style.marginTop = "0";
	messageObj.style.marginLeft = "0";
	messageObj.style.zIndex = "1";
	messageObj.style.display = "none";
	messageObj = null;
}

/* ¶ç¿î ¸Þ½ÃÁö ¹Ú½º¿Í ¹ÝÅõ¸í È­¸é ¾ø¾Ö±â */
function clearMessageObj() {
	messageObj.style.position = "absolute";
	messageObj.style.top = "0";
	messageObj.style.left = "0";
	messageObj.innerHTML = "";
	messageObj.style.marginTop = "0";
	messageObj.style.marginLeft = "0";
	messageObj.style.zIndex = "1";
	messageObj.style.display = "none";
	messageObj = null;
	disobjEclipse();
}

function nextFocus(obj,length) {
	var tForm = obj.form;
	var thisIndex = 0;
	if (obj.value.length >= length) {
		for (i=0;i<tForm.length;i++) {
			if (obj == tForm[i]) {
				tForm[i+1].focus();
				break;
			}
		}
	}
}

/* Ajax XMLHttpRequest */
function cubeXMLHttpRequest() {
	var xmlreq = false;
	if (window.XMLHttpRequest) {
		xmlreq = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		try {
			xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e1) {
			try {
				xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e2) {
				// 
			}
		}
	}
	return xmlreq;
}

/* »õ·Î¿î Alert */
function alertNew(error_str,obj,del,sel,focusing) {
	 if (messageObj == null) {
		var inHtml = "";
		inHtml += "<div id=\"alertWinBg0\">";
		inHtml += "<div id=\"alertWinBg1\" style=\"width:320px;\">";
		inHtml += "<ul class=\"alertTitle\">";
		inHtml += "<li style=\"width: 298px;font: bold 8pt verdana;\">Error</li>";
		inHtml += "<li class=\"closeX\"><img src=\""+ _URL['board'] +"/images/x.gif\" alt=\"´Ý±â\" title=\"´Ý±â\" onclick=\"clearMessageObj()\" /></li>";
		inHtml += "</ul>";
		inHtml += "<div id=\"alertContArea\" style=\"height\">";
		inHtml += error_str;
		inHtml += "</div>";
		inHtml += "<div id=\"alertButArea\">";
		inHtml += "<div style=\"margin:0px 5px 2px 0px;\">";
		inHtml += "<button id=\"alertBut\" type=\"button\" style=\"width:50px;\" title=\"È®ÀÎ\" onclick=\"\">";
		inHtml += "<div class=\"parent\">";
		inHtml += "<div class=\"fleft\"></div>";
		inHtml += "<div class=\"fright\"><div class=\"fvalue\">È®ÀÎ</div></div>";
		inHtml += "</div>";
		inHtml += "</button>";
		inHtml += "</div>";
		inHtml += "</div>";
		inHtml += "</div>";
		inHtml += "</div>";
		showMessageObj(inHtml);
		errorCall = function () {alertFocus(obj,del,sel,focusing);clearMessageObj();}
		var alertBut = document.getElementById('alertBut');
		if (window.addEventListener) {
			alertBut.addEventListener("click", errorCall, false);
		}
		else {
			alertBut.setAttribute("onclick", errorCall);
		}
	}
	else {
		errorCall();
	}
}

/* »õ·Î¿î Confirm */
function confirmNew(error_str, time) {
		var inHtml = "";
		inHtml += "<div id=\"alertWinBg0\">";
		inHtml += "<div id=\"alertWinBg1\" style=\"width:320px;\">";
		inHtml += "<ul class=\"alertTitle\">";
		inHtml += "<li style=\"width: 298px;font: bold 8pt verdana;\">Error</li>";
		inHtml += "<li class=\"closeX\"><img src=\""+ _URL['admin'] +"/images/x.gif\" alt=\"´Ý±â\" title=\"´Ý±â\" onclick=\"clearMessageObj()\" /></li>";
		inHtml += "</ul>";
		inHtml += "<div id=\"alertContArea\" style=\"height\">";
		inHtml += error_str;
		inHtml += "</div>";
		inHtml += "<div id=\"alertButArea\">";
		inHtml += "<div style=\"margin:2px 20px 2px 0px;\">";
		inHtml += "<button id=\"confirmBut\" type=\"button\" style=\"width:37px;\" title=\"È®ÀÎ\" onclick=\"\">";
		inHtml += "<ul>";
		inHtml += "<li class=\"left\">È®ÀÎ</li>";
		inHtml += "<li class=\"right\"></li>";
		inHtml += "</ul>";
		inHtml += "</button>";
		inHtml += "<button id=\"cancelBut\" type=\"button\" style=\"width:37px;\" title=\"Ãë¼Ò\" onclick=\"\">";
		inHtml += "<ul>";
		inHtml += "<li class=\"left\">Ãë¼Ò</li>";
		inHtml += "<li class=\"right\"></li>";
		inHtml += "</ul>";
		inHtml += "</button>";
		inHtml += "</div>";
		inHtml += "</div>";
		inHtml += "</div>";
		inHtml += "</div>";
		showMessageObj(inHtml);
		confirmCall = function () {clearMessageObj(); return true;}
		cancleCall = function () {clearMessageObj(); return false;}
		var confirmBut = document.getElementById('confirmBut');
		var cancelBut = document.getElementById('cancelBut');
		if (window.addEventListener) {
			confirmBut.addEventListener("click", confirmCall, false);
			cancelBut.addEventListener("click", cancleCall, false);
		}
		else {
			confirmBut.setAttribute("onclick", confirmCall);
			cancelBut.setAttribute("onclick", cancleCall);
		}
}


 /* alert Focus */
function alertFocus(obj,del,sel,focusing){
	if (focusing!="F") {
		if (obj.type == "radio") {
			obj.focus();
		}
		else {
			if (del=="T") {
				obj.value="";
			}
			if (sel=="T") {
				obj.select();
			}
			obj.focus();
		}
	}
}

/**
*
*  Base64 encode / decode
*  http://www.webtoolkit.info/
*
**/

var Base64 = {

// private property
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",

// public method for encoding
encode : function (input) {
	var output = "";
	var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
	var i = 0;

	input = Base64._utf8_encode(input);

	while (i < input.length) {

		chr1 = input.charCodeAt(i++);
		chr2 = input.charCodeAt(i++);
		chr3 = input.charCodeAt(i++);

		enc1 = chr1 >> 2;
		enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
		enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
		enc4 = chr3 & 63;

		if (isNaN(chr2)) {
			enc3 = enc4 = 64;
		} else if (isNaN(chr3)) {
			enc4 = 64;
		}

		output = output +
		this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
		this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);

	}

	return output;
},

// public method for decoding
decode : function (input) {
	var output = "";
	var chr1, chr2, chr3;
	var enc1, enc2, enc3, enc4;
	var i = 0;

	input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

	while (i < input.length) {

		enc1 = this._keyStr.indexOf(input.charAt(i++));
		enc2 = this._keyStr.indexOf(input.charAt(i++));
		enc3 = this._keyStr.indexOf(input.charAt(i++));
		enc4 = this._keyStr.indexOf(input.charAt(i++));

		chr1 = (enc1 << 2) | (enc2 >> 4);
		chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
		chr3 = ((enc3 & 3) << 6) | enc4;

		output = output + String.fromCharCode(chr1);

		if (enc3 != 64) {
			output = output + String.fromCharCode(chr2);
		}
		if (enc4 != 64) {
			output = output + String.fromCharCode(chr3);
		}

	}

	output = Base64._utf8_decode(output);

	return output;

},

// private method for UTF-8 encoding
_utf8_encode : function (string) {
	string = string.replace(/\r\n/g,"\n");
	var utftext = "";

	for (var n = 0; n < string.length; n++) {

		var c = string.charCodeAt(n);

		if (c < 128) {
			utftext += String.fromCharCode(c);
		}
		else if((c > 127) && (c < 2048)) {
			utftext += String.fromCharCode((c >> 6) | 192);
			utftext += String.fromCharCode((c & 63) | 128);
		}
		else {
			utftext += String.fromCharCode((c >> 12) | 224);
			utftext += String.fromCharCode(((c >> 6) & 63) | 128);
			utftext += String.fromCharCode((c & 63) | 128);
		}

	}

	return utftext;
},

// private method for UTF-8 decoding
_utf8_decode : function (utftext) {
	var string = "";
	var i = 0;
	var c = c1 = c2 = 0;

	while ( i < utftext.length ) {

		c = utftext.charCodeAt(i);

		if (c < 128) {
			string += String.fromCharCode(c);
			i++;
		}
		else if((c > 191) && (c < 224)) {
			c2 = utftext.charCodeAt(i+1);
			string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
			i += 2;
		}
		else {
			c2 = utftext.charCodeAt(i+1);
			c3 = utftext.charCodeAt(i+2);
			string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
			i += 3;
		}

	}

	return string;
},

URLEncode : function (string) {   
       return escape(this._utf8_encode(string));   
   },   
 
   // public method for url decoding   
   URLDecode : function (string) {   
       return this._utf8_decode(unescape(string));   
   }
}

/*12 -> 0012 Ã³¾ö 0 Ã¤¿ì±â*/
function zeroFill(inputvalue,demandLength){
	inputvalue = "" + inputvalue;
	var spaceValue = "";
	for (var i = 0; i < demandLength-inputvalue.length;i++){
		spaceValue += "0";
	}
	return spaceValue+inputvalue;
}

/* ³¯Â¥¼±ÅÃ¿ë ´Þ·Â */
//±â³äÀÏ¿¡ ÇØ´çÇÏ´Â ¹è¿­ Àü¿ªº¯¼ö(ÀÌ´Â ¼­¹ö»çÀÌµå¿¡¼­ µ¿ÀûÀ¸·Î »ý¼º½ÃÄÑÁà¾ßÇÔ);
var anniversary = new Array();

function viewCal(selectDate, srcObj, inputObj) {
	//selectDateÀÌ½´°¡ µÇ´Â ³¯Â¥, calDivObj´Þ·ÂÀ» »Ñ¸± DIVÅÂ±× ¾ÆÀÌµð
    //Àü¿ªº¯¼ö1 - ÀÌ½´°¡ µÇ´Â ³¯Â¥ ÁöÁ¤
    var selectDate = selectDate; 
    today = new Date();
	// ¿À´Ã³¯Â¥ ÁöÁ¤
    toDate = today.getFullYear() + zeroFill((today.getMonth()+1), 2) + zeroFill(today.getDate(), 2);
    //alert(toDate);
    if (selectDate == '') {
        selectDate = toDate;
    }
    var preMonDate;
    var nextMonDate;
    preMonDate= selectDate.substr(0,4) + zeroFill((parseInt(selectDate.substr(4,2), 10)-1), 2) + selectDate.substr(6,2);
    nextMonDate= selectDate.substr(0,4) + zeroFill((parseInt(selectDate.substr(4,2), 10)+1), 2) + selectDate.substr(6,2);
    //alert(selectDate+":"+ preMonDate +":"+ nextMonDate);
    if (selectDate.substr(4,2) == '01') preMonDate = (parseInt(selectDate.substr(0,4), 10)-1) + '12' + selectDate.substr(6,2);
    if(selectDate.substr(4,2)=='12') nextMonDate= (parseInt(selectDate.substr(0,4), 10)+1) + '01' + selectDate.substr(6,2);

    //alert(selectDate+":"+ preMonDate +":"+ nextMonDate);
    var firstDay = getFirstDay(selectDate.substr(0,4), selectDate.substr(4,2));            // Ã¹¹øÂ° ¿äÀÏÀÇ ¼ýÀÚ°ª        
    var lastDay = getLastDay(selectDate.substr(0,4), selectDate.substr(4,2));            // ¸¶Áö¸· ¿äÀÏÀÇ ¼ýÀÚ°ª
    var daysOfMonth = getDaysOfMonth(selectDate.substr(0,4), selectDate.substr(4,2));    // 28, 29, 30, 31 Áß ÇÏ³ª
    //alert(firstDay+":"+ lastDay +":"+ daysOfMonth);
    var calString;//´Þ·Â HTMLÀ» ÀúÀåÇÏ±â À§ÇÑ º¯¼ö´Ù.
	var curM_week_cnt = Math.ceil( (parseInt(firstDay,10)+parseInt(daysOfMonth,10))/7 );

	var preYeadate = (parseInt(selectDate.substr(0,4))-1)+ selectDate.substr(4,4);
	var nextYeadate = (parseInt(selectDate.substr(0,4))+1)+ selectDate.substr(4,4);
	calString = "<div id=\"miniCalendar\">";
	calString += "<div id=\"calNavi\">";
	calString += "<img id=\"preYBut\" src=\""+ _URL['board'] +"/images/schedule_bt_01.gif\" width=\"15\" height=\"11\" alt=\"ÀÛ³â\" border=\"0\">";
	calString += "<img id=\"preMBut\" src=\""+ _URL['board'] +"/images/schedule_bt_02.gif\" width=\"17\" height=\"11\" alt=\"Áö³­´Þ\" border=\"0\">";
	calString += selectDate.substr(0,4) +"³â "+ selectDate.substr(4,2) +"¿ù";
	calString += "<img id=\"nextMBut\" src=\""+ _URL['board'] +"/images/schedule_bt_03.gif\" width=\"17\" height=\"11\" alt=\"´ÙÀ½´Þ\" border=\"0\">";
	calString += "<img id=\"nextYBut\" src=\""+ _URL['board'] +"/images/schedule_bt_04.gif\" width=\"15\" height=\"11\" alt=\"³»³â\" border=\"0\">";
	calString += " <img id=\"closeBut\" src=\""+ _URL['board'] +"/images/x2.gif\" width=\"13\" height=\"13\" alt=\"´Ý±â\" border=\"0\" onclick=\"hideMessageObj();\">";
	calString += "</div>";
	calString += "<div id=\"calendar\">";
	calString += "<ul>";
	calString += "<li><span class=\"week0\">S</span></li>";
	calString += "<li><span>M</span></li>";
	calString += "<li><span>T</span></li>";
	calString += "<li><span>W</span></li>";
	calString += "<li><span>T</span></li>";
	calString += "<li><span>F</span></li>";
	calString += "<li><span class=\"week6\">S</span></li>";
	calString += "</ul>";
	var topdistance = 0;
	var topdistance_detail = 0;
	var tempcell = 0;
	var currentNum = 0; // ³¯Â¥ Ç¥½Ã¿ë
	var classW = "";
	var classD = "";
	var classD_link = "";
	for (row=1;row<=curM_week_cnt;row++) {
		calString += "<ul>";
		for(var col = 0;col < 7;col++) {
			colNum = ((row-1) * 7) + (col+1);
			thisDay = colNum-firstDay;
			onclick = "inputDate('"+selectDate.substr(0,4)+"-"+selectDate.substr(4,2)+"-"+ zeroFill(thisDay+"",2) +"','"+ inputObj +"')";
			//´Þ·Â¿¡ ³¯Â¥°¡ ³ª¿Í¾ß µÇ´Â Á¶°Ç
			if (colNum > firstDay && colNum < (firstDay + daysOfMonth + 1)) {
				if (col == 0 || col == 6) {
					classW = " class=\"week"+ col +"\"";
				}
				else {
					classW = " class=\"week\"";
				}
				calString += "<li onclick=\""+ onclick +"\"><span"+ classW +">"+ thisDay +"</span></li>";
			}
			else {
				calString += "<li></li>";
			}
		}
		calString += "</ul>";
	}
	calString += "</div></div>";
	showMessageObjNon(calString, srcObj, "C");
	var preYBut = document.getElementById("preYBut");
	var preMBut = document.getElementById("preMBut");
	var nextMBut = document.getElementById("nextMBut");
	var nextYBut = document.getElementById("nextYBut");
	var viewCal01 = function () {
		viewCal(preYeadate, srcObj, inputObj);
	}
	var viewCal02 = function () {
		viewCal(preMonDate, srcObj, inputObj);
	}
	var viewCal03 = function () {
		viewCal(nextMonDate, srcObj, inputObj);
	}
	var viewCal04 = function () {
		viewCal(nextYeadate, srcObj, inputObj);
	}
	if (window.addEventListener) {
		preYBut.addEventListener("click", viewCal01, false);
		preMBut.addEventListener("click", viewCal02, false);
		nextMBut.addEventListener("click", viewCal03, false);
		nextYBut.addEventListener("click", viewCal04, false);
	}
	else {
		preYBut.setAttribute("onclick", viewCal01);
		preMBut.setAttribute("onclick", viewCal02);
		nextMBut.setAttribute("onclick", viewCal03);
		nextYBut.setAttribute("onclick", viewCal04);
	}
}
/////////////////////////³¯Â¥ °ü·ÃµÈ ¿¬»ê ÇÔ¼öµé////////////////////////////
function getDaysOfMonth(year, month) { 
    var DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];        // Non-Leap year Month days.. 
    var lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];    // Leap year Month days.. 
    /* 
    Check for leap year .. 
    1.Years evenly divisible by four are normally leap years, except for... 
    2.Years also evenly divisible by 100 are not leap years, except for... 
    3.Years also evenly divisible by 400 are leap years. 
    */ 
    if ((year % 4) == 0) {
        if ((year % 100) == 0 && (year % 400) != 0)
            return DOMonth[parseInt(month, 10)-1];
     
        return lDOMonth[parseInt(month, 10)-1];
    } else 
        return DOMonth[parseInt(month, 10)-1];
} 

// Ã¹¹øÂ° ¿äÀÏ ±¸ÇÏ±â
function getFirstDay(year, month) {
    var tmpDate = new Date(); 
    tmpDate.setDate(1); 
    tmpDate.setMonth(parseInt(month, 10)-1); 
    tmpDate.setFullYear(year);
    return tmpDate.getDay();
}

// ¸¶Áö¸· ¿äÀÏ ±¸ÇÏ±â
function getLastDay(year, month) {
    var tmpDate = new Date(); 
    tmpDate.setDate( getDaysOfMonth(year,month) ); 
    tmpDate.setMonth(parseInt(month, 10)-1); 
    tmpDate.setFullYear(year); 
    return tmpDate.getDay(); 
}

function inputDate(dateval, inputObj) {
	var input_obj = document.getElementById(inputObj);
	input_obj.value = dateval;
	hideMessageObj();
}

// ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å©
function checkJumin(jm_bh1,jm_bh2) {
	var tot=0, result=0, re=0, se_arg=0;
	var chk_num="";
	chk_jm_bh = jm_bh1 + jm_bh2;
	if (chk_jm_bh.length != 13) {
		return false;
	}
	else {
		for (var i=0; i < 12; i++) {
		if (isNaN(chk_jm_bh.substr(i, 1))) return false;
			se_arg = i;
			if (i >= 8) se_arg = i - 8;
			tot = tot + Number(chk_jm_bh.substr(i, 1)) * (se_arg + 2)
		}
		 if (chk_num != "err") {
			re = tot % 11;
			result = 11 - re;
			if (result >= 10) result = result - 10;
			if (result != Number(chk_jm_bh.substr(12, 1))) return false;
			if ((Number(chk_jm_bh.substr(6, 1)) < 1) || (Number(chk_jm_bh.substr(6, 1)) > 4))
			return false;
		}
	}
	return true;
}

//¼ýÀÚ¸¸ ÀÔ·Â
function numOnly(obj,frm,isCash){
	//»ç¿ë¿¹ : <input type="text" name="text" onKeyUp="javascript:numOnly(this,document.ÆûÀÌ¸§,true);">
	//¼¼ÀÚ¸® ÄÞ¸¶ »ç¿ë½Ã true , ¼ýÀÚ¸¸ ÀÔ·Â ½Ã false
	if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) return;
	var returnValue = "";
	for (var i = 0; i < obj.value.length; i++){
		if (obj.value.charAt(i) >= "0" && obj.value.charAt(i) <= "9"){
			returnValue += obj.value.charAt(i);
		}else{
			returnValue += "";
		}
	}

	if (isCash){
		obj.value = cashReturn(returnValue);
		return;
	}
	obj.focus();
	obj.value = returnValue;
}
//3ÀÚ¸® , Ãß°¡
function cashReturn(numValue){
	//numOnlyÇÔ¼ö¿¡ ¸¶Áö¸· ÆÄ¶ó¹ÌÅÍ¸¦ true·Î ÁÖ°í numOnly¸¦ ºÎ¸¥´Ù.
	var cashReturn = "";
	for (var i = numValue.length-1; i >= 0; i--){
		cashReturn = numValue.charAt(i) + cashReturn;
		if (i != 0 && i%3 == numValue.length%3) cashReturn = "," + cashReturn;
	}
	return cashReturn;
}

function removeComma(cash){
	//ÄÞ¸¶¸¦ ¾ø¾ÖÁØ´Ù.
	//»ç¿ë¹ý : document.ÆûÀÌ¸§.ÇÊµåÀÌ¸§.value = removeComma(document.ÆûÀÌ¸§.ÇÊµåÀÌ¸§.value);
	var returnValue = "";
	for (var i = 0; i < cash.length; i++){
		if (cash.charAt(i) != ","){
			returnValue += cash.charAt(i);
		}
	}
	return returnValue;
}

// ÇØ´ç±æÀÌ°¡ µÇ¸é ´ÙÀ½À¸·Î Ä¿¼­ ÀÌµ¿
function moveChk(thisObj,nextObj,len) {
	if (thisObj.value.length == len) {
		nextObj.focus();
	}
}

//·Î±×ÀÎ ÆË¾÷
function openLogin() {
	window.open(_URL["board"] +"/login/login.asp","Login","width=340,height=190,scrollbars=no");
}

// °Ô½ÃÆÇ Top 5
function getBoard(obj, srcObj, table, linkUrl, listItem, strSubj, strConts, orderItem, orderBy, searchCase, searchStr){
//alert(obj);
	if (!table) {
		alert("°Ô½ÃÆÇÀ» ¸ÕÀú ÀÔ·ÂÇÏ½Ê½Ã¿ä!");
	}
	else {
		if (!listItem) listItem = "";
		if (!strConts) strConts = "";
		if (!orderItem) orderItem = "";
		if (!orderBy) orderBy = "";
		if (!searchCase) searchCase = "";
		if (!searchStr) searchStr = "";
		var postUrl = _URL["brdexec"] +"/listAjax.asp";
		var posrVal = "table="+ table +"&listItem="+ listItem +"&orderItem="+ orderItem +"&orderBy="+ orderBy +"&searchCase="+ searchCase +"&searchStr="+ searchStr +"&strSubj="+ strSubj +"&strConts="+ strConts;

		var boardReq = new cubeXMLHttpRequest();
		baordInputReq = function () {baordInput(obj, srcObj, linkUrl)}
		boardReq.onreadystatechange = baordInputReq;
		boardReq.open("POST", postUrl, true);
		boardReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		boardReq.send(posrVal);
	}

	function baordInput(obj, srcObj, linkUrl) {
		if (boardReq.readyState == 4) {
			if (boardReq.status == 200) {
				var tmphtml = boardReq.responseText;
				var brdArray = tmphtml.split("&curren;");
				var defStr = document.getElementById(obj).innerHTML;
				var Inhtml = "";
				var defStrIn = "";
				for (i=0;i< brdArray.length;i++) {
					var brdArray2 = brdArray[i].split("&ndash;");
					var linkStr = "<a href=\""+ linkUrl + brdArray2[0] +"\">"+ brdArray2[1] +"</a>";
					defStrIn = strReplace("subjStr", linkStr, defStr);
					defStrIn = strReplace("dateStr", brdArray2[5], defStrIn);
					Inhtml += defStrIn;
				}
				document.getElementById(srcObj).innerHTML = Inhtml;
				
			}
			else {
				document.getElementById(srcObj).innerHTML = '¼­¹ö ¿À·ù ÀÔ´Ï´Ù.';
			}
		}
	}
}

var Alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
Num = '0123456789';

//¿µ¹®,¼ýÀÚ check
function check_an(a) 
{ 
	var an = Alpha + Num;	
	for(i=0;i< a.length;i++) { 
		if (an.indexOf(a.substr(i,1))<=0)
			return false; 		 
	} 
	return true;
} 

//¼ýÀÚÃ¼Å©
function check_n(a) 
{ 
	var an = Num;	
	for(i=0;i< a.length;i++) { 
		if (an.indexOf(a.substr(i,1))<0)
			return false; 		 
	} 
	return true;
} 

function set_cookie(cookieName, cookieValue){
		var expire_date = new Date();
		expire_date.setDate(expire_date.getDate() + 365);
		setCookie(cookieName, cookieValue, expire_date, '/' );
	}

function setCookie(cookieName, cookieValue, expires, path, domain, secure){
	document.cookie =
	escape(cookieName) + '=' + escape(cookieValue)
	+ (expires ? '; EXPIRES=' + expires.toGMTString() : '')
	+ (path ? '; PATH=' + path : '')
	+ (domain ? '; DOMAIN=' + domain : '')
	+ (secure ? '; SECURE' : '');
}

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 ''; 
} 