/* ·Ñ ¿À¹ö ÇÔ¼ö #*/
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.184.91/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 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();
} 