

/*
Array
Boolean
Date
Math
*/
/************************************************************************************************String*/

/**
 * @brief 		Á¤¼öÇüÀ¸·Î º¯È¯
 */
String.prototype.int = function() {
	if(!isNaN(this)) {
		return parseInt(this, 10);
	}
	else {
		return null;
	}
};

/**
 * @brief 		¹®ÀÚ¿­¿¡ Æ÷ÇÔµÈ ¼ýÀÚ¸¸ °¡Á® ¿À±â
 */
String.prototype.num = function() {
	return (this.trim().replace(/[^0-9]/g, ""));
};


/**
 * @brief 		¼ýÀÚ¿¡ 3ÀÚ¸®¸¶´Ù , ¸¦ Âï¾î¼­ ¹ÝÈ¯
 */
String.prototype.money = function() {
	var num = this.trim();

	while((/(-?[0-9]+)([0-9]{3})/).test(num)) {
		num = num.replace((/(-?[0-9]+)([0-9]{3})/), "$1,$2");
	}

	return num;
};


/**
 * @brief 		ÁÂ¿ì °ø¹é Á¦°Å
 */
String.prototype.trim = function() {
		return (this || "").replace( /^\s+|\s+$/g, "" );
}

String.prototype.Trim = function() {
	return this.replace(/(^\s*)|(\s*$)/g, "");
};


/**
 * @brief 		ÁÂ °ø¹é Á¦°Å
 */
String.prototype.ltrim = function() {
	return this.replace(/(^\s*)/, "");
};



/**
 * @brief 		¿ì °ø¹é Á¦°Å
 */
String.prototype.rtrim = function() {
	return this.replace(/(\s*$)/, "");
};


/**
 * @brief 		ÇÑ±Ûµµ °í·ÁÇÏ¿© ÀÚ¸£±â
 * @param			pLen		ÀÚ¸¦ ±æÀÌ
 */
String.prototype.cut = function(pLen) {
	var nCurLen = 0;
	for (var i=0; i<this.length; i++) {
		nCurLen += (this.charCodeAt(i) > 128) ? 2 : 1;
		if (nCurLen > pLen) return this.substring(0,i) + "...";
	}
	return this;
}

/**
 * @brief 		ÇØ´ç½ºÆ®¸µÀÇ ¹ÙÀÌÆ®´ÜÀ§ ±æÀÌ¸¦ ¸®ÅÏ
 * @return		ÀÚ¸¥ ¹®ÀÚ¿­
 */
String.prototype.bytes = function() {
	var nRult = 0;
	for (var i=0; i< this.length; i++) {
		nRult += (this.charCodeAt(i) > 128) ? 2 : 1;
	}
	return nRult;
}


/**
 * @brief 		¹®ÀÚ¿­¿¡ Æ÷ÇÔµÈ Æ¯Á¤¹®ÀÚ¸¦ ¸ðµÎ ¹Ù²Ù±â..
 * @param			pSource		¿ø ¹®ÀÚ¿­
 * @param			pTarget		¹Ù²Ü ¹®ÀÚ¿­
 */

String.prototype.replaceAll = function(pSource, pTarget) {
	pSource = pSource.replace(new RegExp("(\\W)", "g"), "\\$1");
	pTarget = pTarget.replace(new RegExp("\\$", "g"), "$$$$");

	return this.replace(new RegExp(pSource, "gm"), pTarget);
};


/**
 * @brief 		´ë¹®ÀÚ º¯È¯
 * @param			pStr		¹®ÀÚ¿­
 */
String.prototype.ucase = function() {
	var sRult;
	this != null ? sRult = this.toUpperCase() : sRult = "";
	return sRult;
}

/**
 * @brief 		¼Ò¹®ÀÚ º¯È¯
 * @param			pStr		¹®ÀÚ¿­
 */
String.prototype.lcase = function() {
	var sRult;
	this != null ? sRult = this.toLowerCase() : sRult = "";
	return sRult;
}

/**
 * @brief 		Check DateFormat
 * @param			pFormat		³¯Â¥ Æ÷¸Ë ¸¶½ºÅ©
 * @return		Returns true if date string matches format of format string and
 *						is a valid date. Else returns false.
 */
String.prototype.isDate = function(pFormat) {
	if (this.trim() == "") { return false; }
	var date = cUtil.GetDateFromFormat(this,pFormat);
	if (date == 0) { return false; }
	return true;
}


/**
 * @brief 		¹®ÀÚ¿­¿¡ Æ÷ÇÔµÈ Æ¯Á¤¹®ÀÚÀÇ °¹¼ö ¹ÝÈ¯
 * @param			pChar		 Ã£À» ¹®ÀÚ
 */
String.prototype.count = function(pChar) {
	var matches = this.match(new RegExp(pChar.replace(new RegExp("(\\W)", "g"), "\\$1"), "g"));

	return matches ? matches.length : 0;
}



/**
 * @brief 		HTML Endcode
 */
String.prototype.htmlspecialchars = function()	{
	return this.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll("<", "&gt;");
}

/**
 * @brief 		HTML Decode
 */
String.prototype.unhtmlspecialchars = function() {
	return this.replaceAll("&amp;", "&").replaceAll("&lt;", "<").replaceAll("&gt;", ">");
}

/**
 * @brief 		µû¿ÈÇ¥ Á¦°Å
 */
String.prototype.stripquote = function() {
	return this.replaceAll("'", "").replaceAll('"', '').replaceAll("&#39;", "").replaceAll("&#039;", "").replaceAll("&quote;", "");
}



/************************************************************************************************Number*/
/**
 * @brief 		¼ýÀÚÀÇ ÀÚ¸®¼ö(cnt)¿¡ ¸Âµµ·Ï ¹ÝÈ¯
 * @param			pCnt		ÀÚ¸®¼ö
 * @return		int
 */
Number.prototype.digits = function(pCnt) {
	var sThis = this.toString();
	var digit = "";

	if (sThis.length < pCnt) {
		for(var i = 0; i < pCnt - sThis.length; i++) {
			digit += "0";
		}
	}

	return digit + sThis;
};
/*
RegExp
Functions
Events
*/

/************************************************************************************************Cookie */
/**
 * @brief 		Cookie °ª È¹µæ
 * @param			pKey		ÄíÅ° ¸í
 * @return		¹®ÀÚ¿­
 */
function getCookie(pKey) {
	var nameOfCookie = pKey + "=";
	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 "";
}

/**
 * @brief 		Cookie °ª ¼³Á¤
 * @param			pKey					ÄíÅ° ¸í
 * @param			pValue				°ª
 * @param			pExpiredays		Cookie°¡ ¹«È¿È­µÇ´Â ½Ã°£ÀÌ´Ù. : Á¤¼ö
 * @param			pPath					¹®¼­ÀÇ °æ·Î¸íÀ» ¼³Á¤ÇÕ´Ï´Ù. ¼³Á¤ÇÏÁö ¾ÊÀ¸¸é ÇöÀç Cookie¸¦ º¸³»´Â ¹®¼­ÀÇ URL»óÀÇ °æ·Î(µµ¸ÞÀÎ ¸í Á¦¿Ü)·Î ¼³Á¤µË´Ï´Ù.
 * @param			pDomain				À¥ ¼­¹öÀÇ µµ¸ÞÀÎ ¸íÀ» ¼³Á¤ÇÕ´Ï´Ù. ¼³Á¤ÇÏÁö ¾ÊÀ¸¸é ÇöÀç Cookie¸¦ º¸³»´Â ¹®¼­°¡ ¼ÓÇÑ µµ¸ÞÀÎ ¸íÀ¸·Î ¼³Á¤µË´Ï´Ù.
 * @param			pSecure				HTTPS Server(HTTP over SSL)¿Í °°Àº Secure Server¿¡¼­ Cookie¸¦ º¸³¾ °æ¿ì ÀÌ °ªÀ» ¼³Á¤ÇØ ÁÝ´Ï´Ù.

*/
function setCookie(pKey, pValue, pExpiredays) {
	setCookie(pKey, pValue, pExpiredays, "", "", "")
}

function setCookie(pKey, pValue, pExpiredays, pPath) {
	setCookie(pKey, pValue, pExpiredays, pPath, "", "")
}

function setCookie(pKey, pValue, pExpiredays, pPath, pDomain) {
	setCookie(pKey, pValue, pExpiredays, pPath, pDomain, "")
}

function setCookie(pKey, pValue, pExpiredays, pPath, pDomain, pSecure) {
	setCookie(pKey, pValue, pExpiredays, pPath, pDomain, pSecure)
}

function setCookie(pKey, pValue, pExpiredays, pPath, pDomain, pSecure) {
		var todayDate = new Date();

		todayDate.setDate( todayDate.getDate() + pExpiredays );

    document.cookie= pKey + "=" + escape(pValue) +
        ((pExpiredays) ? "; expires=" + todayDate.toGMTString() : "") +
        ((pPath) ? "; path=" + pPath : "") +
        ((pDomain) ? "; domain=" + pDomain : "") +
        ((pSecure) ? "; secure" : "");
}

/**
 * @brief 		Cookie °ª Á¦°Å : ¾îÁ¦ ³¯Â¥¸¦ ÄíÅ° ¼Ò¸ê ³¯Â¥·Î ¼³Á¤ÇÑ´Ù.
 * @param			pKey					ÄíÅ° ¸í
 * @param			pPath					ÀúÀå °æ·Î
 * @param			pDomain				µµ¸ÞÀÎ
 */
function deleteCookie(pKey, pPath, pDomain) {
	var expireDate = new Date();
	expireDate.setDate( expireDate.getDate() - 1 );
	expireDateStr = expireDate.toGMTString();

    if (getCookie(pKey)) {
        document.cookie = pKey + "=" +
            ((pPath) ? "; path=" + pPath : "") +
            ((domain) ? "; domain=" + pDomain : "") +
            "; expires="+ expireDateStr;
    }
}

/************************************************************************************************iframe*/
/**
 * @brief 		iframe Å©±â Á¶Àý
 * @param			pLayerID	iFrame id
 * @param			pWidth		iFrame Æø
 * @param			pHeight		iFrame ³ôÀÌ
 */
function resizeIFrame(pLayerID, pWidth, pHeight) {
	if (pLayerID == "") return;
	var oIFrame = $("#" + pLayerID);
	var oInnerDoc = (oIFrame.get(0).contentDocument) ? oIFrame.get(0).contentDocument : oIFrame.get(0).contentWindow.document;

	if (pWidth == 0) {
		pWidth = oInnerDoc.body.scrollWidth;
		if (pWidth == 0) pWidth = 100;
		oIFrame.width(pWidth);
	} else {
		oIFrame.width(pWidth);
	}

	if (pHeight == 0) {
		pHeight = oInnerDoc.body.scrollHeight;
		if (pHeight == 0) pHeight = 100
		oIFrame.height(pHeight);
	} else {
		oIFrame.height(pHeight);
	}
	return;
}

/************************************************************************************************Get Object*/
/**
 * @brief 		id ·Î °´Ã¼ ¾ò±â : self
 * @param 		pObjectId		°´Ã¼ id
 */
function $S(pObjectId){
	// checkW3C DOM, then MSIE 4, then NN 4.
	if(document.getElementById && document.getElementById(pObjectId)){
		return document.getElementById(pObjectId); // ´ëºÎºÐÀÇ ºê¶ó¿ìÀú
	}else if (document.all && document.all(pObjectId)){
		return document.all(pObjectId); // IE4¿Í 5.0
	}else if (document.layers && document.layers[pObjectId]){
		return document.layers[pObjectId];  // Netscape 4.x
	}else{
		return false;
	}
}

/**
 * @brief 		id ·Î °´Ã¼ ¾ò±â : opener
 * @param 		pObjectId		°´Ã¼ id
 */
function $O(pObjectId){
	// checkW3C DOM, then MSIE 4, then NN 4.
	if(opener.document.getElementById && opener.document.getElementById(pObjectId)){
		return opener.document.getElementById(pObjectId); // ´ëºÎºÐÀÇ ºê¶ó¿ìÀú
	}else if (opener.document.all && document.all(pObjectId)){
		return opener.document.all(pObjectId); // IE4¿Í 5.0
	}else if (opener.document.layers && document.layers[pObjectId]){
		return opener.document.layers[pObjectId];  // Netscape 4.x
	}else{
		return false;
	}
}


/**
 * @brief 		id ·Î °´Ã¼ ¾ò±â : parent
 * @param 		pObjectId		°´Ã¼ id
 */
function $P(pObjectId){
	// checkW3C DOM, then MSIE 4, then NN 4.
	if(parent.document.getElementById && parent.document.getElementById(pObjectId)){
		return parent.document.getElementById(pObjectId); // ´ëºÎºÐÀÇ ºê¶ó¿ìÀú
	}else if (parent.document.all && document.all(pObjectId)){
		return parent.document.all(pObjectId); // IE4¿Í 5.0
	}else if (parent.document.layers && document.layers[pObjectId]){
		return parent.document.layers[pObjectId];  // Netscape 4.x
	}else{
		return false;
	}
}


/**
 * @brief 		id ·Î °´Ã¼ ¾ò±â : top
 * @param 		pObjectId		°´Ã¼ id
 */
function $T(pObjectId){
	// checkW3C DOM, then MSIE 4, then NN 4.
	if(top.document.getElementById && top.document.getElementById(pObjectId)){
		return top.document.getElementById(pObjectId); // ´ëºÎºÐÀÇ ºê¶ó¿ìÀú
	}else if (top.document.all && document.all(pObjectId)){
		return top.document.all(pObjectId); // IE4¿Í 5.0
	}else if (top.document.layers && document.layers[pObjectId]){
		return top.document.layers[pObjectId];  // Netscape 4.x
	}else{
		return false;
	}
}

/************************************************************************************************ ÁÂÇ¥ */
/**
 * @brief 		°´Ã¼ÀÇ X ÁÂÇ¥ ¾Ë¾Æ³»±â
 * @param 		pObj		DOM °´Ã¼
 */
function findPosX(pObj) {
	var nLeft = 0;
	if (pObj.offsetParent) {
		while (pObj.offsetParent) {
			nLeft += pObj.offsetLeft
			pObj = pObj.offsetParent;
		}
	}
	else if (pObj.x)
		nLeft += pObj.x;

	return nLeft;
}

/**
 * @brief 		°´Ã¼ÀÇ Y ÁÂÇ¥ ¾Ë¾Æ³»±â
 * @param 		pObj		DOM °´Ã¼
 */
function findPosY(pObj) {
	var nTop = 0;
	if (pObj.offsetParent) {
		while (pObj.offsetParent) {
			nTop += pObj.offsetTop
			pObj = pObj.offsetParent;
		}
	}
	else if (pObj.y)
		nTop += pObj.y;

	return nTop;
}


/**
 * @brief 		ÇöÀç ¸¶¿ì½º ÁÂÇ¥ ¾Ë¾Æ³»±â
 * @param 		pEvent		ÀÌº¥Æ® °´Ã¼
 */
function getMousePos(pEvent){
	var nX, nY;
	//if (document.all)  {
	if (pEvent.pageX && pEvent.pageY)  {
		nX = pEvent.pageX;
		nY = pEvent.pageY;
	} else {
		nX = (pEvent.clientX + document.body.scrollLeft - document.body.clientLeft);
		nY = (pEvent.clientY + document.body.scrollTop - document.body.clientTop);
	}

  if (nX < 0) nX = 0;
  if (nY < 0) nY = 0;

	return {x: nX, y: nY};
}

/************************************************************************************************ ¸ÖÆ¼¹Ìµð¾î °´Ã¼ ÇÚµé¸µ */
/**
 * @brief 		ÀÌ¹ÌÁö Æø Á¦ÇÑ
 * @param 		pImg				ÀÌ¹ÌÁö °³Ã¼
 * @param 		pMaxSize		Æø ÃÖ´ë Å©±â
 */
function setResizeImageWidthMax(pImg, pMaxSize) {
	if (pImg.width > pMaxSize) {
		pImg.width = pMaxSize;
	}
	return;
}

/**
 * @brief 		ÀÌ¹ÌÁö ³ôÀÌ Á¦ÇÑ
 * @param 		pImg				ÀÌ¹ÌÁö °³Ã¼
 * @param 		pMaxSize		³ôÀÌ ÃÖ´ë Å©±â
 */
function setResizeImageHeightMax(pImg, pMaxSize) {
	if (pImg.height > pMaxSize) {
		pImg.height = pMaxSize;
	}
	return;
}

/**
 * @brief 		ÀÌ¹ÌÁö Æø/³ôÀÌ Á¦ÇÑ
 * @param 		pImg						ÀÌ¹ÌÁö °³Ã¼
 * @param 		pMaxWidthSize		Æø ÃÖ´ë Å©±â
 * @param 		pMaxHeightSize	³ôÀÌ ÃÖ´ë Å©±â
 */
function setResizeImageMax(pImg, pMaxWidthSize, pMaxHeightSize) {
	if (pImg.width > pMaxWidthSize) {
		pImg.width = pMaxWidthSize;
	}
	if (pImg.height > pMaxHeightSize) {
		pImg.height = pMaxHeightSize;
	}
	return;
}


/**
 * @brief 		ÇÃ·¡½Ã Ãâ·Â HTML ÅÂ±× È¹µæ : °¡Àå °£´ÜÇÑ ¼Ò½º
 * @param 		pSrc				ÇÃ·¡½Ã ¼Ò½º
 * @param 		pWidth			Æø
 * @param 		pHeight			³ôÀÌ
 * @param 		pEtcParam		±âÅ¸ ÀÎÀÚ
 * @param 		pDomId			HTML Dom ID
 */
 function getHtmlFlashPlaySimple(pSrc, pWidth, pHeight, pEtcParam, pDomId) {
	var sFlashID = (pDomId) ? pDomId : Math.random();
	if ( pEtcParam != null && pEtcParam.trim() != "" && pEtcParam.bytes() > 0 ) {
		if ( pEtcParam.substr(0, 1) == "?" )
			pSrc += pEtcParam.trim();
		else
			pSrc += "?" + pEtcParam.trim();
	}

	var sTag = "";
	sTag += "<object";
	sTag += " id=\"" + pDomId + "\"";
	if (pWidth > -1) sTag += " width=\"" + pWidth + "\"";
	if (pHeight > -1) sTag += " height=\"" + pHeight + "\"";
	sTag += ">";
	sTag += "<param name=\"movie\" value=\""+ pSrc +"\"></param>";
	sTag += "<embed src=\""+ pSrc +"\" type=\"application/x-shockwave-flash\"";
	if (pWidth > -1) sTag += " width=\"" + pWidth + "\"";
	if (pHeight > -1) sTag += " height=\"" + pHeight + "\"";
	sTag += "></embed>";
	sTag += "</object>";

	return sTag;
}

/**
 * @brief 		ÇÃ·¡½Ã Ãâ·Â HTML ÅÂ±× È¹µæ
 * @param 		pSrc				ÇÃ·¡½Ã ¼Ò½º
 * @param 		pWidth			Æø
 * @param 		pHeight			³ôÀÌ
 * @param 		pEtcParam		±âÅ¸ ÀÎÀÚ
 * @param 		pDomId			HTML Dom ID
 */
 function getHtmlFlashPlay(pSrc, pWidth, pHeight, pEtcParam, pDomId) {
	var sFlashID = (pDomId) ? pDomId : Math.random();
	if ( pEtcParam != null && pEtcParam.trim() != "" && pEtcParam.bytes() > 0 ) {
		if ( pEtcParam.substr(0, 1) == "?" )
			pSrc += pEtcParam.trim();
		else
			pSrc += "?" + pEtcParam.trim();
	}


	var sTag = "";
	sTag += "<object id=\"" + sFlashID + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
	sTag += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" ";
	if (pWidth > -1) sTag += " width=\"" + pWidth + "\"";
	if (pHeight > -1) sTag += " height=\"" + pHeight + "\"";
	sTag += ">\n";
	sTag += "<param name=\"movie\" value=\"" + pSrc + "\"/>\n";
	sTag += "<param name=\"menu\" value=\"true\"/>\n";
	sTag += "<param name=\"quality\" value=\"high\"/>\n";
	sTag += "<param name=\"allowScriptAccess\" value=\"always\"/>\n";
	sTag += "<param name=\"wmode\" value=\"transparent\"/>\n";
	sTag += "<embed name=\"" + pDomId + "\" src=\"" + pSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\""
	if (pWidth > -1) sTag += " width=\"" + pWidth + "\"";
	if (pHeight > -1) sTag += " height=\"" + pHeight + "\"";
	sTag += "wmode=\"transparent\" allowScriptAccess=\"always\"></embed>\n";
	sTag += "</object>\n";

	return sTag;
}

function printFlashPlay(pSrc, pWidth, pHeight, pEtcParam, pDomId) {
	document.writeln(getHtmlFlashPlay(pSrc, pWidth, pHeight, pEtcParam, pDomId));
}

/**
 * @brief 		µ¿¿µ»ó Ãâ·Â HTML ÅÂ±× È¹µæ : °¡Àå °£´ÜÇÑ ¼Ò½º
 * @param 		pSrc				µ¿¿µ»ó ¼Ò½º
 * @param 		pWidth			Æø
 * @param 		pHeight			³ôÀÌ
 * @param 		pDomId			HTML Dom ID
 */
function getHtmlMoviePlaySimple(pSrc, pWidth, pHeight, pDomId){
	var sMovieID = (pDomId) ? pDomId : Math.random();

	var sTag = "";
	sTag += "<object id=\"" + pDomId + "\"";
	sTag += " id=\"" + sMovieID + "\"";
	if (pWidth > -1) sTag += " width=\"" + pWidth + "\"";
	if (pHeight > -1) sTag += " height=\"" + pHeight + "\"";
	sTag += ">";
	sTag += "<param name=\"filename\" value=\""+pSrc+"\"></param>";
	sTag += "<embed src=\""+pSrc+"\" type=\"application/x-mplayer2\"";
	if (pWidth > -1) sTag += " width=\"" + pWidth + "\"";
	if (pHeight > -1) sTag += " height=\"" + pHeight + "\"";
	sTag += "></embed>";
	sTag += "</object>";
	return sTag;
}
/**
 * @brief 		µ¿¿µ»ó Ãâ·Â HTML ÅÂ±× È¹µæ
 * @param 		pSrc				µ¿¿µ»ó ¼Ò½º
 * @param 		pWidth			Æø
 * @param 		pHeight			³ôÀÌ
 * @param 		pDomId			HTML Dom ID
 */
function getHtmlMoviePlay(pSrc, pWidth, pHeight, pDomId){
	return getHtmlMoviePlay(pSrc, pWidth, pHeight, pDomId, true, 1, true, true, true, true, -6000);
}
/**
 * @brief 		µ¿¿µ»ó Ãâ·Â HTML ÅÂ±× È¹µæ
 * @param 		pSrc				µ¿¿µ»ó ¼Ò½º
 * @param 		pWidth			Æø
 * @param 		pHeight			³ôÀÌ
 * @param 		pDomId			HTML Dom ID
 */
function getHtmlMoviePlay(pSrc, pWidth, pHeight, pDomId, pAutoStart, pPlayCount, pShowControls, pShowAudioControls, pShowStatusBar, pShowTracker, pVolume){
	var sMovieID = (pDomId) ? pDomId : Math.random();

	var sTag = "";
	sTag += "<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\"";
	sTag += " codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\"";
	sTag += " id=\"" + sMovieID + "\"";
	if (pWidth > -1) sTag += " width=\"" + pWidth + "\"";
	if (pHeight > -1) sTag += " height=\"" + pHeight + "\"";
	sTag += " style=\"margin:0px; padding:0px;\">\n";
	sTag += "	<param name=\"FileName\" value=\"" + pSrc + "\"/>\n";			// Àç»ýµÉ ¸ÖÆ¼¹Ìµð¾î ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù.
	sTag += "	<param name=\"AutoStart\" value=\""+ pAutoStart+"\"/>\n";							// À¥ÆäÀÌÁö¸¦ ¿­¸é ÀÚµ¿À¸·Î Àç»ýÀ» ½ÃÀÛÇÒ Áö ¼³Á¤
	sTag += "	<param name=\"PlayCount\" value=\""+pPlayCount+"\"/>\n";								// Àç»ýÇÒ È½¼ö¸¦ ÁöÁ¤ÇÑ´Ù. (0:¹Ýº¹Àç»ý, 1~:ÁöÁ¤¼ýÀÚ¸¸Å­)
	sTag += "	<param name=\"ShowControls\" value=\""+pShowControls+"\"/>\n";					// ÄÁÆ®·Ñ ÆÐ³Î Ç¥½Ã ¿©ºÎ¸¦ ÁöÁ¤ÇÑ´Ù.
	sTag += "	<param name=\"ShowAudioControls\" value=\""+pShowAudioControls+"\"/>\n";			// º¼·ý ÆÐ³Î Ç¥½Ã ¿©ºÎ¸¦ ÁöÁ¤ÇÑ´Ù.
	sTag += "	<param name=\"ShowStatusBar\" value=\""+pShowStatusBar+"\"/>\n";				// »óÅÂ¹ÙÀÇ Ç¥½Ã ¿©ºÎ¸¦ ÁöÁ¤ÇÑ´Ù.
	sTag += "	<param name=\"ShowTracker\" value=\""+pShowTracker+"\"/>\n";					// Æ®·¢¹ÙÀÇ Ç¥½Ã ¿©ºÎ¸¦ ÁöÁ¤ÇÑ´Ù.
	sTag += "	<param name=\"Volume\" value=\""+pVolume+"\"/>\n";								// µ¥½Ãº§ÀÇ 100ºÐÀÇ 1 ´ÜÀ§·Î º¼·ýÀ» ÁöÁ¤ÇÑ´Ù.

	sTag += "	<param name=\"AllowChangeDisplaySize\" value=\"true\"/>\n";		//ÇÃ·¡ÀÌ¾î »çÀÌÁî
	sTag += "	<param name=\"AudioStream\" value=\"-1\"/>\n";
	sTag += "	<param name=\"AutoSize\" value=\"true\"/>\n";
	sTag += "	<param name=\"AnimationAtStart\" value=\"true\"/>\n";
	sTag += "	<param name=\"AllowScan\" value=\"true\"/>\n";
	sTag += "	<param name=\"AutoRewind\" value=\"true\"/>\n";						// ÆÄÀÏÀÇ Àç»ýÀÌ ³¡³µÀ» ¶§ ÀÚµ¿À¸·Î µÇ°¨±â¸¦ ÇÒ Áö ¼³Á¤
	sTag += "	<param name=\"Balance\" value=\"0\"/>\n";
	sTag += "	<param name=\"BufferingTime\" value=\"5\"/>\n";
	sTag += "	<param name=\"ClickToPlay\" value=\"true\"/>\n";
	sTag += "	<param name=\"CursorType\" value=\"0\"/>\n";
	sTag += "	<param name=\"CurrentPosition\" value=\"1\"/>\n";					// Àç»ý ÆÄÀÏ¿¡¼­ÀÇ Çö À§Ä¡¸¦ ÃÊ ´ÜÀ§·Î ³ªÅ¸³½´Ù.
	sTag += "	<param name=\"CurrentMarker\" value=\"0\"/>\n";
	sTag += "	<param name=\"DisplayBackColor\" value=\"#000000\"/>\n";		// µð½ºÇÃ·¹ÀÌ ÆÐ³ÎÀÇ ¹è°æ»öÀ» ³ªÅ¸³½´Ù.
	sTag += "	<param name=\"DisplayForeColor\" value=\"16777215\"/>\n";	// µð½ºÇÃ·¹ÀÌ ÆÐ³ÎÀÇ Àü°æ»ö
	sTag += "	<param name=\"DisplayMode\" value=\"0\"/>\n";
	sTag += "	<param name=\"DisplaySize\" value=\"0\"/>\n";							// µð½ºÇÃ·¹ÀÌ ÆÐ³Î¿¡ ÃÊ´ÜÀ§ ¶Ç´Â ÇÁ·¹ÀÓ ´ÜÀ§·Î ÇöÀ§Ä¡¸¦ µð½ºÇÃ·¹ÀÌÇÒÁö¸¦ ³ªÅ¸³½´Ù. 0=ÃÊ, 1=ÇÁ·¹ÀÓ, 4=??
	sTag += "	<param name=\"Enabled\" value=\"true\"/>\n";								// ÄÁÆ®·ÑÀÌ È°¼ºÈ­µÇ¾ú´ÂÁö¸¦ ³ªÅ¸³½´Ù.
	sTag += "	<param name=\"EnableContextMenu\" value=\"true\"/>\n";			// ´ÜÃà ¸Þ´º¸¦ È°¼ºÈ­½ÃÅ³Áö¸¦ ³ªÅ¸³½´Ù.
	sTag += "	<param name=\"EnablePositionControls\" value=\"true\"/>\n";		// ÄÁÆ®·Ñ ÆÐ³Î¿¡ À§Ä¡ ¹öÆ°ÀÇ Ãâ·Â¼³Á¤
	sTag += "	<param name=\"EnableFullScreenControls\" value=\"false\"/>\n";
	sTag += "	<param name=\"EnableTracker\" value=\"true\"/>\n";					// ÄÁÆ®·Ñ ÆÐ³Î¿¡ Æ®·¢¹Ù ÄÁÆ®·ÑÀ» º¸¿©ÁÙ Áö¸¦ Ç¥½Ã
	sTag += "	<param name=\"InvokeURLs\" value=\"true\"/>\n";
	sTag += "	<param name=\"Language\" value=\"-1\"/>\n";
	sTag += "	<param name=\"Mute\" value=\"false\"/>\n";
	sTag += "	<param name=\"PreviewMode\" value=\"true\"/>\n";
	sTag += "	<param name=\"Rate\" value=\"1\"/>\n";											// Àç»ý ºñÀ²À» °áÁ¤ÇÑ´Ù.
	sTag += "	<param name=\"SelectionStart\" value=\"-1\"/>\n";					// ÆÄÀÏÀÇ Ã³À½¿¡¼­ºÎÅÍ ½ÃÀÛ À§Ä¡¸¦ ÃÊ ´ÜÀ§·Î ÁöÁ¤
	sTag += "	<param name=\"SelectionEnd\" value=\"-1\"/>\n";						//  ÆÄÀÏÀÇ Ã³À½¿¡¼­ºÎÅÍ Á¾·á À§Ä¡¸¦ ÃÊ ´ÜÀ§·Î ÁöÁ¤
	sTag += "	<param name=\"SendOpenStateChangeEvents\" value=\"true\"/>\n";
	sTag += "	<param name=\"SendWarningEvents\" value=\"true\"/>\n";
	sTag += "	<param name=\"SendErrorEvents\" value=\"true\"/>\n";
	sTag += "	<param name=\"SendKeyboardEvents\" value=\"false\"/>\n";
	sTag += "	<param name=\"SendMouseClickEvents\" value=\"false\"/>\n";
	sTag += "	<param name=\"SendMouseMoveEvents\" value=\"false\"/>\n";
	sTag += "	<param name=\"SendPlayStateChangeEvents\" value=\"true\"/>\n";
	sTag += "	<param name=\"ShowCaptioning\" value=\"false\"/>\n";
	sTag += "	<param name=\"ShowDisplay\" value=\"false\"/>\n";					// µð½ºÇÃ·¹ÀÌ ÆÐ³Î Ç¥½Ã ¿©ºÎ¸¦ ÁöÁ¤ÇÑ´Ù.
	sTag += "	<param name=\"ShowGotoBar\" value=\"false\"/>\n";
	sTag += "	<param name=\"ShowPositionControls\" value=\"false\"/>\n";	// À§Ä¡ ÄÁÆ®·ÑÀÇ Ç¥½Ã ¿©ºÎ¸¦ ÁöÁ¤ÇÑ´Ù.
	sTag += "	<param name=\"TransparentAtStart\" value=\"1\"/>\n";
	sTag += "	<param name=\"VideoBorderWidth\" value=\"0\"/>\n";
	sTag += "	<param name=\"VideoBorderColor\" value=\"0\"/>\n";
	sTag += "	<param name=\"VideoBorder3D\" value=\"false\"/>\n";
	sTag += "	<param name=\"WindowlessVideo\" value=\"false\"/>\n";
	sTag += "</object>";

	return sTag;
}

function printMoviePlay(pSrc, pWidth, pHeight, pDomId){
	document.writeln(getHtmlMoviePlay(pSrc, pWidth, pHeight, pDomId));
}

/*
	// Å°º¸µå ¹× ¸¶¿ì½º ÀÌº¥Æ® Á¦ÇÑ..
	if(window.Event)
		document.captureEvents(Event.MOUSEUP);

	function processKey(){
		if(event.ctrlKey == true && (event.keyCode == 78 || event.keyCode == 82) || (event.keyCode >= 112 && event.keyCode <= 123) || event.keyCode == 8){
			event.keyCode = 0;
			event.cancelBubble = true;
			event.returnValue = false;
		}
	}

//	document.onkeydown = processKey;
	document.oncontextmenu = function(){
		event.cancelBubble = true;
		event.returnValue = false;
		return false;
	};
	document.onmousedown = function(e){
		if(window.Event){
			if(e.which == 2 || e.which == 3)
				return false;
		} else{
			if(event.button == 2 || event.button == 3){
				event.cancelBubble = true;
				event.returnValue = false;
				return false;
			}
		}
	};
	document.onselectstart = new Function("return false");
	document.ondragstart = new Function("return false");
*/

