//// °Ë»ö¿ë ÇÔ¼öµé
function check_sform(obj) {
	if (obj.skeyword.value=='') {
		alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		return false;
	} else if(obj.skeyword.value.length < 2) {
		alert('2ÀÚÀÌ»óÀÇ °Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		return false;
	}
	obj.submit();
	return true;
}

function onEnterKey(obj) {   
	if(event.keyCode ==13)  check_sform(obj);
}

//// ¹Ìµð¾î¿ë ÇÔ¼öµé
/*
   * »óÅÂ ÄÚµå, »óÅÂ, Á¤È®ÇÑ ¼³¸í
   *
   * 0, Undefined, Windows Media Player is in an undefined state. 
   * 0, Stopped, Playback of the current media clip is stopped. 
   * 1, Paused, Playback of the current media clip is paused. When media is paused, resuming playback begins from the same location. 
   * 2, Playing, The current media clip is playing. 
   * 4, ScanForward, The current media clip is fast forwarding. 
   * 5, ScanReverse, The current media clip is fast rewinding. 
   * 6, Buffering, The current media clip is getting additional data from the server. 
   * 7, Waiting, Connection is established, however the server is not sending bits. Waiting for session to begin. 
   * 8, MediaEnded, Media has completed playback and is at its end.  
   * 9, Transitioning, Preparing new media. 
   * 10, Ready, Ready to begin playing. 
   * 11, Reconnecting, Reconnecting to stream. 
   ex) Player.playState != 3
*/

function reload_music()
{
	parent.TopFrame.location.reload();
	setTimeout("change_title()",2000);	
}

function pause_music()
{
	if(parent.TopFrame.document.fmplay.playState > 1) {
		parent.TopFrame.document.fmplay.pause();
		musicTitle2.innerHTML =	"<b>PAUSED MUSIC</b>";
	} else 	if(parent.TopFrame.document.fmplay.playState == 1) {
	   play_music();
   }
}

function play_music()
{
	parent.TopFrame.document.fmplay.play();
	change_title();
}

function stop_music()
{
	parent.TopFrame.document.fmplay.stop();
	musicTitle2.innerHTML =	"<b>STOPPED MUSIC</b>";
}

function change_title() 
{
	musicTitle2.innerHTML =	parent.TopFrame.window.musicTitle;
}

function get_playerstat()
{
   return parent.TopFrame.document.fmplay.playState;
}
