		

	var oldPos = 0;            //Å¬¸¯½Ã ¸¶¿ì½ºÁÂÇ¥

	var oldPixel = 0;        //Å¬¸¯½Ã ½½¶óÀÌ´õ ÁÂÇ¥
	var bDrag = false;            //¿òÁ÷ÀÓ
	var bPlay = false;                //ÇÃ·¹ÀÌÁß

	/********************************************************************
	Àç»ý °ü·Ã

	********************************************************************/
	var progressBar_StartPixel =0;        //ÇÃ·¹ÀÌ¹Ù ½ÃÀÛÀ§Ä¡
	var progressBar_Size = 175;        //ÇÃ·¹ÀÌ¹Ù Å©±â
	


	function progressBar_onmousedown() {
		if (!bPlay)
			return ;

		if ($("MediaPlayer").CurrentPosition == -1 )        //Player.FileNameÀÌ ¼³Á¤µÇ¾î ÀÖÁö ¾ÊÀ¸¸é °Á ¸®ÅÏÇØ ¹ö¸°´Ù.
			return false;

		oldPos = event.clientX;
		bDrag  = true;
		TrackBar = event.srcElement.parentElement;
		oldPixel = progressBar.style.pixelLeft;
		document.onmousemove = PlayMoveSlider;
		if(document.all)
		{
			document.onmouseup = PlayStopSlider;
		}
	}

	function PlayMoveSlider() {
		if (bDrag) {
			var XPos = oldPixel + (event.clientX - oldPos);    //ÃÖÃÊ ¸¶¿ì½º´Ù¿îÀÏ¶§ ÁÂÇ¥¿¡¼­ mousemoveÇÑ ÁÂÇ¥°ª

			if((progressBar_StartPixel <= XPos  )
				&& (XPos <= progressBar_StartPixel + (progressBar_Size  ) ) )
			{

				//ÇÁ·Î±×·¡½º¹Ù ÀÌµ¿
				document.all.progressBar.style.pixelLeft = XPos;

			}//if((XPos >= startVolPos) &&....
			return false;
		}

	}


	function PlayStopSlider() {

		bDrag = false;

		$("MediaPlayer").currentPosition  = Pixel2Pos(progressBar.style.pixelLeft - progressBar_StartPixel)
		if ($("MediaPlayer").PlayState == 1)    //ÀÏ½Ã ÁßÁö ÀÏ¶§, Áï ½º¶óÀÌ´õ ¿òÁ÷ÀÓ¿¡ ÀÇÇØ Áß´ÜµÇ¾úÀ» ¶§¸¸, ´Ù½Ã ½ÇÇà
			$("MediaPlayer").Play();

		document.onmousemove = null;
		if(document.all);
			document.onmouseup = null;
	}

	function Pixel2Pos(nPixel)
	{
			return parseInt((nPixel) * $("MediaPlayer").Duration / progressBar_Size);
	}


	/*********************************************************************
	volume°ü·Ã

	**********************************************************************/
	var imgpath = "/images/FUN/";
	var volumeMin = -3000;
	var volumeMax = 0;
	var volumeValue = 0;
	var oldVolume = 0;
	var VolumeBar_StartPixel = 0;
	var VolumeBar_Size = 35;    //º¼·ý¹Ù Å©±â

	function VolumeBar_onmousedown() {
		if (!bPlay)
			return ;

		oldPos = event.clientX;                            //ÃÖÃÊ ¸¶¿ì½º´Ù¿îÀÏ¶§ ÁÂÇ¥
		oldPixel = VolumeBar.style.pixelLeft;                //ÃÖÃÊ ¸¶¿ì½º´Ù¿î ÀÏ¶§ ½½¶óÀÌ´õÁÂÇ¥
		oldVolume = $("MediaPlayer").Volume
		bDrag = true;
		document.onmousemove = VolumeMoveSlider;            //onmousemoveÄ¸ÃÄ
		if (document.all)
			document.onmouseup=VolumeStopSlider;        //onmousemove ÇØÁ¦
	}

	function VolumeMoveSlider() {
		if (bDrag) {
			var XPos = oldPixel + event.clientX - oldPos;    //ÃÖÃÊ ¸¶¿ì½º´Ù¿îÀÏ¶§ ÁÂÇ¥¿¡¼­ mousemoveÇÑ ÁÂÇ¥°ª


			if((VolumeBar_StartPixel <= XPos  )
				&& (XPos <= VolumeBar_StartPixel + VolumeBar_Size ) )
			{

				VolumeBar.style.pixelLeft = XPos;    //¸¶¿ì½º ÀÌµ¿ÇÑ ¸¸Å­ ½½¶óÀÌ´õ ÀÌµ¿
				$("vol_position_bg").style.width = VolumeBar.style.pixelLeft - VolumeBar_StartPixel;
				var mouseMove = XPos - oldPixel;    //¸¶¿ì½ºÀÌµ¿°ª
				var currentVolumeValue = oldVolume - parseInt(mouseMove * volumeMin / VolumeBar_Size );

				if( currentVolumeValue <= -4929)
					$("MediaPlayer").Volume = volumeMin;
				else if (currentVolumeValue >= volumeMax)
					$("MediaPlayer").Volume = volumeMax;
				else
					$("MediaPlayer").Volume = currentVolumeValue;


			}
			return false;
		}//if (bDrag)
	}

	function VolumeStopSlider() {
		bDrag = false;
	}

	function VolumeInit() {

		//º¼·ýÃÊ±âÈ­

		VolumeBar.style.pixelLeft = VolumeBar_StartPixel + VolumeBar_Size /2  ;
		$("vol_position_bg").style.width = VolumeBar.style.pixelLeft - VolumeBar_StartPixel;
		$("MediaPlayer").Volume =  volumeMin / 2;
	}

	//À½¼Ò°Å  ---------------------------------------------------------------------------------------
	function setMute() {

		if (!bPlay)
			return ;

		if($("MediaPlayer").mute==false)
		{
			$('player_mute').src = imgpath+"btn_ctl_soundoff.gif";
			$("MediaPlayer").mute = true;
		}
		else
		{
			$('player_mute').src = imgpath+"btn_ctl_soundon.gif";
			$("MediaPlayer").mute = false;
		}
	}


	function playerControl(action, obj)
	{
		try {
			if (action == "play")
			{
				$("MediaPlayer").Play();
				play_botton.style.visibility = "hidden";
				pause_botton.style.visibility = "visible";
				stop_botton.style.visibility = "visible";

			}
			else if (action == "pause")
			{
				if ($("MediaPlayer").PlayState ==2)
					$("MediaPlayer").Pause();
				play_botton.style.visibility = "visible";
				pause_botton.style.visibility = "hidden";
				stop_botton.style.visibility = "visible";

			}
			else if (action == "open")
			{
				try{
					var movpath = obj.getAttribute("movfilename");

					$("MediaPlayer").open(movpath);  //µ¿¿µ»ó °æ·Î ¼³Á¤

					play_botton.style.visibility = "hidden";
					pause_botton.style.visibility = "visible";
					stop_botton.style.visibility = "visible";
					ScreenPlay.src = "";

				}catch(e){}

				//º¼·ý¼ÂÆÃ
				VolumeInit();
			}

			else if (action == "stop")
			{
				play_botton.style.visibility = "hidden";
				pause_botton.style.visibility = "hidden";
				stop_botton.style.visibility = "hidden";
				$("MediaPlayer").Stop();
				//º¼·ý¼ÂÆÃ
				VolumeInit();
			}
		}catch(e){
			alert("Àç»ýµÇÁö ¾Ê´Â µ¿¿µ»ó ÆÄÀÏÀÌ°Å³ª\nMicrosoft Widows Media Player6.4 ÀÌ»óÀÌ ¼³Ä¡µÇ¾î ÀÖÁö¾Ê½À´Ï´Ù.");
		}
	}



	//ÇÃ·¹ÀÌ Æ®·¢¹Ù ÀÚµ¿ÀÌµ¿-----------------------------------------------------------------------------------
	function ScrollBarState() {

		CurrentPosition.innerHTML = TimeFormat($("MediaPlayer").CurrentPosition);
		Duration.innerHTML = TimeFormat($("MediaPlayer").duration);

		if(bDrag == false)
		{
			progressBar.style.pixelLeft = progressBar_StartPixel + parseInt($("MediaPlayer").CurrentPosition*progressBar_Size/$("MediaPlayer").duration);
		}
			$("position_bg").width =parseInt($("MediaPlayer").CurrentPosition*progressBar_Size/$("MediaPlayer").duration);

	}


	function TimeFormat(totalsecond)
	{

		var second = parseInt(totalsecond) % 60;
		var minute = parseInt(totalsecond / 60);
		return ((minute < 10)?"0":"")+minute+":" + ((second < 10)?"0":"")+second;
	}

	function progressBuffering(bPlay)
	{
		if(bPlay)
		{
			var BufferingProgress = $("MediaPlayer").BufferingProgress;
			var disBuffer="";

			//for(var i=0; i < BufferingProgress; i=i+20)
			disBuffer +="<img src=http://www.blueb.co.kr/SRC/javascript/image5/naver_movie/img_bufferings.gif width=30 height=5>";
			/*
			PlayStateTable.style.visibility = "visible";
			PlayState.style.visibility = "visible";
			PlayState.innerHTML = disBuffer;
			*/
			
			if($("pmove2"))	$("pmove2").style.display = "none";
			if($("pmove"))	$("pmove").style.display = "";
		}
		else
		{
			/*
			PlayStateTable.style.visibility = "hidden";
			PlayState.style.visibility = "hidden";
			*/
			if($("pmove2"))	$("pmove2").style.display = "";
			if($("pmove"))	$("pmove").style.display = "none";			
		}

	}
	function onFullScreen()
	{
		$("MediaPlayer").DisplaySize = 3;
	}
	function onView(width,height)
	{
		document.all["MediaPlayer"].style.width = width;
		document.all["MediaPlayer"].style.height = height;

	}