var bControl = false;
var bLoader = false;
function playstory(movie,title,date,bg)
{	
	if ((navigator.userAgent.indexOf('IE') > -1) && (navigator.platform == "Win32")) 
	{			
		MediaPlayer1.filename		=  movie;
//		CFTitle.innerHTML				=	title;									// Å¬¸¯µÈ Á¦¸ñÀ¸·Î º¯°æ
//		CFDT.innerHTML				=  date;									// Å¬¸¯µÈ ³¯Â¥·Î º¯°æ
		largeImg.background			= bg;		// Å«ÀÌ¹ÌÁö º¯°æ

	} 
	else 
	{	
		document.MediaPlayer1.filename = movie;
		document.CFTitle.innerHTML		=	title;							// Å¬¸¯µÈ Á¦¸ñÀ¸·Î º¯°æ
		document.CFDT.innerHTML			=  date;							// Å¬¸¯µÈ ³¯Â¥·Î º¯°æ 
		document.largeImg.background	= +bg;		// Å«ÀÌ¹ÌÁö º¯°æ
//		alert(bg);

	}

}


function loader(){
	bLoader = true;
	if ((navigator.userAgent.indexOf('IE') > -1) && (navigator.platform == "Win32")) {
		bControl = true;
	} else {
		var plugIn = document.MediaPlayer1;
		bControl = false;
		document.appObs.setByProxyDSPlayStateChangeObserver(plugIn,true); // listen for NewStream Event	
	}
	document.MediaPlayer1.Play(); 
}

function StopClick()
{
	document.MediaPlayer1.Stop(); 
	if (bControl == true){
		document.MediaPlayer1.CurrentPosition=0;
	} else {
	   if(bLoader){
		document.MediaPlayer1.SetCurrentPosition(0);
	   }
	}
}

function PauseClick()
{
   	if (bControl == true) {
		if (document.MediaPlayer1.PlayState == 2){
			document.MediaPlayer1.Pause();
		}
	} else {
	   if(bLoader){	
		if (document.MediaPlayer1.GetPlayState() == 2){
			document.MediaPlayer1.Pause();
		}
	   }
   	}
}
