/* 롤 오버 함수 #*/
function namosw_cell_rollover(cell, classname) {
  if (document.all || document.getElementById) {
    cell.classBackup = cell.className;
    cell.className   = classname;
  }
}

function namosw_cell_rollout(cell){
  if (document.all || document.getElementById) {
    cell.className   = cell.classBackup;
  }
}
/*클릭함수 &*/
//function namosw_cell_click1(classname, classname2) {
//  if (document.all || document.getElementById) {
//    document.getElementById("seol").classBackup = cell.className;
//    document.getElementById("right_list1").className   = classname;
//    document.getElementById("31jeol").classBackup = cell.classname2;
//    document.getElementById("right_list2").className   = classname2;
//  }
//}

//function namosw_cell_click2(classname, classname2) {
//  if (document.all || document.getElementById) {
    //document.getElementById("31jeol").classBackup = cell.className;
//    document.getElementById("right_list1").className   = classname;
    //document.getElementById("seol").classBackup = cell.classname2;
//    document.getElementById("right_list").className   = classname2;
//  }
//}



/* 팝업 함수 #*/
var path = "../../content_data/";
var data_path = "data/";
var img_path = "img/";
var page_path = "page/";
var mode = 0;
//var DST_name = ['구술사연구방법1','구술사연구방법2','구술사연구방법3','안옥순 할머니의 장독이야기', '내고향인천', '성냥의불꽃같은역사', '1912년서울', '연구단발자취2', '연구단발자취1'];
//var content_src = ['pan_1.html', 'pan_2.html', 'pan_3.html', "jbdr.html", "bs_sd.html", "(00-24).html","(24-34).html", "gs_1.html","seman_village.html", "mudflat.html", "resident_story.html", "seman_deter.html",  "gs_2.html", "seman_1.html", "seman_2.html", "DSTic.html", "DSTsn.html", "1912-seoul.html", "young.html", "chon.html"];
var content_src = ['pan_1.html', 'pan_2.html', 'pan_3.html', "jbdr.html", "bs_sd.html",  "lee1.html", "lee2.html", "(00-24).html","(24-34).html", "gs_1.html","gs_2.html","DSTic.html", "DSTsn.html", "1912-seoul.html", "chon.html", "young.html", "lee_DST.html"];
/**
 * E-Book을 위한 새창 메소드 띠우기
 * input  : ebook_id
 * output : window
 */
var speed=2;


document.onkeyup = function()
{//키보드가 눌러졌을때 이벤트 실행
   if(window.event.keyCode==27)
	  {//키코드값 27(ESC키)가 눌러졌는지 확인
//			var state = parent.theme.bottom;	 
//			var state = document.getElementById("bottom");
//			var play = document.getElementById("bottom1");
		//	var archive = document.getElementById("bottom_ar");
			//var state = document.getElementById("bottom");
//			state.innerHTML = "<a href=\"javascript:div_play1();\"><img width='34' height='33' src=\"../image/jasang.png\" border='0'></a>&nbsp;&nbsp;&nbsp;";
//			play.innerHTML ="<a href=\"javascript:div_play2();\"><img width='34' height='33' src=\"./image/jasang.png\" border='0'></a>";
		//archive.innerHTML ="<a href=\"javascript:play_archive();\"><img width='34' height='33' src=\"../../main/image/jasang.png\" border='0'></a>";
		
  
return false;
			 
	  }


}


function test()
{
	alert('a');

}
/*function check()
{	//alert('aaa');
	var state =document.getElementById("bottom");
	if(MediaPlayer.Playstate == '0')
	{
		state.innerHTML = "<a href=\"javascript:div_play1();\"><img width='34' height='33' src=\"../image/jasang.png\" border='0'></a>&nbsp;&nbsp;&nbsp;";
		
	}

}*/
 /*마우스오버시 텍스트박스*/
function showtip(text) {  
tooltip.innerText=text;  
tooltip.style.display="inline";  
}  
function hidetip() {  
tooltip.style.display="none";  
}  
function movetip(num) {  
tooltip.style.pixelTop=document.body.scrollTop+num;  
tooltip.style.pixelLeft=document.body.scrollLeft+43;  
}  
 /*마우스오버시 텍스트박스*/

function ebook_play(id){
	//alert("http://210.117.184.234/ebook_test(v0.2)/ebook_v2.html?pID="+id);

	window.open('http://210.117.134.140/ebook_test(v0.2)/ebook_v2.html?pID='+id);
	//window.open("http://daum.net");//,'left=100, top=100, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=900, height=650');
}
function go_url(src){
	switch (src){
		case 0: 
			window.open('/pedia/','pedia','left=100, top=100, toolbar=yes, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=1000, height=650');
			break;
		case 1: 
			window.open('/new_archives/IR/project','InfoSearch','left=0, top=100, toolbar=yes, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=900, height=900');
			break;
		case 2: 
			window.open('/new_archives/Search_View/archives_identifier_search.php','FileSearch','left=100, top=100, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=900, height=650');
			break;
		case 3: 
			window.open('/min_history2/','History','left=50, top=0, toolbar=no, location=no, directories=no, tatus=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=900');
			break;
		case 4: 
			window.open('/min_history2/beta/main.html','History','left=50, top=0, toolbar=no, location=no, directories=no, tatus=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=900');
			break;
	}
}

function pan_play(arg)
{	
		window.open( path+page_path+content_src[arg], "sub_History", "right=500, top=200, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes width=768 height=500");
}

function dst_play(arg){
	if(arg=="16" || arg=="5" || arg=="6")
		window.open( path+page_path+content_src[arg], "sub_History", "right=0, top=0, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, titlebar=no");
	else
		window.open( path+page_path+content_src[arg], "sub_History", "right=0, top=0, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, titlebar=no, width=630 height=600");
}
/* 팝업 함수 */

function div_play(path_)
{
    	var name = ["lee1.wmv", "lee2.wmv", "(00-24).wmv", "(24-34).wmv", "gs_1.wmv",'gs_2.wmv', 'lee_DST.wmv', 'ic.wma', 'sn.wma', '1912_Seoul.asx', 'min_chon.wmv', 'min_young.wmv', 'pan_1.wmv', 'pan_2.wmv', 'pan_3.wmv', 'jbdr.wmv', 'bs_sd.wmv'];
		var access = document.getElementById("title");
		var bsp;		
		
		 bsp = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		
		if(path_  == name[0])
			access.innerHTML = "<td id=\"title\" >" +bsp+ "<이양호선생 영남대 워크샵영상> </td>";
		if(path_ == name[1])
			access.innerHTML = "<td id=\"title\" > " +bsp+ "<이양호선생 구술사학회 영상> </td>";
		if(path_ ==name[2])
			 access.innerHTML = "<td id=\"title\" > " +bsp+ "<영상으로 보는 구술사 연구방법1> </td>";
		if(path_ == name[3])
			access.innerHTML = "<td id=\"title\" > " +bsp+ "<영상으로 보는 구술사 연구방법2> </td>";
		if(path_ == name[4])
			access.innerHTML = "<td id=\"title\" >" +bsp+ " <영상으로 보는 구술사 연구방법3> </td>";
		if(path_ == name[5])
			access.innerHTML = "<td id=\"title\" > " +bsp+ "<안옥순 할머니의 장독대 이야기> </td>";
		if(path_ == name[6])
			access.innerHTML = "<td id=\"title\" > " +bsp+ "<이양호선생 추모영상> </td>";
		if(path_ == name[7])
			access.innerHTML = "<td id=\"title\" >" +bsp+ " <내 고향 인천> </td>";
		if(path_ == name[8])
			access.innerHTML = "<td id=\"title\" > " +bsp+ "<성냥의 불꽃같은 역사> </td>";
		if(path_ == name[9])
			access.innerHTML = "<td id=\"title\" >" +bsp+ " <1912년 서울_Roy C. Andrew> </td>";
		if(path_ == name[10])
			access.innerHTML = "<td id=\"title\" >" +bsp+ " <지난 6년간 연구회의 발자취> </td>";
		if(path_ == name[11])
			access.innerHTML = "<td id=\"title\" >" +bsp+ " <지난 6년간 연구회의 발자취> </td>";

		if(path_ == name[12])
			access.innerHTML = "<td id=\"title\" >" +bsp+ " <김제 광할면 이야기> </td>";
		if(path_ == name[13])
			access.innerHTML = "<td id=\"title\" >" +bsp+ " <시집살이 한풀이> </td>";
		if(path_ == name[14])
			access.innerHTML = "<td id=\"title\" >" +bsp+ " <정월대보름 이야기> </td>";
		if(path_ == name[15])		
			access.innerHTML = "<td id=\"title\" >" +bsp+ "<전북 도립 미술관 전시준비영상> </td>";
		if(path_ == name[16])
			access.innerHTML = "<td id=\"title\" >" +bsp+ " <부산,숙대전시회> </td>";
		var app = document.getElementById("play");
		app.style.visibility = "visible";
/* 자바스크립트에서 PARAM속성접근법 object의id.설정할PARAM NAME = "값"; */
		MediaPlayer.Play();
		MediaPlayer.AutoStart = "True";
		MediaPlayer.FileName = "../content_data/data/"+path_; 
		MediaPlayer.Player = "../content_data/data/"+path_;
}

function div_image(path,width, height)
{
		var app = parent.image;
		app.style.visibility = "visible";
		//var size = document.getElementById("size");

		//alert(path + " " + width + " " + height);
		//<IMG name="theme_img" src="<?=$faceimage?>" width="<?=$size_T[0]?>" height="<?=$size_T[1]?>" border="0">
		app.innerHTML = "<img src=" + path + " width=" + width + "height =" + height + " border = \"0\" alt=\"이미지를 한번 더 클릭하면 닫힙니다.\">";
}
function img_closer(){
	var app = parent.image;
		app.style.visibility = "hidden";
}
function ar_image(path, width, height)
{
//	alert(path + " " + width + " " + height);
   var max_width = width * 1.4;
   var max_height = height * 1.4;

   if(height < width)
  {
		width = max_width;
		height = (height * max_width)/width;
  }
  else if(height > width)
 {
		width = (width * max_height ) 	/ height;
		height = max_height;
  }

	var app = document.getElementById("ar_image");
	app.style.visibility = "visible";
	app.innerHTML = "<img src=" + path + " width=" + width + "height =" + height + " border = \"0\" alt=\"이미지를 한번 더 클릭하면 닫힙니다.\">";
}
function ar_closer()
{
	var app = document.getElementById("ar_image");
	app.style.visibility = "hidden";
}
function div_end()
{
		var app = document.getElementById("play");
		app.style.visibility = "hidden";
		MediaPlayer.Stop();
}

function div_play1() //플레이
{
	MediaPlayer.Play();
	var state = document.getElementById("bottom");	
	state.innerHTML = "<a href=\"javascript:div_pause();\"><img width='34' height='33' src=\"../image/pause.png\" border='0'></a>&nbsp;&nbsp;&nbsp;"	;
			
}
function div_pause() // 일시정지
{	    var state = document.getElementById("bottom");	
		MediaPlayer.Pause();
		if(MediaPlayer.PlayState == '1')
				state.innerHTML = "<a href=\"javascript:div_play1();\"><img width='34' height='33' src=\"../image/jasang.png\" border='0'></a>&nbsp;&nbsp;&nbsp;";
}

function ljstest(){
	/*if(MediaPlayer.DisplaySize == '3')
	{
		parent.theme.focus();
	}*/
	

	//document.form1.test.focus();
	window.focus();
	
	
	//alert("test");
	//play_archive();
	
}
function ljstest2(){
	//document.body.focus();
	var obj = document.getElementById("bottom_ar");	
	obj.focus();
	//.focus();
	//alert("test");
}


function div_play2()
{
	 MediaPlayer.Play();
 	var state1 = document.getElementById("bottom1");
	if(MediaPlayer.PlayState == '2')
		state1.innerHTML ="<a href=\"javascript:div_pause1();\"><img  width='34' height='33' src=\"./image/pause.png\" border='0'></a>";

}
function div_pause1()
{	  
	   var state1 = document.getElementById("bottom1");	
		MediaPlayer.Pause();
		if(MediaPlayer.PlayState == '1')
			state1.innerHTML ="<a href=\"javascript:div_play2();\"><img width='34' height='33' src=\"./image/jasang.png\" border='0'></a>";

}

function play_archive()
{
	 MediaPlayer.Play();
 	var state1 = document.getElementById("bottom_ar");
		state1.innerHTML ="<a href=\"javascript:pause_archive();\"><img  width='34' height='33' src=\"../../main/image/pause.png\" border='0'></a>";

}
function pause_archive()
{	  
	   var state1 = document.getElementById("bottom_ar");	
		MediaPlayer.Pause();
		if(MediaPlayer.PlayState == '1')
			state1.innerHTML ="<a href=\"javascript:play_archive();\"><img width='34' height='33' src=\"../../main/image/jasang.png\" border='0'></a>";

}

function player_fastForward() //빨리감기
{
    MediaPlayer.fastForward();
}

function player_fastReverse() //되감기
{
    MediaPlayer.fastReverse();
}

function div_stop() // 정지
{
	MediaPlayer.Stop();
}

function div_full() // 전체화면
{
		MediaPlayer.DisplaySize= "3";
		//MediaPlayer.width=MediaPlayer.width * 2.5;
		//MediaPlayer.height=MediaPlayer.height * 2.5;		

}

function player_resize(size)
{
	   var width = MediaPlayer.imageSourceWidth;
       var height = MediaPlayer.imageSourceHeight;
	   var width_ctrl = 5;
       var height_ctrl = 75;


	     MediaPlayer.width = size * width + width_ctrl;
         MediaPlayer.height = size * height + width_ctrl;
}

function div_visible()
{
	var access = document.getElementById("bottom");
	access.style.visibility = "visible";
}
function div_hidden()
{
	var access = document.getElementById("bottom");
	access.style.visibility = "hidden";
}
function div_visible1()
{
	var access = document.getElementById("bottom1");
	access.style.visibility = "visible";
}
function div_hidden1()
{
	var access = document.getElementById("bottom1");
	access.style.visibility = "hidden";
}


/********************************************************************************************************/

var dragapproved=false
function drag_dropie(){
if (dragapproved==true){
document.all.play.style.pixelLeft=tempx+event.clientX-iex
document.all.play.style.pixelTop=tempy+event.clientY-iey
return false
}
}
function initializedragie(){
iex=event.clientX
iey=event.clientY
tempx=play.style.pixelLeft
tempy=play.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie
}



if (document.all){
document.onmouseup=new Function("dragapproved=false")
}

/**************************************************************************************************************/


/* 오른쪽 탑 메뉴 서브 메뉴 보이기, 숨기기 함수 #*/
function showDetailSearch(obj){
	var obj_id = obj.substr(obj.length-1);
	var table = "tb" + obj_id;

	if(document.getElementById(table).style.display == "none") {
		document.getElementById(table).style.display = ""

		for(i = 1; i <= 4; i++) {
			if(i != obj_id) {
				var o_table = "tb" + i;
				document.getElementById(o_table).style.display = "none";
			}
			else {
				continue;
			}
		}
	}
	else {
		document.getElementById(table).style.display = "none"
	}
	
	setArrow(obj_id);
}

function setArrow(obj_id) {
	var right = "right" + obj_id;
	var down = "down" + obj_id;

	if(document.getElementById(right).style.display == "none") {
		document.getElementById(right).style.display = ""
		document.getElementById(down).style.display = "none"

		for(i = 1; i <= 4; i++) {
			if(i != obj_id) {
				var o_right = "right" + i;
				var o_down = "down" + i;

				document.getElementById(o_right).style.display = "none";
				document.getElementById(o_down).style.display = "";
			}
			else {
				continue;
			}
		}
	}
	else {
		document.getElementById(right).style.display = "none"
		document.getElementById(down).style.display = ""
	}
}
/* 오른쪽 탑 메뉴 서브 메뉴 보이기, 숨기기 함수 &*/

/* 오른쪽 탑 메뉴 로그인 관련 함수 #*/
function getfocus(obj) {
	var obj_id = document.getElementById(obj);

	obj_id.value="";
}
function getfocus1(obj) {
	var obj_PW = document.getElementById(obj);

	obj_PW.value="";
}

function Print() {
	alert("부르다");
}
/* 오른쪽 탑 메뉴 로그인 관련 함수 &*/

/* 아카이브 관련 함수 # */
function overMenuB(menu) {
	menu.runtimeStyle.color="FFAA00";
}

function outMenu(menu) {
	menu.runtimeStyle.color="";
}

/// 마우스의 이동에 따른 위치 정보를 저장
var cursor = new Array();
/// 마우스 이벤트 처리를 위한

function eventMove() {
	cursor["x"] = document.body.scrollLeft + event.clientX;
	cursor["y"] = document.body.scrollTop + event.clientY;
}

document.onmousemove = eventMove;

function Search_archives() {
	var FORM = eval("document.search_1");

	if(!FORM.key.value) {
		FORM.submit();
	}
	else {
		for(i = 0; i < FORM.search_type.length; i++) {
			if(FORM.search_type[i].checked == TRue)
				C_stype = FORM.search_type[i].value;
		}

		FORM.realkey.value = FORM.key.value;
		FORM.submit();
	}
}

function Search_archives_(temp) {
	var FORM = eval("document.search");

	FORM.realkey.value = temp;
	FORM.submit();
}

function onEnter(e) {
	if (e.keyCode==13) {
		Search_archives();
	}
}
/* 아카이브 관련 함수 & */

/* 하루동안 보이지 않기 #*/
function setCookie( name, value, expiredays ) { 
var todayDate = new Date(); 
todayDate.setDate( todayDate.getDate() + expiredays ); 
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
} 

function closeWin() { 
if ( document.forms[0].popup.checked ) 
setCookie( "popup", "done" , 1);  //숫자1은 하루를 의미
self.close(); 
} 
/* 하루동안 보이지 않기 &*/

/* 연구원 정보 관련 함수 #*/
function no_login(){
	alert("로그인이 필요합니다.");
}
/* 연구원 정보 관련 함수 &*/

/*var statusmsg = "www.minjung20.org";
function hidestatus(){
	window.status = statusmsg;
	return true;
}

function ClearURL(){
	if(event.srcElement.tagName == "A" || event.srcElement.tagName == "IMG"){
		SetTime = setTimeout("ClearURLs()",0);
	}
}

function ClearURLs(){
	window.status = statusmsg;
	clearTimeout(SetTime);
}

document.onmouseover = ClearURL;*/

/*function post_(temp) {
	var FORM = eval("document.search");

	FORM.realkey.value = temp;
	FORM.submit();
}*/

//'<?=$Title?>','<?=$Description?>','<?=$Coverage?>','<?=$Creator?>','<?=$Date?>'

function theme_image(src_image, title, des, cov, cre, date){
	var temp = "../../minjung_data/sm_Image_data/"+src_image;
	
	document.theme_img.src = temp;

	var main_title = document.getElementById("main_data_title");
	main_title.innerHTML = title;
	
	var middle = document.getElementById("main_description");
	middle.innerHTML = "<TABLE  border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><TR width=\"20\" height=\"20\" valign=\"top\"><TD width=\"80\" align=\"center\">주 요 내 용 : </TD> <TD>"+des+" </TD> </TR> <TR height=\"20\" valign=\"top\"> <TD width=\"80\" align=\"center\">자 료 배 경 : </TD> <TD>"+cov+" </TD> </TR></TABLE><DIV style=\"width:96%; margin:2%,0,0,0\" align=\"right\">"+cre+"&nbsp;/&nbsp;"+date+" </DIV>";
	
}
//	### 문자열 끊기 (이상의 길이일때는 ... 로 표시) ###
 function getStrCuts(str, max)
 {
	ns = str.substr(0, max);
		  if (ns.length != str.length) {
			 ns = ns + "...";
  }
	 return ns;
 }

function next(current)
{
	//var DST_name = ['구술사연구방법1','구술사연구방법2','구술사연구방법3','새만금의갯벌생계양식','새만금주민들의이야기1','새만금공사저지를위한삼보일배', '안옥순 할머니의 장독이야기', '새만금 영상민족지1', '새만금 영상민족지2', '내고향인천', '성냥의불꽃같은역사', '1912년서울', '연구단발자취2', '연구단발자취1'];
	var DST_name = [ 'lee1.html', 'lee2.html', '구술사연구방법1','구술사연구방법2','구술사연구방법3','안옥순 할머니의 장독이야기'];
	var con_text = document.getElementById("dst_right");
	var more_text = document.getElementById("more_right");
	var cnt = DST_name.length;
	var temp;

	if(current  >= cnt-1){
		con_text.innerHTML  = "<DIV id=\"dst_right\">";

		for(var i=0;  i<5;  i++)
		{
			if(i<=2) //i<=7;	배열인덱스 0~7까지 해당하는 동영상에 new이미지 붙임
			{
				var a='<img src=\'../main/image/new.gif\'>';
				con_text.innerHTML += "<DIV id=\"right_list\" OnMouseOut=\"namosw_cell_rollout(this)\" OnMouseOver=\"namosw_cell_rollover(this, 'nmsw_right_link')\" style=\"cursor:hand;\" onclick=\"javascript:dst_play("+(i+5)+");\"><STRONG>ㆍ</STRONG>"+getStrCuts(DST_name[i], 10)+a+"</DIV>";
			}
			else
			{
				con_text.innerHTML += "<DIV id=\"right_list\" OnMouseOut=\"namosw_cell_rollout(this)\" OnMouseOver=\"namosw_cell_rollover(this, 'nmsw_right_link')\" style=\"cursor:hand;\" onclick=\"javascript:dst_play("+(i+5)+");\"><STRONG>ㆍ</STRONG>"+getStrCuts(DST_name[i], 10)+"</DIV>";
			}
			temp = i;
		}
		con_text.innerHTML +="</DIV>";

		more_text.innerHTML ="<DIV id=\"right_list\" style=\"float:left\">주요 영상자료</DIV><DIV id=\"right_list\" style=\"float:right\" name=\"more_var\" style=\"float:right\" OnMouseOut=\"namosw_cell_rollout(this)\" OnMouseOver=\"namosw_cell_rollover(this, 'nmsw_right_link')\" style=\"cursor:hand;\" onclick=\"javascript:next(6)\">more</DIV><DIV id=\"right_list\" style=\"height:20px;\"></DIV>";
	}
	else{
		con_text.innerHTML  = "<DIV id=\"dst_right\">";
		var current_temp = cnt-current;
		var i_val;
		
		if(current_temp > 4){
			i_val =4;

			
			for(var i=current+1;  i<(current+1)+i_val;  i++)
			{
			
			if(i<=2) //i<=7;	배열인덱스 0~7까지 해당하는 동영상에 new이미지 붙임
			{
				var a='<img src=\'../main/image/new.gif\'>';
				con_text.innerHTML += "<DIV id=\"right_list\" OnMouseOut=\"namosw_cell_rollout(this)\" OnMouseOver=\"namosw_cell_rollover(this, 'nmsw_right_link')\" style=\"cursor:hand;\" onclick=\"javascript:dst_play("+(i+5)+");\"><STRONG>ㆍ</STRONG>"+getStrCuts(DST_name[i], 10)+a+"</DIV>";

			}
			else
			{
				con_text.innerHTML += "<DIV id=\"right_list\" OnMouseOut=\"namosw_cell_rollout(this)\" OnMouseOver=\"namosw_cell_rollover(this, 'nmsw_right_link')\" style=\"cursor:hand;\" onclick=\"javascript:dst_play("+(i+5)+");\"><STRONG>ㆍ</STRONG>"+getStrCuts(DST_name[i], 10)+"</DIV>";
			}
				temp = i;
			}
			con_text.innerHTML +="</DIV>";

			more_text.innerHTML ="<DIV id=\"right_list\" style=\"float:left\">주요영상자료</DIV><DIV id=\"right_list\" style=\"float:right\" name=\"more_var\" style=\"float:right\" OnMouseOut=\"namosw_cell_rollout(this)\" OnMouseOver=\"namosw_cell_rollover(this, 'nmsw_right_link')\" style=\"cursor:hand;\" onclick=\"javascript:next("+temp+")\">more</DIV><DIV id=\"right_list\" style=\"height:20px;\"></DIV>";
			
		}
		else{
			i_val = cnt;

			for(var i=current+1;  i<i_val;  i++)
			{
				if(i<=2) //i<=7;	배열인덱스 0~7까지 해당하는 동영상에 new이미지 붙임
			{
				var a='<img src=\'../main/image/new.gif\'>';
				con_text.innerHTML += "<DIV id=\"right_list\" OnMouseOut=\"namosw_cell_rollout(this)\" OnMouseOver=\"namosw_cell_rollover(this, 'nmsw_right_link')\" style=\"cursor:hand;\" onclick=\"javascript:dst_play("+(i+5)+");\"><STRONG>ㆍ</STRONG>"+getStrCuts(DST_name[i], 10)+a+"</DIV>";
			}
			else
			{
				con_text.innerHTML += "<DIV id=\"right_list\" OnMouseOut=\"namosw_cell_rollout(this)\" OnMouseOver=\"namosw_cell_rollover(this, 'nmsw_right_link')\" style=\"cursor:hand;\" onclick=\"javascript:dst_play("+(i+5)+");\"><STRONG>ㆍ</STRONG>"+getStrCuts(DST_name[i], 10)+"</DIV>";
			}

				temp = i;
			}
			con_text.innerHTML +="</DIV>";

			more_text.innerHTML ="<DIV id=\"right_list\" style=\"float:left\">주요 영상자료</DIV><DIV id=\"right_list\" style=\"float:right\" name=\"more_var\" style=\"float:right\" OnMouseOut=\"namosw_cell_rollout(this)\" OnMouseOver=\"namosw_cell_rollover(this, 'nmsw_right_link')\" style=\"cursor:hand;\" onclick=\"javascript:next("+temp+")\">more</DIV><DIV id=\"right_list\" style=\"height:20px;\"></DIV>";
	
			}
			
	}
	
}

function goChild(url)
{
	window.open(url);
}

function go_keep_Child(url)
{
	window.location.href=url;
}

/************************************황설희(MediaPlayer ProgressBar)*******************************************/
var oldPos = 0;            //클릭시 마우스좌표
var oldPixel = 0;        //클릭시 슬라이더 좌표
var bDrag = false;            //움직임
var bPlay = false;                //플레이중

/********************************************************************
재생 관련
********************************************************************/


function progressBar_onmousedown() {

  //  if (MediaPlayer.CurrentPosition == -1 )        //Player.FileName이 설정되어 있지 않으면 걍 리턴해 버린다.
 //       return false;
		//alert('aa');
		if(MediaPlayer.PlayState == '1') //재생상태이면
	   {
			 var state1 = document.getElementById("bottom_ar");	
			state1.innerHTML ="<a href=\"javascript:pause_archive();\"><img width='34' height='33' src=\"../../main/image/pause.png\" border='0'></a>";
		}
	if (MediaPlayer.PlayState == '6')
	{
		alert('Buffering...');
	}

    oldPos = event.clientX;
    bDrag  = true;
    TrackBar = event.srcElement.parentElement;
    oldPixel = progressBar.style.pixelLeft; 
    document.onmousemove = PlayMoveSlider;
    if(document.all)
    {
        document.onmouseup = PlayStopSlider;
    }
}

function PlayMoveSlider() {

    if (bDrag) {
        var XPos = oldPixel + (event.clientX - oldPos);    //최초 마우스다운일때 좌표에서 mousemove한 좌표값
        if((progressBar_StartPixel <= XPos  )
            && (XPos <= progressBar_StartPixel + (progressBar_Size  ) ) )    
        {
        
            //프로그래스바 이동
            document.all.progressBar.style.pixelLeft = XPos;
                
        }//if((XPos >= startVolPos) &&....
        return false;
    }
    
}


function PlayStopSlider() {

    bDrag = false;

    MediaPlayer.currentPosition  = Pixel2Pos(progressBar.style.pixelLeft - progressBar_StartPixel);
    if (MediaPlayer.PlayState == 1)    //일시 중지 일때, 즉 스라이더 움직임에 의해 중단되었을 때만, 다시 실행
        MediaPlayer.Play();
		
    document.onmousemove = null;
    if(document.all);
        document.onmouseup = null;
}    

function Pixel2Pos(nPixel)
{

        return parseInt((nPixel) * MediaPlayer.Duration / progressBar_Size);
}


//플레이 트랙바 자동이동-----------------------------------------------------------------------------------
function ScrollBarState() {

    CurrentPosition.innerHTML = TimeFormat(MediaPlayer.CurrentPosition);
    Duration.innerHTML = TimeFormat(MediaPlayer.duration);
    //alert(MediaPlayer.CurrentPosition);
	if( (MediaPlayer.CurrentPosition != 0) && MediaPlayer.CurrentPosition > MediaPlayer.Duration - 1){
		var state1 = document.getElementById("bottom_ar");	
			state1.innerHTML ="<a href=\"javascript:play_archive();\"><img width='34' height='33' src=\"../../main/image/jasang.png\" border='0'></a>";
	}
    if(bDrag == false)
    {
        progressBar.style.pixelLeft = progressBar_StartPixel + parseInt(MediaPlayer.CurrentPosition*progressBar_Size/MediaPlayer.duration);
    }
        position_bg.width =parseInt(MediaPlayer.CurrentPosition*progressBar_Size/MediaPlayer.duration);

}


function TimeFormat(totalsecond)
{
    
    var second = parseInt(totalsecond) % 60;
    var minute = parseInt(totalsecond / 60);    
    return ((minute < 10)?"0":"")+minute+":" + ((second < 10)?"0":"")+second;
}
/************************************황설희(MediaPlayer ProgressBar)*******************************************/

function popOpen(a,b,x,y,dest) { // a : 너비, b : 높이 , x : x 축 위치, y : y 축 위치
popWIn=window.open('about:blank','','fullscreen');
//popWIn.resizeTo(a,b); // 창의 크기를 지정합니다
//popWIn.moveTo(x,y); // 창의 위치를 지정합니다

// 팝업창에 보여줄 html 태그를 설정 합니다

popWIn.document.write("<html>");
popWIn.document.write("<head>");

popWIn.document.write("</head>");
popWIn.document.write("<DIV id='archives_view_big_img' style='padding: 3%,3%,2%,3%;'>");
popWIn.document.write("<table border='0' >");
popWIn.document.write("<tr>");
popWIn.document.write("<td>");
popWIn.document.write("<OBJECT ID='MediaPlayer' width='1024' height='768' CLASSID='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject' style='border:1.5px dotted #CCCDD0;'>");
popWIn.document.write("<PARAM NAME='FileName' VALUE= " + dest + ">");
popWIn.document.write("<PARAM NAME='ShowControls' VALUE='False'> ");
popWIn.document.write("<PARAM NAME='AutoRewind' VALUE='True'>");
popWIn.document.write("<PARAM NAME='EnablePositionControls' VALUE='3'>");
popWIn.document.write("<PARAM NAME='AutoStart' VALUE='True'>");
popWIn.document.write("<PARAM NAME='BufferingTime' VALUE='5'>");
popWIn.document.write("<PARAM NAME='ShowStatusBar' VALUE='0'>");
popWIn.document.write("<EMBED TYPE='application/x-mplayer2' SRC=" + dest + " NAME='MediaPlayer' width='485' height='300'></EMBED>");
popWIn.document.write("</OBJECT>");
popWIn.document.write("<script>");
popWIn.document.write("MediaTimer=window.setInterval('ScrollBarState()',500);");
popWIn.document.write("var progressBar_StartPixel =0;");
popWIn.document.write("var progressBar_Size = 414; ");
popWIn.document.write("</script>");
popWIn.document.write("<Table border='0' width='458'>");
popWIn.document.write("<tr>");
popWIn.document.write("<td width='100%' style='position:relative;'>");
popWIn.document.write("<DIV id='progressBar' style='Z-INDEX: 6; POSITION: relative; top:1px; left: 0px; padding:1%,0,3%,0' LANGUAGE='javascript' onmousedown='javascript:progressBar_onmousedown();' onmouseover='this.style.cursor='hand''>");
popWIn.document.write("<img height ='7' src='../../main/image/bar.png' width='45' height='8'>");
popWIn.document.write("<DIV style='Z-INDEX: 5; POSITION: absolute; left: 0px; top: -2.5px;  padding:1%,0,0,0'><img src='../../main/image/bar1.png' width='1' height='7' name='position_bg'>");
popWIn.document.write("</DIV>");
popWIn.document.write("</td>");
popWIn.document.write("</td>");
popWIn.document.write("</tr>");
popWIn.document.write("<tr>");
popWIn.document.write("<td>");
popWIn.document.write("&nbsp;");
popWIn.document.write("</td>");
popWIn.document.write("<td align='right' style='border:1px solid #CCCDD0; visibility:visible; ' class='p10 black vdn ls'>");
popWIn.document.write("&nbsp;");
popWIn.document.write("<span id='CurrentPosition'>00:00</span>");
popWIn.document.write("&nbsp;|&nbsp;");
popWIn.document.write("<span id='Duration' class='gray02'>00:00</span>");
popWIn.document.write("&nbsp;</td>");
popWIn.document.write("</tr>");
popWIn.document.write("</table>");


popWIn.document.close();
} 
