// 오른쪽 버튼 클릭을 못하게 하는 부분
if (window.Event) // 넷스케이프에서만 대문자 E.
  document.captureEvents(Event.MOUSEUP); // mouse up 이벤트를 잡음

function nocontextmenu() // IE4에서만 적용, 다른 브라우저는 무시
{
   event.cancelBubble = true
   event.returnValue = false;

   return false;
}

function norightclick(e)   // 다른 모든 브라우저에서 작동
{
   if (window.Event)   // 다시, IE 또는 NAV ?
   {
      if (e.which == 2 || e.which == 3)
         return false;
   }
   else
      if (event.button == 2 || event.button == 3)
      {
         event.cancelBubble = true
         event.returnValue = false;
         return false;
      }
   
}

function ctrl_click(){
     if((event.ctrlKey) || (event.shiftKey)||(event.keyCode = 27)) { 
       return false;
     } 
}

//document.oncontextmenu = nocontextmenu;      // IE5+ 용
//document.onmousedown = norightclick;      // 다른 브라우저 용
//document.onkeydown = ctrl_click; // 컨트롤키를 이용한 제어를 막는 부분

//상태바의 링크 주소 감추기 
//setInterval("hidestatu()",400);
function hidestatu(){
    window.status="2007 IPC General Assembly SEOUL";
	}

// CONTENT TAB MENU
function mOver()
{
	this.src = this.src.replace(".gif", "_on.gif");
}
function mOut()
{
	this.src = this.src.replace("_on.gif", ".gif");
}

/*********************************************************************************
   함수명 : allblur
   기  능 : 클릭한 흔적이 보이지 않도록
   인  수 : 
   리턴값 :
**********************************************************************************/
function allblur(){
	for(i=0;i<document.links.length;i++)
		document.links[i].onfocus=document.links[i].blur;
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG")
		document.body.focus(); 
}
document.onfocusin=allblur;

//OPENER url 바꾸기
function opener_url(url)
{
	opener.location=url;
}

//팝업 화면 중앙에 띄우기
function Win_pop(newwin,w,h, winname) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars=no,toolbars=no,status=no,menu=no';
win = window.open(newwin, winname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


//object 파일 패치 대비 
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;
  }
  
function playMedia(objID, objWidth, objHeight, objStyle)
  {
  	document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject" ');
  	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>');
  }  
  

function GetMPlayer(objID, vodurl, x, y, uimode) { 
	EmbedStr = "<OBJECT id='" + objID + "' classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' width='" + x + "' height='" + y + "' TYPE='application/x-oleobject' VIEWASTEXT >";
	EmbedStr += "<param name='AutoStart' value='true'>";
	EmbedStr += "<param name='windowlessVideo' value='false'>";
	EmbedStr += "<param name='uiMode' value='" + uimode + "'>";
	EmbedStr += "<param name='volume' value='80'>";
	EmbedStr += "<param name='bgcolor' value='#ffffff' />";
	EmbedStr += "<param name='stretchToFit' value='true'>";
	EmbedStr += "<param name='autoRewind' value='false'>";
	EmbedStr += "<param name='transparentAtStart' value='true'>";
	EmbedStr += "<param name='enableContextMenu' value='true'>";
	EmbedStr += "<param name='URL' value='" + vodurl + "'>";
	EmbedStr += "</OBJECT>";

	document.write(EmbedStr);
	return;
}


var IE = false ;
if (window.navigator.appName.indexOf("Explorer") !=-1)
{
	IE = true;
}


// 미디어 플레이어 볼륨 제어
		var nVolLeftPosition = 0;							// 볼륨 바 배경 시작점
		var nVolStartPosition = 0;							// 볼륨 바 시작 점
		var nVolEndPosition = 81;							// 볼륨 바 끝 점
		var nVolume = 55;									// 볼륨 초기 값
		var nPrevVol;										// 볼륨이 변경되기 전의 값
		var bIsVolumeSet		= false;						// 볼륨바 드래그 여부
		var nZoomed			= 0;							// 기본값 1 : 줌됨,   0 : 축소됨

		function killErr(){return true;}

		function setVolumeBar1(){
			nPrevVol = event.clientX;
			nVolLeftPosition = sound1.style.pixelLeft;

			bIsVolumeSet = true;
			document.onmousemove=drag_dropie1;
			if (document.all){document.onmouseup=endVolume;}
		}
		function setVolumeBar2(){
			nPrevVol = event.clientX;
			nVolLeftPosition = sound2.style.pixelLeft;

			bIsVolumeSet = true;
			document.onmousemove=drag_dropie2;
			if (document.all){document.onmouseup=endVolume;}
		}

		function drag_dropie1(){
			if (bIsVolumeSet==true){
				var mov = nVolLeftPosition+event.clientX-nPrevVol;
				if ((mov >= nVolStartPosition)  && (mov < nVolEndPosition)){
					cutpoint=nVolEndPosition-sound1.style.pixelLeft;
					document.all.soundbg1.style.pixelWidth=58-cutpoint;
					//document.all.sbg.width = 58-cutpoint;
					sound1.style.pixelLeft=nVolLeftPosition+event.clientX-nPrevVol;
					mplayer.Volume = -2500*(cutpoint/56);
					nVolume=sound1.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 splay(){
        if (mplayer.controls.isAvailable('Play')) {
            mplayer.controls.Play();
            document.all.play_img.src = "images/main/player_pause.gif";
            document.all.play_img.alt = "pause";
        } else {
            mplayer.controls.Pause();
            document.all.play_img.src = "images/main/player_play.gif";
            document.all.play_img.alt = "play";
        }
    }

    function sstop(){
      		mplayer.controls.Stop();
            document.all.play_img.src = "images/main/player_play.gif";
            document.all.play_img.alt = "play";
    }
    
function player_resize(no)
{
var winl = 0;
var wint = 0;

    if (vod_player.controls.isAvailable('Play')) vod_player.controls.Play();
    var width = vod_player.currentMedia.imageSourceWidth;
    var height = vod_player.currentMedia.imageSourceHeight;
    var width_ctrl = 0;
    var height_ctrl = 65;

    if (vod_player.uiMode == 'invisible') {
        width_ctrl = 0;
        height_ctrl = 0;
    } else if (vod_player.uiMode == 'none') {
        width_ctrl = 0;
        height_ctrl = 0;
    } else if (vod_player.uiMode == 'mini') {
        width_ctrl = 20;
        height_ctrl = 45;
    } else if (vod_player.uiMode == 'full') {
        width_ctrl = 20;
        height_ctrl = 45;
    }

    vod_player.stretchToFit = 'true';

    switch (no) {
        case 0:
			vod_player.width = 1 * width + width_ctrl;
			vod_player.height = 1 * height + height_ctrl;
		break;
        case 1:
			winl = (screen.width - 380) / 2;
			wint = (screen.height - 445) / 2;
			self.resizeTo(390,445);

			self.moveTo(winl, wint);
			vod_player.width = 320;
			vod_player.height = 305;
		break;
        case 2:
			winl = (screen.width - 700) / 2;
			wint = (screen.height - 685) / 2;
			self.resizeTo(710,685);

			self.moveTo(winl, wint);
			vod_player.width = 640;
			vod_player.height = 545;
		break;
        case 3:
			if (vod_player.playState == 3) vod_player.fullScreen = 'true';
		break;
    }
}
//-->