function dell(obj,obj1,locatenum){
	var mg = confirm(obj+"ÆÄÀÏÀÌ Áö¿öÁý´Ï´Ù.");	
	//return false;
	if (mg==true)
	{		
			document.file.mode.value = 'dell';
			document.file.file.value = obj;			
			document.file.page.value = obj1;		
			if(locatenum == 1) {document.file.type.value = "1" }
			if(locatenum == 2) {document.file.type.value = "2" }
			if(locatenum == 3) {document.file.type.value = "3" }
			if(locatenum == 4) {document.file.type.value = "4" }
			if(locatenum == 5) {document.file.type.value = "5"}
			document.file.action='./Dellfile.php'
			document.file.submit();
	}
	//window.open('./Dellfile.php?files='+obj,'win','left=1000, top=0, width=0, height=0, scrollbars=no, status=no');
	//alert(obj+"ÆÄÀÏÀÌ Áö¿ö Á³½À´Ï´Ù.");
}
function OnCopyPath(obj)
{	      
	clipboardData.setData("Text", obj);
	alert('ÀÌ¹ÌÁö °æ·Î°¡ º¹»çµÇ¾ú½À´Ï´Ù.\nCtrl + V¸¦ ´©¸£½Ã¸é ºÙ¿©³Ö±â°¡ °¡´ÉÇÕ´Ï´Ù.');

}
function vuD(w,h){ //ÀÌ¹ÌÁö¸¦ Å¬¸¯ÇÏ¸é »õÃ¢À» ¶ç¿ö ¿ø·¡ÀÇ Å©±â·Î º¸¿©ÁØ´Ù.
  io=new Array(); //ÀÌ¹ÌÁö°´Ã¼ÀÇ Å©±â¸¦ ´ãÀ» ¹è¿­
  e=event.srcElement;  
  //»õÃ¢À» ÀÌ¹ÌÁöÀÇ Å©±â¸¸Å­ ¿­°í
  test=window.open('','tst','width='+w+',height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no'); 
  
  //»õÃ¢¿¡ ¹è°æÀ¸·Î ±×¸²À» »Ñ¸²
  test.document.write("<body style='background-repeat: no-repeat' topmargin=0 leftmargin=0 background="+e.src+" onclick=self.close()>");
 
}
function downs(obj,obj1){
	document.file.mode.value = 'down';
	document.file.file.value = obj;
	//document.file.locate.value = "./mgImages.php?page="+obj1;
	document.file.action='./Down.php'
	document.file.submit();		
}

function renames(obj,obj1,obj2){	
	window.open('./Refile.php?file='+obj+'&page='+obj1+'&type='+obj2,'win','left=100, top=200, width=300, height=130, scrollbars=no, status=no');
	//alert(obj+"ÆÄÀÏÀÌ Áö¿ö Á³½À´Ï´Ù.");
}
function forward(obj,obj1){	
	window.open('./foward.php?file='+obj+'&page='+obj1,'win','left=100, top=200, width=400, height=130, scrollbars=no, status=no');
	//alert(obj+"ÆÄÀÏÀÌ Áö¿ö Á³½À´Ï´Ù.");
	//location.href="/sub/use10.html?files="+obj;
}
function tagmakes(obj,obj1){	
	//window.open('./foward.php?file='+obj+'&page='+obj1,'win','left=100, top=200, width=400, height=130, scrollbars=no, status=no');
	//alert(obj+"ÆÄÀÏÀÌ Áö¿ö Á³½À´Ï´Ù.");
	location.href="/sub/use10.html?files="+obj;
}
function createtag(obj){
	window.open('./mgTagview.php?mode=img&files='+obj,'win','left=100, top=200, width=520, height=150, scrollbars=no, status=no');
 
}
function flvtag(obj){
	window.open('./mgFtagview.php?mode=flv&files='+obj,'win','left=100, top=200, width=800, height=220, scrollbars=no, status=no'); 
}
function videotag(obj){
	window.open('./mgVtagview.php?mode=flv&files='+obj,'win','left=100, top=200, width=500, height=150, scrollbars=no, status=no'); 
}
function OnCopyPaths(obj)
{	      
	var obj1;
    obj1 =	document.getElementById("view").value;	
	clipboardData.setData("Text", obj1);
	alert('ÀÌ¹ÌÁö °æ·Î°¡ º¹»çµÇ¾ú½À´Ï´Ù.\nCtrl + V¸¦ ´©¸£½Ã¸é ºÙ¿©³Ö±â°¡ °¡´ÉÇÕ´Ï´Ù.');
	self.close();
}

var req;
//ajax 
function newXMLHttpRequest()
{
	var xmlreq = false;
	if (window.XMLHttpRequest)
	{
		xmlreq = new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		try
		{
			xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch (e1)
		{
			try
			{
				xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e2) 
			{
				// 
			}
		}
	}
	return xmlreq;
}

function flv_tag(obj)
{
	req = newXMLHttpRequest();
	req.onreadystatechange = processReqChange1;			
	poststr = "files="+obj;	
	req.open("POST", "/proc/proc_flv.php", true);
	req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	req.send(poststr);
	//return true;
  //document.getElementById("help1").innerHTML  =  obj;		
}

function processReqChange1()
{
	if (req.readyState == 4)
	{
		if (req.status == 200)
		{
			document.getElementById("view").innerHTML = req.responseText;									
		}
		else alert("There was a problem retrieving the XML data:\n" + req.statusText);
	}
}
function video_tag(obj)
{
	req = newXMLHttpRequest();
	req.onreadystatechange = processReqChange2;			
	poststr = "files="+obj;	
	req.open("POST", "/proc/proc_video.php", true);
	req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	req.send(poststr);
	//return true;
  //document.getElementById("help1").innerHTML  =  obj;		
}
function processReqChange2()
{
	if (req.readyState == 4)
	{
		if (req.status == 200)
		{
			document.getElementById("viewv").innerHTML = req.responseText;									
		}
		else alert("There was a problem retrieving the XML data:\n" + req.statusText);
	}
}