<!--
function chkLoginForm(f)
{
	if (!f.userid.value) {
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä !");
		f.userid.focus();
		return false;
	}
	if (!f.userpwd.value) {
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä !");
		f.userpwd.focus();
		return false;
	}

	f.action = "../Login/ExecLogin.jsp";

	return true;
}

function checkFrameset()
{
	if(parent)
	{
		if(parent.Structure == null)
		{
			var szQuery = document.URL;
			document.write("<" + "form name='reaction' method='post' action='/include/OrangeRoot.jsp'" + "><" + "input type=hidden name='ret' value='" + szQuery + "'><" + "/form" + ">");
			document.write("<" + "script" + ">" + "document.reaction.submit();" + "<" + "/script" + ">");
		}
	}
	else
	{
		var szQuery = document.URL;
		document.write("<" + "form name='reaction' method='post' action='/include/OrangeRoot.jsp'" + "><" + "input type=hidden name='ret' value='" + szQuery + "'><" + "/form" + ">");
		document.write("<" + "script" + ">" + "document.reaction.submit();" + "<" + "/script" + ">");
	}
}


function rollingBnr(idx, szId, nObjHeight, nDelay, nSpeed, nHeight, nTotal)
{
	if ( nRepeat > 0 )
	{
		var tag = document.getElementById(szId);
		var childtag, i;

		nHeight ++;
		if ( nHeight < nObjHeight )
		{
			tag.style.top = -nHeight;
			rollBnr[idx] = setTimeout("rollingObj("+ idx +", '" + tag + "', " + nObjHeight + ", " + nDelay + ", " + nSpeed + ", " + nHeight + ", " + nTotal + ");", nSpeed);
		}
		else
		{
			childtag = tag.children("bnr" + szId);
			tag.appendChild(childtag[0]);
			tag.style.top = 0;
			rollBnr[idx] = setTimeout("rollingObj("+ idx +", '" + tag + "', " + nObjHeight + ", " + nDelay + ", " + nSpeed + ", 0, " + nTotal + ");", nDelay);
		}

		return true;
	}
}

function initRollingBnr(idx, szId, nObjHeight, nDelay, nSpeed, nTotal)
{
	rollBnr[idx] = null;

	if ( nTotal > 1 )
	{
		var nidx = Math.floor(Math.random() * nTotal);
		rollingBnr(idx, szId, nObjHeight, nDelay, nSpeed, nObjHeight * nidx, nTotal);
	}
	else
	{
		rollingBnr(idx, szId, nObjHeight, nDelay, nSpeed, 0, nTotal);
	}
}

function goLink(szHttp, szTarget)
{
	if ( szTarget == "" || szTarget == null || szTarget == "_self" )
	{
		location.href = szHttp;
	}
	else
	{
		var wnd = window.open(szHttp,szTarget);
	}
}

function getFlash(szId, szPath, nWidth, nHeight, idx, szBId)
{
	document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' id='" + szId + "' width='" + nWidth + "' height='" + nHeight + "' ");
	if ( idx != null )
	{
		document.write("onMouseOver='clearTimeout(rollBnr(" + idx + "));' onMouseOut='rollingBnrSub" + szBId + "()'");
	}
	document.write(">");
	document.write("<param name='movie' value='" + szPath + "'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<param name='allowScriptAccess' value='always'>");
	document.write("<EMBED src='" + szPath + "' allowScriptAccess='always' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' name='" + szId + "' width='" + nWidth + "' height='" + nHeight + "'></EMBED></OBJECT>");
}

function onlyNumber(e)
{
	if((e.keyCode < 48)||(e.keyCode > 57))
	e.returnValue = false;
}

function setDefault(f,v)
{
	f.value = v.replace(/\D/g,"");
}

function setNumber(v)
{
	var nOrigin = 0;
	if ( nOrigin == v )
	{
		v = 0;
	}
	else
	{
		nOrigin = v;
		
		v = formatNumber(nOrigin);
	}

	return v;
}

///// Format Decimal
function formatNumber(n)
{
	n = n.replace(/\D/g,"");
	
	var nLen = n.length - 3;

	while ( nLen > 0 )
	{
		n = n.substr(0,nLen) + "," + n.substr(nLen);
		nLen -= 3;
	}
	return n;
}

String.prototype.cut = function(len)
{
	var str = this;
	var l = 0;
	for ( var i=0 ; i<str.length ; i++ )
	{
		l += (str.charCodeAt(i) > 128) ? 2 : 1;
		if (l > len) return str.substring(0,i);
	}
	return str;
}

String.prototype.bytes = function()
{
	var str = this;
	var l = 0;
	for (var i=0; i<str.length; i++) l += (str.charCodeAt(i) > 128) ? 2 : 1;
	return l;
}

function szReplace(sz, otag, rtag)
{
	var idx = 0;
	var ret = "";

	if ( sz.indexOf(otag) < 0 )
	{
		ret = sz;
	}
	else
	{
		while (sz.indexOf(otag) != -1 )
		{
			idx = sz.indexOf(otag);
			ret += sz.substring(0, idx) + rtag;
			sz = sz.substring(idx + otag.length, sz.length );
		}
		ret += sz;
	}

	return ret;
}

function szCutting(sz, len, mode)
{
	if ( sz.bytes() > len )
	{
		sz = sz.cut(len) + "..";
	}

	if ( szField == mode && szWord.length>0 )
	{
		sz = szReplace(sz, szWord, "<font color='#F7941C'>" + szWord + "</font>");
	}

	return sz;
}

// onmouseover="clearTimeout(tid)" onmouseleave="ch()"

//-->