

function showTitleImage()
{
	var xpos = event.x;
	var ypos = event.y;
	MM_showHideLayersEx('apDiv1','','show', xpos - 200, ypos - 310);
}

function goJournalView(gubun, typeCd, seq)
{
	document.location.href = "/kor/publication/pubReportTotalView.do?seq=" + seq + "&gbn=" + gubun + "&typeCd=" + typeCd;
}

function goPageEx5(page)
{
	var form = document.getElementById("PubReportForm");	

	form.page.value = page;	
	form.submit();
}
function goPageEx(page)
{
	var form = document.getElementById("KeywordForm");	

	form.page.value = page;	
	form.submit();
}

function goPageEx2(page)
{
	var form = document.getElementById("AuthorForm");	

	form.page.value = page;	
	form.submit();
}

function goPageEx3(page)
{
	var form = document.getElementById("ReportForm");	

	form.page.value = page;	
	form.submit();
}

function goPageEx4(page)
{
	var form = document.getElementById("BookListForm");	

	form.page.value = page;	
	form.submit();
}

function goView(seq)
{ 
	document.location.href = "/kor/publication/pubReseachReportView.do?seq=" + seq;
}

arr = new Array("div1","div2");

function ShowMenu(sdiv) {
	 document.getElementById("div1").style.display='block';

    for(i=0;i<arr.length;i++) {
        if(arr[i] == sdiv){ 
            document.getElementById(arr[i]).style.display='block';
        }else{  
            document.getElementById(arr[i]).style.display='none';
        }
	}
}

arr2 = new Array("div1","div2","div3");
function ShowMenu2(sdiv) {
    for(i=0;i<arr2.length;i++) {
        if(arr2[i] == sdiv)  {
            document.all[arr2[i]].style.display='';
        }
        else {
            document.all[arr2[i]].style.display='none';
        }
    }
}

function goPubList()
{
	document.location.href = "/kor/publication/pubReseachReportList.do";
}

function goJournalList(gbn)
{
	document.location.href = "/kor/publication/pubReportTotalList.do?gbn=" + gbn;
}

function goSmallView(seq, tseq, sseq, gbn, typeCd)
{
	document.location.href="/kor/publication/pubReportSmallView.do?seq=" + seq + "&tseq=" + tseq + "&sseq=" + sseq + "&gbn=" + gbn + "&typeCd=" + typeCd; 
}

function goReportView(seq, gbn, typeCd) 
{
	document.location.href="/kor/publication/pubReportTotalView.do?seq=" + seq + "&gbn=" + gbn + "&typeCd=" + typeCd;
}

function goBookList(gbn)
{
	document.location.href="/kor/publication/pubBookList.do?gbn=" + gbn;
}

function goPubBookView(seq, gbn)
{
	document.location.href="/kor/publication/pubBookView.do?seq=" + seq + "&gbn=" + gbn;
}

var xmlHttp = "";

//연구보고서[AK06] 파일다운로드 히트 카운트
function createXMLHttpRequest()
{
	if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();    
	}
}

function makeReportParameter(bbsCd, seq, member_id)
{	
	var parameter = "?bbsCd="+bbsCd+"&seq="+seq;
	if( member_id != '' && member_id != null)	goFileDownloadHit(parameter);
}

function makeJournalParameter(bbsCd, seq, member_id)
{
	
	var parameter = "?bbsCd="+ bbsCd+"&seq="+seq;
	if( member_id != '' && member_id != null)	goFileDownloadHit(parameter);	
}

function goFileDownloadHit(parameter)
{
	createXMLHttpRequest();
	var url = "/kor/publication/pubFiledownloadHit.do"+parameter;	
	if(xmlHttp != null) {
		xmlHttp.open("GET", url, true);
		xmlHttp.onreadystatechange = callback;
	    xmlHttp.send(null);
	}
}

function callback(){	
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){
		}
	}					
}

function goDownload(filepath)
{
	document.location.href="/download/file_download.do?path=" + encodeURI(filepath);
}
