
/*---------------------------------------
MOVIE Control
-----------------------------------------*/

function mplay(){ //PLAY
  document.getElementById('mdefault').style.display='block';
  document.getElementById('mplayer').play();
}
function mpause(){ //PAUSE
  document.getElementById('mplayer').pause();
}
function mstop(){ //STOP
  document.getElementById('mplayer').stop();
}

//º¼·ý¹Ù
var nVolLeftPosition = 0;							// º¼·ý ¹Ù ¹è°æ ½ÃÀÛÁ¡
var nVolStartPosition = 20;							// º¼·ý ¹Ù ½ÃÀÛ Á¡
var nVolEndPosition = 63;							// º¼·ý ¹Ù ³¡ Á¡
var nVolume = 63;									// º¼·ý ÃÊ±â °ª
var nPrevVol;										// º¼·ýÀÌ º¯°æµÇ±â ÀüÀÇ °ª
var bIsVolumeSet		= false;						// º¼·ý¹Ù µå·¡±× ¿©ºÎ
var nZoomed			= 0;							// ±âº»°ª 1 : ÁÜµÊ,   0 : Ãà¼ÒµÊ

function killErr(){return true;}

function setVolumeBar(){
	nPrevVol = event.clientX;
	nVolLeftPosition = sound.style.pixelLeft;

	bIsVolumeSet = true;
	document.onmousemove=drag_dropie;
	if (document.all){document.onmouseup=endVolume;}
}

function drag_dropie(){
	if (bIsVolumeSet==true){
		var mov = nVolLeftPosition+event.clientX-nPrevVol;
		if ((mov >= nVolStartPosition)  && (mov < nVolEndPosition)){
			cutpoint=nVolEndPosition-sound.style.pixelLeft;
			document.all.soundbg.style.pixelWidth=63-cutpoint;
			//document.all.sbg.width = 58-cutpoint;
			sound.style.pixelLeft=nVolLeftPosition+event.clientX-nPrevVol;
			mplayer.Volume = -2500*(cutpoint/63);
			nVolume=sound.style.pixelLeft
			nVolume1=document.all.sbg.width;
			mplayer.Mute=false;
		}
		return false;
	}
}

function endVolume(){
	bIsVolumeSet=false;
}

function ris(name, nsdoc)
{
	var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
	if (name == '') return;
	if (img && img.altsrc) {
		img.src    = img.altsrc;
		img.altsrc = null;
	}
}

function cis(name, nsdoc, rpath, preload)
{ 
	var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
	if (name == '')	return;
	if (img) {
		img.altsrc = img.src;
		img.src    = rpath;
	}
}		
  
function mutecheck(){
  if(document.all.mplayer.mute==0) document.all.mplayer.mute=1;
  else document.all.mplayer.mute=0;
}

function mresize(no)
{
  url=document.getElementById('mplayer').FileName;  
  url='/pr/pop_mediafull.asp?url='+url;
  document.getElementById('mplayer').stop();
  window.open(url,'fwin','status=no,scrollbars=yes,menubar=no,resizable=no,fullscreen=yes');
}

function mzoom(){
  url=document.getElementById('mplayer').FileName;  
  url='/pr/pop_media.asp?url='+url;
  document.getElementById('mplayer').stop();
  Win_pop(url,484,362);   
}

/*-------------------------------------------------------------------
OBJECT ÆÄÀÏ ÆÐÄ¡ - IE PATCH(ÀÌ¿Ã¶ó½º ÆÐÄ¡) Áö¿ì¸é ¹«ºñÇÃ·¹ÀÌ¾ÈµÊ
---------------------------------------------------------------------*/
var paramInfo = new Array;

function initParam()
{
  var oldSize = paramInfo.length;

	for (var i=0; i<oldSize; i++) {
		paramInfo.length--;
	}	
}

function setParam(paramName, paramValue)
{
	var idx = paramInfo.length;

	paramInfo[idx] = [];
	paramInfo[idx][0] = paramName;  
	paramInfo[idx][1]= paramValue;
}

//MOVIE
function playMedia(objID, objSource, objWidth, objHeight, objStyle)
{
	document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ');
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');

	for (var i=0; i<paramInfo.length; i++) {
		document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');		
	}	
	
	document.write('</OBJECT>');
}

