	////////////////////////////////////////////////
	function DispPlayer( ){
		document.writeln('<OBJECT classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" id=player ');
		document.writeln('	style="ACCELERATOR: true; WIDTH:1px; HEIGHT:1px; LEFT:0px; TOP:0px;"');
		document.writeln('	codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52701" ');
		document.writeln('	TYPE="application/x-oleobject" STANDBY="Microsoft Windows Media Player를 설치중입니다.">');
		document.writeln('	<PARAM NAME="AutoStart" VALUE="false">');
		document.writeln('</OBJECT>');
	}

	// used parent and child //////////////////////////////////////////////////////
	function PlayTrack( ){
		if(!gs_fname) return;
		if(!run_server_post("run_clip",encodeURIComponent(gs_fname),runFuncPlayer)) alert('embeded_html_error');
	}

	////////////////////////////////////////////////
	function runFuncPlayer(id_name,resFirst){
		var sHead="ok_clip|";
		if(resFirst.length > sHead.length && resFirst.substr(0,sHead.length) == sHead) {
			resFirst = resFirst.replace("\\",'');
			var z_array = resFirst.split('|');
			var s_entry = z_array[1];
			var s_title = z_array[2];
			var s_link  = z_array[3];
			if(!s_link) return;

			try{			
				document.clips.m_entry.value = s_entry;
				document.clips.m_title.value = s_title;
				blog_main.document.all.mqa.innerText = s_title; //////////////////

				document.all.player.URL = s_link;
				document.all.player.controls.Play();
			}catch(e){
				parent.document.clips.m_entry.value = s_entry;
				parent.document.clips.m_title.value = s_title;
				if(document.all.mqa) document.all.mqa.innerText = s_title;			

				parent.document.all.player.URL = s_link;
				parent.document.all.player.controls.Play();
			}
		}else blog_main.document.all.mqa.innerText = resFirst; /////////////////
	}
	// used parent and child //////////////////////////////////////////////////////

	// used child only ///////////////////////
	function set_gsfname( ){
		if(parent.document.clips){
			var i_currnt = parseInt(parent.document.clips.current.value);
			if(i_currnt){
				var ob_fname = eval("parent.document.clips.fname_"+i_currnt);
				if(ob_fname){
					gs_fname = ob_fname.value;
					return gs_fname;
				}
			}
		}	
		return '';
	}

	// used child only ///////////////////////
	function on_player(iopt){
		var ob_clips = parent.document.clips;
		var ob_player= parent.document.all.player;
		switch(iopt){
		case 0: //////////////////////////////////////////////////////////////
			if(ob_clips && parseInt(ob_clips.m_entry.value) > 0){
				document.location.href='/post/'+ob_clips.m_entry.value;
			}			
			break;
		case 1: ////////////////////////////////////////////////////////////// pause/play
			if(ob_player && ob_clips){
				if     (ob_player.playState == 3) ob_player.controls.pause(); //mbPlaying
				else if(ob_player.playState == 2) ob_player.controls.play (); //mbPause
				else if(set_gsfname()){
					ob_clips.running.value = '1';					
					PlayTrack();
				}
				else {
					document.all.mqa.innerText = ob_clips.m_title.value;
					ob_player.controls.play();
				}
			}else top.document.location.href='/';
			break;
		case 2: ////////////////////////////////////////////////////////////// stop
			if(ob_clips && ob_player){
				ob_clips.btnstop.value = '1';
				ob_player.controls.stop();
			}
			break;
		case 3: ////////////////////////////////////////////////////////////// next
			if(!ob_clips || !ob_player) break;
			if(ob_clips.btnstop.value == '1') break;

			if(ob_clips.running.value == '1') break;
			ob_clips.running.value = '1';

			// Next Play //////////////////////////////
			var i_curdx = parseInt(ob_clips.current.value)+1;
			if(i_curdx > gi_maxdx) i_curdx = 1;

			var s_fname = '';
			for(i=i_curdx ; i <= gi_maxdx ; i++){			
				var ob_fname = eval("parent.document.clips.fname_"+i);
				if(ob_fname.value){
					s_fname = ob_fname.value;
					i_curdx = i;
					break;
				}
			}
			if(!s_fname && i_curdx > 1){
				s_fname = ob_clips.fname_1.value;
				i_curdx = 1;
			}
			if(!s_fname) i_curdx = 0;
			ob_clips.current.value = i_curdx;

			if(s_fname){
				gs_fname = s_fname;
				PlayTrack( );
			}else{
				gs_fname = '';
				ob_clips.running.value = '0';
			}	
			// Next Play //////////////////////////////
			break;
		case 4: ////////////////////////////////////////////////////////////// list
			if(ob_player && ob_clips)	m_listbox( );
			else top.document.location.href='/';
			break;
		}
	}

	// used child only ///////////////////////
	function play_now(i_entry){
		if(parseInt(i_entry) <= 0) return;
		if(!parent.document.clips){
			top.document.location.href='/'+i_entry;
			return;
		}
		on_player(2);
		try{parent.document.clips.running.value = '1';}catch(e){}
		gs_fname = i_entry;		
		PlayTrack( );
	}

	/////////////////////////////////////////////////////////////////////////////
	function m_listbox( ){
		var s_url = "/win_mlist.php?q=0";
		OpenWrapBox(360,460,'뮤직큐 - 클립 트랙스 / MusicQue - Clip Tacks',s_url,true,true);
	}