function view_assembly(url)
{
	window.open(url,"회의록검색","resizable=yes,scrollbars=yes,status=yes");
	return false;
}

function findTerm()
{
	url = "inc/terms_search.php";
	window.open(url,"용어검색",'width=350,height=250,top=0,left=0,resizable=yes,scrollbars=yes');
}

function findWord(daesu,nameFile,mCode,page,totalPage,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	url = "inc/word_search.php";
	lnk = url+"?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode + "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight;
	window.open(lnk,"단어찾기",'width=265,height=190,top=0,left=0');
}

function angunView(daesu,nameFile,mCode,totalPage,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	w_left = screen.width - 460;
   url="inc/angun_view.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;lnk=" + lnk + "&amp;tag=" + tag;
   window.open(url,"부록파일보기",'width=450,height=200,scrollbars=yes,top=0,left=' + w_left);
}

function appendixView(apcode,apth,apcha,nameFile)
{
	w_top = (screen.height - 550)/2;
	w_left = (screen.width - 350)/2;
	url = "inc/appendix_view.php?nameCode=" + apcode + "&amp;apth="+ apth + "&amp;apcha="+ apcha + "&amp;nameFile=" + nameFile;
	window.open(url,"부록파일보기",'width=350,height=350,scrollbars=yes,top=0,left=0');
}

function linkView(daesu,nameFile,mCode,page,totalPage,pname,word,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	
	if(tag=="p")
	{
		url = "pageview1.php";
		url2 = "dis_frame_top1.php";
	}
	else
	{
		url = "pageview1t.php";
		url2 = "dis_frame_top1t.php";
	}
	
	window.parent.frames["frmTop"].location.href = url2 +"?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
	window.parent.frames["frmMiddle"].location.href = url + "?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
}

function fontToggle(daesu,nameFile,mCode,page,totalPage,pname,word,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	
	if(tag=="p")
	{
		url = "pageview1.php";
		url2 = "dis_frame_top1.php";
	}
	else
	{
		url  ="assembly_pageview.php";
		url2 = "assembly_topframe.php";
	}
	
	window.parent.frames["frmTop"].location.href = url2 + "?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
	window.parent.frames["frmMiddle"].location.href = url + "?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
}

function totalPageView(daesu,nameFile,mCode,page,totalPage,pname,word,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	
	window.parent.frames["frmTop"].location.href = "assembly_topframe.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
	window.parent.frames["frmMiddle"].location.href= "assembly_pageview.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
}

function pageView(daesu,nameFile,mCode,page,totalPage,pname,word,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	
	window.parent.frames["frmTop"].location.href = "assembly_topframe1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
	window.parent.frames["frmMiddle"].location.href = "assembly_pageview1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
}

function prePageView(daesu,nameFile,mCode,page,totalPage,pname,word,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	if(page==1) alert("첫페이지 입니다");
	else
	{
		page--;
		
		window.parent.frames["frmTop"].location.href = "assembly_topframe1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
		window.parent.frames["frmMiddle"].location.href = "assembly_pageview1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
	}
}

function nextPageView(daesu,nameFile,mCode,page,totalPage,pname,word,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	
	if(parseInt(page)>=parseInt(totalPage)) alert("마지막페이지 입니다");
	else
	{
		page++;
		
		window.parent.frames["frmTop"].location.href = "assembly_topframe1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
		window.parent.frames["frmMiddle"].location.href = "assembly_pageview1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
	}
}

function firstPageView(daesu,nameFile,mCode,page,totalPage,pname,word,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	
	if(page==1) alert("첫페이지 입니다");
	else
	{
		page = 1;
		
		window.parent.frames["frmTop"].location.href = "assembly_topframe1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
		window.parent.frames["frmMiddle"].location.href = "assembly_pageview1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
	}
}

function lastPageView(daesu,nameFile,mCode,page,totalPage,pname,word,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	
	if(page==totalPage) alert("마지막페이지 입니다");
	else
	{
		page = totalPage;
		
		window.parent.frames["frmTop"].location.href = "assembly_topframe1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
		window.parent.frames["frmMiddle"].location.href = "assembly_pageview1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
   }
}

function pageDirectView(daesu,nameFile,mCode,page,totalPage,pname,word,lnk,tag)
{
	form = document.frm;
	fontFamily = document.frm.fontFamily.value;
	fontSize = document.frm.fontSize.value;
	lineHeight = document.frm.lineHeight.value;
	
	if(parseInt(document.dfrm.dn.value)>totalPage) page = totalPage;
	else if(parseInt(document.dfrm.dn.value)<=0) page = 1;
	else page = parseInt(document.dfrm.dn.value);
	
	window.parent.frames["frmTop"].location.href = "assembly_topframe1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
	window.parent.frames["frmMiddle"].location.href = "assembly_pageview1.php?daesu=" + daesu + "&amp;nameFile=" + nameFile + "&amp;mCode=" + mCode +  "&amp;page=" + page + "&amp;totalPage=" + totalPage + "&amp;fontFamily=" + fontFamily + "&amp;fontSize=" + fontSize + "&amp;lineHeight=" + lineHeight + "&amp;pname=" + pname + "&amp;word=" + word + "&amp;lnk=" + lnk;
	
	return false;
}

function fieldSelect(form)
{
	form.dn.select();
}

function help_window()
{
	window.open('inc/assembly_help.php','','width=525,height=620,left=0,top=0,scrollbars=yes');
}

// 인쇄
var da = (document.all) ? 1 : 0;
var pr = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1);

function printPage(frame, arg)
{
	if(frame == window) printThis();
	else
	{
		link = arg; // 전역변수
		printFrame(frame);
	}
	
	return false;
}

function printThis()
{
	// NS4, IE5
	if(pr) window.print();
	// IE4 (Windows)
	else if(da && !mac) vbPrintPage();
	// 다른 브라우저
	else alert("Sorry, your browser doesn't support this feature.");
}

function printFrame(frame)
{
	// IE5
	if(pr && da)
	{
		frame.focus();
		window.print();
		link.focus();
	}
	// NS4
	else if(pr)
	{
		frame.print();
	}
	// IE4 (Windows)
	else if(da && !mac)
	{
		frame.focus();
		setTimeout("vbPrintPage(); link.focus();", 100);
	}
	// 다른 브라우저
	else alert("Sorry, your browser doesn't support this feature.");
}

if(da && !pr && !mac)
{
	with (document)
	{
		writeln('<OBJECT ID="WB" WIDTH="0" HEIGHT="0" CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
		writeln('<' + 'SCRIPT LANGUAGE="VBScript">');
		writeln('Sub window_onunload');
		writeln('  On Error Resume Next');
		writeln('  Set WB = nothing');
		writeln('End Sub');
		writeln('Sub vbPrintPage');
		writeln('  OLECMDID_PRINT = 6');
		writeln('  OLECMDEXECOPT_DONTPROMPTUSER = 2');
		writeln('  OLECMDEXECOPT_PROMPTUSER = 1');
		writeln('  On Error Resume Next');
		writeln('  WB.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER');
		writeln('End Sub');
		writeln('<' + '/SCRIPT>');
	}
}
