// JavaScript Document
<!--
// Called by /common/parameterSend.jsp
function create_pageManager(){
	document.write("<form name='frmPageMan' method='POST' action=''>");
	document.write("<input type='hidden' name='listAction' value=''>");
	document.write("<input type='hidden' name='viewAction' value=''>");
	document.write("<input type='hidden' name='writeAction' value=''>");
	document.write("<input type='hidden' name='redirectURL' value=''>");
	
	document.write("<input type='hidden' name='act'>");
	document.write("<input type='hidden' name='seq'>");
	document.write("<input type='hidden' name='permit_write' value='A'>");
	document.write("<input type='hidden' name='permit_read' value=''>");
	document.write("<input type='hidden' name='permit_list' value=''>");
	document.write("<input type='hidden' name='page' value='1'>");
	document.write("<input type='hidden' name='keyword' value=''>");
	document.write("<input type='hidden' name='keykind' value=''>");
	document.write("</form>");
}

function init_pageManager(listAction, viewAction, writeAction){
	if(document.frmPageMan)
	{
		document.frmPageMan.listAction.value  = listAction;
		document.frmPageMan.viewAction.value  = viewAction;
		document.frmPageMan.writeAction.value = writeAction;
	}
}

function view_content(seq) {
	document.frmPageMan.action = document.frmPageMan.viewAction.value;
	document.frmPageMan.seq.value = seq;
	document.frmPageMan.submit();
}

function write_content() {
	document.frmPageMan.action = document.frmPageMan.writeAction.value;
	document.frmPageMan.act.value = "write";
	document.frmPageMan.submit();
}

function reply_content() {
	document.frmPageMan.action = document.frmPageMan.writeAction.value;
	document.frmPageMan.act.value = "reply";
	document.frmPageMan.submit();
}

function modify_content() {
	document.frmPageMan.action = document.frmPageMan.writeAction.value;
	document.frmPageMan.act.value = "modify";
	document.frmPageMan.submit();
}

function isConfirmDelete(){
	if(confirm("Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")){
		return true;
	}
	else{
		return false;
	}
}

function delete_content(bbs_id) {
	if(isConfirmDelete()==true) {
		document.frmPageMan.action = "/bbs/bbs_delete.jsp?bbs=" + bbs_id;
		document.frmPageMan.submit();
	}
}

function go_page(pageNo) {
	document.frmPageMan.action = document.frmPageMan.listAction.value;
	document.frmPageMan.page.value = pageNo;
	document.frmPageMan.submit();
}

function go_list() {
	document.frmPageMan.action = document.frmPageMan.listAction.value;
	document.frmPageMan.submit();
}

function go_view() {
	document.frmPageMan.action = document.frmPageMan.viewAction.value;
	document.frmPageMan.submit();
}

function go_login(skinUrl, goUrl) {
	document.frmPageMan.action = skinUrl;
	
	if(skinUrl=="") {
		
		document.frmPageMan.action = "/member/login.jsp";
	// Default
	
	}
	

	if(goUrl==null || goUrl=="") {
		document.frmPageMan.redirectURL.value = window.location.href
	}
	document.frmPageMan.redirectURL.value = goUrl;
	
	document.frmPageMan.submit();
}

function set_search(keyword, keykind) {
	document.frmPageMan.keyword.value = keyword;
	document.frmPageMan.keykind.value = keykind;
}

function print_OSName(os_id) {
	if(os_id=="1") {
		document.write("Windows");
	} else if(os_id=="2") {
		document.write("Linux");
	} else if(os_id=="3") {
		document.write("Solaris");
	} else if(os_id=="4") {
		document.write("AIX");
	} else if(os_id=="5") {
		document.write("HP-UX");
	} else if(os_id=="6") {
		document.write("FreeBSD");
	} else if(os_id=="7") {
		document.write("Tru64");
	} else  {
		document.write("-");
	}
}

function print_ProductName(p_id) {
	if(p_id=="1") {
		document.write("¹®¼­ÇÊÅÍ");
	} else if(p_id=="2") {
		document.write("»ùÇÃ");
	} else if(p_id=="3") {
		document.write("¸Þ´º¾ó");
	} else if(p_id=="4") {
		document.write("±âÅ¸");
	} else  {
		document.write("-");
	}
}

function CenterWindow(href,WinName,w,h,scroll,resize) { 
	var PosLeft; 
	var PosTop; 

	PosLeft = (window.screen.width/2) - (w/2 + 10); 
	PosTop = (window.screen.height/2) - (h/2 + 50);

//	scroll = 0;

	if(window.screen.width<w+10){
		PosLeft = 0;
		w = window.screen.width - 10;
		scroll = 1;
	}

	if(window.screen.height<h+60){
		PosTop = 0;
		if(window.screen.width>w+10){
			w +=15;
		}

		h = window.screen.height - 60;
		scroll = 1;
	}

	var objWin = window.open(href,WinName,"status,height=" + h + ",width=" + w + ", scrollbars=" + scroll + ",resizable=" + resize + ",left=" + PosLeft + ",top=" + PosTop + ",screenX=" + PosLeft + ",screenY=" + PosTop + ",status=no"); 
	if(objWin == null){
		alert("error");
	}
}

//-->

