	//-----------------------------------------------------------------------------
	//	³ëµåÀÇ ÆäÀÌÁö ÁÂÇ¥¸¦ ¾ò´Â´Ù.
	// @return : Object
	//-----------------------------------------------------------------------------
	function getPosition(o){
		var leftPos = 0;
		var topPos = 0;
		
		if(o.offsetParent){
			while(o.offsetParent){
				leftPos += o.offsetLeft;
				topPos += o.offsetTop;
				o = o.offsetParent;
			}
		}else if(o.x){
			leftPos += o.x;
			topPos += o.y;
		}
		
		return {x:leftPos, y:topPos};
	}






	//-----------------------------------------------------------------------------
	// µ¿¿µ»ó Embed ÅÂ±× °ª ¹ÝÈ¯..
	// @return : String
	// ex) getMovieEmbedTags(ÇÃ·¡½Ã°æ·Î, ³ÐÀÌ, ³ôÀÌ);
	//-----------------------------------------------------------------------------
	function getMovieEmbedTags(movieSrc, width, height){
		var sMovieTags = "<EMBED pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" ";
		sMovieTags += " width=\"" + width + "\" height=\"" + height + "\" type=\"application/x-mplayer2\" ";
		sMovieTags += " AutoStart=\"true\" Loop=\"-1\" ShowControls=\"true\" ";
		sMovieTags += " ShowStatusBar=\"true\" ShowPositionControls=\"false\" ";
		sMovieTags += " src=\"" + movieSrc + "\" ></EMBED>";

		return sMovieTags;
	}


	//-----------------------------------------------------------------------------
	// ÇÃ·¡½Ã ÅÂ±× °ª ¹ÝÈ¯..
	// @return : String
	// ex) getFlashObjectTags(ÇÃ·¡½Ã°æ·Î, ³ÐÀÌ, ³ôÀÌ, Àü´Þº¯¼ö, ÇÃ·¡½ÃÀÌ¸§);
	//-----------------------------------------------------------------------------
	function getFlashEmbedTags(flashSrc, objWidth, objHeight, etcParam, flaName){
		var sMovieTags = "<EMBED id=\"" + flaName + "\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" ";
		sMovieTags += " width=\"" + objWidth + "\" height=\"" + objHeight + "\" type=\"application/x-mplayer2\" ";
		sMovieTags += " AutoStart=\"true\" Loop=\"-1\" ShowControls=\"true\" ";
		sMovieTags += " ShowStatusBar=\"true\" ShowPositionControls=\"false\" ";
		sMovieTags += " src=\"" + (flashSrc + "?" + etcParam) + "\" ></EMBED>";

		return sMovieTags;
	}



	//-----------------------------------------------------------------------------
	//	id¿¡ ÇØ´çÇÏ´Â ³ëµåÀÇ ÂüÁ¶¸¦ ¾ò´Â´Ù.
	// @return : Object
	//-----------------------------------------------------------------------------
	function $(id){
		return document.getElementById(id);
	}




	//-----------------------------------------------------------------------------
	// IE ½ºÅ¸ÀÏ°ú ¹«°üÇÏ°Ô Window Resize..
	// @return : null
	// ex) fixedResizeWindow(800, 600);
	//-----------------------------------------------------------------------------
	function fixedResizeWindow(iWidth, iHeight){
		var currentWidth, currentHeight;
		var windowWidth, windowHeight;
		var borderWidth, boderHeight;

		if(document.all){
			currentWidth = document.body.offsetWidth;
			currentHeight = document.body.offsetHeight;

			window.resizeTo(iWidth, iHeight);

			windowWidth = iWidth - document.body.offsetWidth + currentWidth;
			windowHeight = iHeight - document.body.offsetHeight + currentHeight;

			window.resizeTo(windowWidth, windowHeight);
		} else{
			windowWidth = window.outerWidth;
			windowHeight = window.outerHeight;
		}

		borderWidth = windowWidth - document.body.clientWidth;
		borderHeight = windowHeight - document.body.clientHeight;

		window.resizeTo(iWidth + borderWidth, iHeight + borderHeight);
	}




	//-----------------------------------------------------------------------------
	// È­¸éÀÇ Áß¾ÓÀ¸·Î ÆË¾÷Ã¢ ¶ç¿ì±â..
	// @return : null
	// ex) PopUp(°æ·Î, ÆË¾÷Ã¢ÀÌ¸§, ³ÐÀÌ, ³ôÀÌ);
	//-----------------------------------------------------------------------------
	function PopUp(url, wName, width, height) {//È­¸éÀÇ Áß¾Ó
		var LeftPosition = (screen.width/2) - (width/2);
		var TopPosition = (screen.height/2) - (height/2);
		var win = window.open(url, wName, "left="+LeftPosition+",top="+TopPosition+",width="+width+",height="+height);

		if(win == null){
			alert("ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇØÁÖ¼¼¿ä!");
		} else{
			win.focus();
		}
	}


	//-----------------------------------------------------------------------------
	// È­¸éÀÇ Áß¾ÓÀ¸·Î ÆË¾÷Ã¢ ¶ç¿ì±â..(½ºÅ©·ÑÆ÷ÇÔ)
	// @return : null
	// ex) PopUp(°æ·Î, ÆË¾÷Ã¢ÀÌ¸§, ³ÐÀÌ, ³ôÀÌ);
	//-----------------------------------------------------------------------------
	function PopUpWithScroll(url, wName, width, height) {//È­¸éÀÇ Áß¾Ó
		var LeftPosition = (screen.width/2) - (width/2);
		var TopPosition = (screen.height/2) - (height/2);
		var win = window.open(url, wName, "left="+LeftPosition+",top="+TopPosition+",width="+width+",height="+height+",scrollbars=yes");

		if(win == null){
			alert("ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇØÁÖ¼¼¿ä!");
		} else{
			win.focus();
		}
	}


	//-----------------------------------------------------------------------------
	// ÄíÅ°ÀúÀå
	// @return : null
	// ex) SetCookie(ÄíÅ°ÀÌ¸§, ÄíÅ°°ª, ¸¸·á±â°£);
	//-----------------------------------------------------------------------------
	function SetCookie(name, value, expiredays){//ÄíÅ° ¼³Á¤
		var todayDate = new Date(); 

		todayDate.setDate( todayDate.getDate() + expiredays ); 
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";";
	} 



	//-----------------------------------------------------------------------------
	// ÄíÅ°ÃßÃâ
	// @return : null
	// ex) GetCookie(ÄíÅ°ÀÌ¸§);
	//-----------------------------------------------------------------------------
	function GetCookie(name){
		var arg = name + "=";
		var alen = arg.length; 
		var clen = document.cookie.length;
		var i = 0;

		while (i < clen) {
			var j = i + alen; 

			if(document.cookie.substring(i, j) == arg){
				var endstr = document.cookie.indexOf (";", j);
				if(endstr == -1) 
					endstr = document.cookie.length; 

				return unescape(document.cookie.substring(j, endstr));
			}

			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}

		return null;
	} 



	//-----------------------------------------------------------------------------
	// ÄíÅ°»èÁ¦
	// @return : null
	// ex) DeleteCookie(ÄíÅ°ÀÌ¸§);
	//-----------------------------------------------------------------------------
	function DeleteCookie(name){
		var exp = new Date(); 
		var cval = GetCookie(name);

		exp.setTime(exp.getTime() - 1); 
		document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); 
	}






	function URIEncode(href){
		// IE¿¡¼­ UTF-8·Î µÈ ÁÖ¼Ò¸¦ Ã£¾Æ°¡Áö ¸øÇÏ´Â ¹ö±×°¡ ÀÖ¾î¼­
		if (encodeURI != null)
			return encodeURI(href)
		else
			return escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
	}




	//-----------------------------------------------------------------------------
	// Å¬¸³º¸µå¿¡ º¹»ç..
	// @return : boolean
	// ex) textToClip(ÀÌ¹ÌÁöÆÄÀÏ°æ·Î);
	//-----------------------------------------------------------------------------
	function textToClip(strClipData){
		if (window.clipboardData){
			window.clipboardData.setData("Text", strClipData);

		} else if (window.netscape){
			try{
				netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
				
				var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
				if(!clip)	return false;
			
				var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
				if(!trans)	return false;
			
				trans.addDataFlavor('text/unicode');

				var str = new Object();
				var len = new Object();
				var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);

				var copytext = strClipData;

				str.data=copytext;
				trans.setTransferData("text/unicode",str,copytext.length*2);
				
				var clipid=Components.interfaces.nsIClipboard;

				if(!clipid)	return false;

				clip.setData(trans,null,clipid.kGlobalClipboard);

			} catch(e){
				alert('ÆÄÀÌ¾îÆø½º º¸¾È ¼³Á¤À¸·Î Å¬¸³º¸µå·Î º¹»çÇÒ ¼ö ¾ø½À´Ï´Ù.\n\nÁÖ¼Ò Ã¢¿¡ about:config ¶ó°í ÀÔ·ÂÇØ ¼³Á¤ ÆäÀÌÁö·Î ÀÌµ¿ÇÑ ÈÄ Signed.applets.codebase_principal_support Ç×¸ñÀ» true·Î º¯°æÇÏ½Ã¸é, Å¬¸³º¸µå¸¦ Á¤»óÀûÀ¸·Î ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
				return false;
			}
		}

		alert("Å¬¸³º¸µå¿¡ ÀúÀåµÇ¾ú½À´Ï´Ù.\n\nCTRL + V¸¦ ´­·¯ ºÙ¿©³Ö±â ÇÏ¿© »ç¿ëÇÏ½Ã¸é µË´Ï´Ù.");
		return true;
	}




	//-----------------------------------------------------------------------------
	// ÀÌ¹ÌÁö »çÀÌÁî¿¡ ¸Â°Ô Å©±âÁ¶ÀýµÈ ÆË¾÷Ã¢¶ç¿ì±â
	// @return : null
	// ex) showPicture(ÀÌ¹ÌÁöÆÄÀÏ°æ·Î);
	//-----------------------------------------------------------------------------
	function showPicture(src) {
		var oImage = new Image();
		oImage.src = src;

		var strWindowOption = "";
		strWindowOption += "scrollbars=no,status=no,resizable=no";
		strWindowOption += ",width=" + oImage.width;
		strWindowOption += ",height=" + oImage.height;

		var wbody = "";
		wbody += "<head><title>»çÁø º¸±â</title>";
		wbody += "<script language='javascript'>";
		wbody += "function finalResize(){";
		wbody += "  var oBody=document.body;";
		wbody += "  var oImg=document.images[0];";
		wbody += "  var xdiff=oImg.width-oBody.clientWidth;";
		wbody += "  var ydiff=oImg.height-oBody.clientHeight;";
		wbody += "  window.resizeBy(xdiff,ydiff);";
		wbody += "}";
		wbody += "</"+"script>";
		wbody += "</head>";
		wbody += "<body onLoad='finalResize()' style='margin:0'>";
		wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
		wbody += "</body>";

		winResult = window.open("about:blank","",strWindowOption);
		winResult.document.open("text/html", "replace");
		winResult.document.write(wbody);
		winResult.document.close();
		return;
	}





	//-----------------------------------------------------------------------------
	// ÇÃ·¡½Ã Á¡¼±¾øÀÌ ¶ç¿ì±â..
	// @return : null
	// ex) getFlashObject(ÇÃ·¡½Ã°æ·Î, ³ÐÀÌ, ³ôÀÌ, Àü´Þº¯¼ö, ÇÃ·¡½ÃÀÌ¸§);
	//-----------------------------------------------------------------------------
	function getFlashObject(flashSrc, objWidth, objHeight, etcParam, flaName) {
		var tag = "";
		var baseFlashDir="";
		flashSrc = baseFlashDir + flashSrc;

		if ( etcParam != "" || etcParam != null ) {
			if ( etcParam.substr(0, 1) == "?" )
				flashSrc += etcParam;
			else
				flashSrc += "?" + etcParam;
		}

		tag += "<object id=\"" + flaName + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
		tag += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" ";
		tag += "width=\"" + objWidth + "\" height=\"" + objHeight + "\">";
		tag += "<param name=\"movie\" value=\"" + flashSrc + "\">";
		tag += "<param name=\"menu\" value=\"true\">";
		tag += "<param name=\"quality\" value=\"high\">";
		tag += "<param name=\"wmode\" value=\"transparent\">";
		tag += "<embed name=\"" + flaName + "\" src=\"" + flashSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ";
		tag += "type=\"application/x-shockwave-flash\" width=\"" + objWidth + "\" height=\"" + objHeight + "\" ";
		tag += "wmode=\"transparent\"></embed>";
		tag += "</object>";

		document.write(tag);
	}


	function getFlashObject2(flashSrc, objWidth, objHeight, etcParam, flaName) {
		var tag = "";
		var baseFlashDir="";
		flashSrc = baseFlashDir + flashSrc;

		if ( etcParam != "" || etcParam != null ) {
			if ( etcParam.substr(0, 1) == "?" )
				flashSrc += etcParam;
			else
				flashSrc += "?" + etcParam;
		}

		tag += "<object id=\"" + flaName + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
		tag += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" ";
		tag += "width=\"" + objWidth + "\" height=\"" + objHeight + "\">";
		tag += "<param name=\"movie\" value=\"" + flashSrc + "\">";
		tag += "<param name=\"menu\" value=\"true\">";
		tag += "<param name=\"quality\" value=\"high\">";
		//tag += "<param name=\"align\" value=\"middle\">";
		tag += "<param name=\"salign\" value=\"\">";
		tag += "<param name=\"play\" value=\"true\">";
		//tag += "<param name=\"loop\" value=\"true\">";
		//tag += "<param name=\"allowFullScreen\" value=\"false\">";
		//tag += "<param name=\"allowScriptAccess\" value=\"always\">";
		tag += "<param name=\"devicefont\" value=\"false\">";
		//tag += "<param name=\"scale\" value=\"showall\">";
		//tag += "<param name=\"wmode\" value=\"window\">";
		tag += "<param name=\"bgcolor\" value=\"#FFFFFF\">";
		tag += "<embed name=\"" + flaName + "\" src=\"" + flashSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ";
		tag += "type=\"application/x-shockwave-flash\" width=\"" + objWidth + "\" height=\"" + objHeight + "\" ";
		tag += "wmode=\"transparent\"></embed>";
		tag += "</object>";


		document.write(tag);
	}




	//-----------------------------------------------------------------------------
	// ÇÃ·¡½Ã ÅÂ±× °ª ¹ÝÈ¯..
	// @return : String
	// ex) getFlashObjectTags(ÇÃ·¡½Ã°æ·Î, ³ÐÀÌ, ³ôÀÌ, Àü´Þº¯¼ö, ÇÃ·¡½ÃÀÌ¸§);
	//-----------------------------------------------------------------------------
	function getFlashObjectTags(flashSrc, objWidth, objHeight, etcParam, flaName) {
		var tag = "";
		var baseFlashDir="";
		flashSrc = baseFlashDir + flashSrc;

		if ( etcParam != "" || etcParam != null ) {
			if ( etcParam.substr(0, 1) == "?" )
				flashSrc += etcParam;
			else
				flashSrc += "?" + etcParam;
		}

		tag += "<object id=\"" + flaName + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
		tag += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0\" ";
		tag += "width=\"" + objWidth + "\" height=\"" + objHeight + "\">";
		tag += "<param name=\"movie\" value=\"" + flashSrc + "\">";
		tag += "<param name=\"menu\" value=\"true\">";
		tag += "<param name=\"quality\" value=\"high\">";
		tag += "<param name=\"align\" value=\"middle\">";
		tag += "<param name=\"salign\" value=\"\">";
		tag += "<param name=\"play\" value=\"true\">";
		tag += "<param name=\"loop\" value=\"true\">";
		tag += "<param name=\"allowFullScreen\" value=\"true\">";
		tag += "<param name=\"allowScriptAccess\" value=\"always\">";
		tag += "<param name=\"devicefont\" value=\"false\">";
		tag += "<param name=\"scale\" value=\"showall\">";
		tag += "<param name=\"wmode\" value=\"transparent\">";
		tag += "<param name=\"bgcolor\" value=\"#FFFFFF\">";
		tag += "<embed name=\"" + flaName + "\" src=\"" + flashSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ";
		tag += "type=\"application/x-shockwave-flash\" width=\"" + objWidth + "\" height=\"" + objHeight + "\" ";
		tag += "wmode=\"transparent\" allowScriptAccess=\"always\"></embed>";
		tag += "</object>";


		return tag;
	}






	//-----------------------------------------------------------------------------
	// µ¿¿µ»ó 
	// @return : null
	// ex) getMovieObject(µ¿¿µ»ó°æ·Î, ³ÐÀÌ, ³ôÀÌ, µ¿¿µ»óID);
	//-----------------------------------------------------------------------------
	function getMovieObject(sPath, iWidth, iHeight, sMovieID){
		document.writeln( getMovieObjectTags(sPath, iWidth, iHeight, sMovieID) );
	}




	//-----------------------------------------------------------------------------
	// µ¿¿µ»ó ÅÂ±× ¹ÝÈ¯
	// @return : null
	// ex) getMovieObjectTags(µ¿¿µ»ó°æ·Î, ³ÐÀÌ, ³ôÀÌ, µ¿¿µ»óID);
	//-----------------------------------------------------------------------------
	function getMovieObjectTags(sPath, iWidth, iHeight, sMovieID){
		var strMovieID = (sMovieID) ? sMovieID : Math.random();
		var strMovie = "";
		
		strMovie += "<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" id=\"" + strMovieID + "\" width=\"" + iWidth + "\" height=\"" + iHeight + "\" style=\"margin:0px; padding:0px;\">\n";
		strMovie += "	<param name=\"AutoStart\" value=\"true\">\n";
		strMovie += "	<param name=\"Loop\" value=\"-1\">\n";
		strMovie += "	<param name=\"ShowControls\" value=\"true\">\n";
		strMovie += "	<param name=\"ShowStatusBar\" value=\"true\">\n";
		strMovie += "	<param name=\"ShowPositionControls\" value=\"false\">\n";
		strMovie += "	<param name=\"Filename\" value=\"" + sPath + "\">\n";
		strMovie += "</object>\n";

		return strMovie;
	}





	//-----------------------------------------------------------------------------
	// ¸ðµç Åø¹Ù¸¦ Á¦°ÅÇÑ µ¿¿µ»ó ÅÂ±× ¹ÝÈ¯
	// @return : null
	// ex) getMovieObjectTagsWithoutToolbars(µ¿¿µ»ó°æ·Î, ³ÐÀÌ, ³ôÀÌ, µ¿¿µ»óID);
	//-----------------------------------------------------------------------------
	function getMovieObjectTagsWithoutToolbars(sPath, iWidth, iHeight, sMovieID){
		var strMovieID = (sMovieID) ? sMovieID : Math.random();
		var strMovie = "";

		strMovie += "<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" id=\"" + strMovieID + "\" width=\"" + iWidth + "\" height=\"" + iHeight + "\" style=\"margin:0px; padding:0px;\">";
		strMovie += "	<param name=\"AutoSize\" value=\"true\">";
		strMovie += "	<param name=\"AutoStart\" value=\"true\">";
		strMovie += "	<param name=\"AutoRewind\" value=\"true\">";
		strMovie += "	<param name=\"Balance\" value=\"0\">";
		strMovie += "	<param name=\"CurrentPosition\" value=\"0\">";
		strMovie += "	<param name=\"DisplayBackColor\" value=\"#FFFFFF\">";
		strMovie += "	<param name=\"DisplayForeColor\" value=\"16777215\">";
		strMovie += "	<param name=\"DisplayMode\" value=\"0\">";
		strMovie += "	<param name=\"DisplaySize\" value=\"0\">";
		strMovie += "	<param name=\"PlayCount\" value=\"99\">";
		strMovie += "	<param name=\"ShowControls\" value=\"false\">";
		strMovie += "	<param name=\"ShowAudioControls\" value=\"false\">";
		strMovie += "	<param name=\"ShowPositionControls\" value=\"true\">";
		strMovie += "	<param name=\"ShowStatusBar\" value=\"false\">";
		strMovie += "	<param name=\"ShowTracker\" value=\"false\">";
		strMovie += "	<param name=\"TransparentAtStart\" value=\"1\">";
		strMovie += "	<param name=\"Volume\" value=\"-600\">";
		strMovie += "	<param name=\"Filename\" value=\"" + sPath + "\">";
		strMovie += "</object>";

		return strMovie;
	}


	//-----------------------------------------------------------------------------
	// ÇØ´ç °´Ã¼ÀÇ Åõ¸íµµ¸¦ ¼³Á¤ÇÑ´Ù.
	// @return : null
	// ex) setOpacity(40);
	//-----------------------------------------------------------------------------
	function setOpacity(obj, value){
		if( typeof obj == "string")
			obj = $(obj);

		obj.style.opacity = (value / 100);
		obj.style.MozOpacity = (value / 100);
		obj.style.KhtmlOpacity = (value / 100);
		obj.style.filter = "alpha(opacity=" + value + ")";
	}



	//-----------------------------------------------------------------------------
	// ÇØ´ç °´Ã¼¿¡ µå·¡±× ÀÌº¥Æ®¸¦ ¼³Á¤ÇÑ´Ù.
	// @return : null
	// ex) attachDragEvent(document.getElementById("divLayer"));
	//-----------------------------------------------------------------------------
	function attachDragEvent(oElement){
		oElement.style.position = "absolute";

		oElement.onmousedown = function(){
			oElement.style.cursor = "move";

			this.oldPosX = window.event.x;
			this.oldPosY = window.event.y;
						
			this.onmousemove = function(){
				this.newPosX = this.offsetLeft + (window.event.x - this.oldPosX);
				this.newPosY = this.offsetTop + (window.event.y - this.oldPosY);

				this.style.left = this.newPosX;
				this.style.top = this.newPosY;
							
				this.oldPosX = window.event.x;
				this.oldPosY = window.event.y;
			}
		}
					
		oElement.onmouseup = oElement.onmouseleave = oElement.onmouseout = function(){
			this.onmousemove = "";
			this.style.cursor = "default";
		}
	}



/*
	F11, F5, ¼Ò½ºº¸±â ¸·±â.

	document.onkeydown = function(){
		if(window.Event)	// ³Ý½ºÄÉÀÌÇÁ¿¡¼­´Â ´ë¹®ÀÚ Event
			document.captureEvents(Event.MOUSEUP);

		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;
		}
	}

	// IE Àü¿ë
	document.oncontextmenu = function(){
		event.cancelBubble = true;
		event.returnValue = false;
		return false;
	}

	document.onmousedown = function(){
		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");
*/



/*****************************************************************************************
		¡Ø String °´Ã¼ È®Àå..
*****************************************************************************************/

	//-----------------------------------------------------------------------------
	// ¹®ÀÚÀÇ ÁÂ, ¿ì °ø¹é Á¦°Å
	// @return : String
	// ex) ¹®ÀÚ¿­.trim();
	//-----------------------------------------------------------------------------
	String.prototype.trim = function() {
		return this.replace(/(^\s*)|(\s*$)/g, "");
	};


	String.prototype.Trim = function() {
		return this.replace(/(^\s*)|(\s*$)/g, "");
	};


	//-----------------------------------------------------------------------------
	// ¹®ÀÚÀÇ ÁÂ °ø¹é Á¦°Å
	// @return : String
	// ex) ¹®ÀÚ¿­.ltrim();
	//-----------------------------------------------------------------------------
	String.prototype.ltrim = function() {
		return this.replace(/(^\s*)/, "");
	};



	//-----------------------------------------------------------------------------
	// ¹®ÀÚÀÇ ¿ì °ø¹é Á¦°Å
	// @return : String
	// ex) ¹®ÀÚ¿­.rtrim();
	//-----------------------------------------------------------------------------
	String.prototype.rtrim = function() {
		return this.replace(/(\s*$)/, "");    
	};


	//-----------------------------------------------------------------------------
	// ¹®ÀÚ¿­ÀÇ ¹ÙÀÌÆ®¼ö ¸®ÅÏ
	// @return : int
	// ex) ¹®ÀÚ¿­.bytes();
	//-----------------------------------------------------------------------------
	String.prototype.bytes = function() {
		var cnt = 0;

		for (var i = 0; i < this.length; i++) {
			if (this.charCodeAt(i) > 127)
				cnt += 2;
			else
				cnt++;
		}

		return cnt;
	};




	//-----------------------------------------------------------------------------
	// Á¤¼öÇüÀ¸·Î º¯È¯
	// @return : int
	// ex) ¹®ÀÚ¿­.int();
	//-----------------------------------------------------------------------------
	String.prototype.int = function() {
		if(!isNaN(this)) {
			return parseInt(this, 10);
		}
		else {
			return null;    
		}
	};



	//-----------------------------------------------------------------------------
	// ¼ýÀÚ¿¡ 3ÀÚ¸®¸¶´Ù , ¸¦ Âï¾î¼­ ¹ÝÈ¯
	// @return : º¯È¯µÈ String ( ex) 12,345,678 )
	// ex) ¹®ÀÚ¿­.money();
	//-----------------------------------------------------------------------------
	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;
	};




	//-----------------------------------------------------------------------------
	// ¼ýÀÚÀÇ ÀÚ¸®¼ö(cnt)¿¡ ¸Âµµ·Ï ¹ÝÈ¯
	// @return : º¯È¯µÈ String			ex) 33.digits(4) => "0033";
	// ex) ¼ýÀÚ.digits(ÀÚ¸®¼ö);
	//-----------------------------------------------------------------------------
	Number.prototype.digits = function(cnt) {
		var sThis = this.toString();
		var digit = "";

		if (sThis.length < cnt) {
			for(var i = 0; i < cnt - sThis.length; i++) {
				digit += "0";
			}
		}

		return digit + sThis;
	};



	Number.prototype.money = function(){
		return this.toString().money();
	};



	//-----------------------------------------------------------------------------
	// ¹®ÀÚ¿­¿¡ Æ÷ÇÔµÈ ¼ýÀÚ¸¸ °¡Á® ¿À±â
	// @return : String					ex) "-123$asdf456".num() => "123456";
	// ex) ¹®ÀÚ¿­.num();
	//-----------------------------------------------------------------------------
	String.prototype.num = function() {
		return (this.trim().replace(/[^0-9]/g, ""));
	};



	//-----------------------------------------------------------------------------
	// ¹®ÀÚ¿­À» ¿øÇÏ´Â ¹ÙÀÌÆ®¸¸Å­ ÀÚ¸£±â..
	// @return : String					ex) "abcdefghijklmn".cut(5) => "abcde";
	// ex) ¹®ÀÚ¿­.cut(¹ÙÀÌÆ®);
	//-----------------------------------------------------------------------------
	String.prototype.cut = function(iCount) {
		var strReturn = this;
		var intLength = 0;

		for (var i=0; i<strReturn.length; i++) {
			intLength += (strReturn.charCodeAt(i) > 128) ? 2 : 1;

			if (intLength > iCount)
				return strReturn.substring(0,i) + "..";
		}

		return strReturn;
	};




	//-----------------------------------------------------------------------------
	// ¹®ÀÚ¿­¿¡ Æ÷ÇÔµÈ Æ¯Á¤¹®ÀÚ¸¦ ¸ðµÎ ¹Ù²Ù±â..
	// @return : String					ex) "asdflkj&&&qwerpio".replaceAll("&", "-") => "asdflkj---qwerpio";
	// ex) ¹®ÀÚ¿­.replaceAll(¿øº»¹®ÀÚ, ¹Ù²Ü¹®ÀÚ);
	//-----------------------------------------------------------------------------
	String.prototype.replaceAll = function(source, target) {
		source = source.replace(new RegExp("(\\W)", "g"), "\\$1");
		target = target.replace(new RegExp("\\$", "g"), "$$$$");

		return this.replace(new RegExp(source, "gm"), target);
	};



	//-----------------------------------------------------------------------------
	// ¹®ÀÚ¿­¿¡ Æ÷ÇÔµÈ Æ¯Á¤¹®ÀÚÀÇ °¹¼ö ¹ÝÈ¯
	// @return : int					ex) "abczzzkk".count("z") => 3;
	// ex) ¹®ÀÚ¿­.count(¹®ÀÚ);
	//-----------------------------------------------------------------------------
	String.prototype.count = function(str) {
		var matches = this.match(new RegExp(str.replace(new RegExp("(\\W)", "g"), "\\$1"), "g"));

		return matches ? matches.length : 0;
	}



	String.prototype.htmlspecialchars = function()	{ 
		return this.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll("<", "&gt;"); 
	}

	String.prototype.unhtmlspecialchars = function() {
		return this.replaceAll("&amp;", "&").replaceAll("&lt;", "<").replaceAll("&gt;", ">"); 
	}

	String.prototype.stripquote = function() {	
		return this.replaceAll("'", "").replaceAll('"', '').replaceAll("&#39;", "").replaceAll("&#039;", "").replaceAll("&quote;", ""); 
	}