function ShowFlash(f,id,w,h,tr) {
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width="+w+" height="+h+" id='"+id+"'>");
	document.write("<param name='movie' value='"+f+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<embed src='"+f+"' wmode=transparent quality='high' width="+w+" height="+h+" name='"+id+"' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'>");
	document.write("</object>");
}

function ViewPost(n) {
	document.BoardForm.mode.value = 'view';
	document.BoardForm.number.value = n;
	document.BoardForm.submit();
}

function ViewGallery(n,c,d) {
	var pop = 'contents/gallery.php?code='+c+'&number='+n+'&dir_i='+d;
	window.open(pop , 'gallery','width=940,height=580,resizable=yes,scrollbars=yes');
}

function WritePost() {
	document.BoardForm.mode.value = 'write';
	document.BoardForm.page.value = '';
	document.BoardForm.keyfield.value = '';
	document.BoardForm.key.value = '';
	document.BoardForm.submit();
}

function ModifyPost(n) {
	document.BoardForm.mode.value = 'modify';	
	document.BoardForm.number.value = n;
	document.BoardForm.submit();
}

function DeletePost(n) {
	document.BoardForm.mode.value = 'delete';	
	document.BoardForm.number.value = n;
	document.BoardForm.submit();
}

function ReplyPost(n) {
	document.BoardForm.mode.value = 'reply';
	document.BoardForm.number.value = n;
	document.BoardForm.submit();
}

function MovePage(p) {
	if(p !=='') {
		document.BoardForm.page.value = p;
	} else {
		document.BoardForm.page.value = 1;
		document.BoardForm.keyfield.value = '';
		document.BoardForm.key.value = '';
	}
		document.BoardForm.mode.value = 'list';
		document.BoardForm.submit();
}


function DownloadFile(u) {
		var win = 'contents/download.php?u='+u;
		location.replace(win);
}


function ViewArticle(n,b,m,c,k,q) {
	
	if (k == 'gallery') 
	{
		var pop = 'contents/gallery.php?code='+c+'&mode='+m+'&number='+n+'&'+q;
		window.open(pop , 'gallery','width=870,height=700,resizable=yes,scrollbars=yes');
	} 	
	else if (k == 'download') 
	{
		var win = 'contents/download.php?u='+q;
		//location.replace(win);
		location.href = win;
	} 	
	else if (k == 'write') 
	{
		var win = b+'.php?mode='+m;
		//location.replace(win);
		location.href = win;
	}
	else if (k == 'list') 
	{
		var win = b+'.php';
		//location.replace(win);
		location.href = win;
	}	
	else	
	{
		var win = b+'.php?mode='+m+'&number='+n+'&'+q;
		//location.replace(win);
		location.href = win;

	}
}


function GotoPage(b,p,q) {
		var win = b+'.php?page='+p+'&'+q;
		location.replace(win);
}



var blurInc; 
blurInc = 0; 

function tempautoBlur(){ 
	event.returnValue=true; document.onfocusin=autoBlur; 
} 

function autoBlur(){ 
	if(event.srcElement.tagName=="INPUT" || event.srcElement.tagName=="TEXTAREA" || event.srcElement.tagName=="SELECT" || event.srcElement.tagName=="OBJECT" ){ 
		document.onfocusin = tempautoBlur; return ; 
	} 
	if(event.srcElement.tagName=="EMBED"){
		return ; 
	}
	if(event.srcElement.tagName!="BODY" && typeof(document.body)=='object') { 
		document.body.focus(); event.returnValue=false; 
	}
} 

function OnLoad(){ 
	document.onfocusin=autoBlur;
} 

window.onload = OnLoad;


function onLoadCyWorld(){
	var url = "http://minihp.cyworld.nate.com/pims/main/pims_main4.asp?tid=28537923&domain=&cast=&dpop=&productseq=&gift_preview=&thema=&codi=&preview_effect=&preview_effect_cd=&seq=&urlstr=&urlstrsub=&send_seq=&back=&item_seq=&act=&Nyearmon=&board_no=&choco=&product_type=&mana_type="
	var win = window.open(url, 'cyworld', 'menubars=no, toolbars=no, resize=no, height=565, width=932, left=50, top=100');
	win.focus();

}
function winOpen(link,h,w){
	//history.back();
	var win = window.open(link, 'hanblog', 'width='+h+', height='+w+', toolbars=no, menubars=no, resize=no');
	win.focus();
}



//KSNRE KISTI POPUP SOURCE

document.write('<div><form name=frmMulti method=post action="http://ocean.kisti.re.kr/IS_mvpopo001P.do?method=multMain">');
document.write('<input type=hidden name="poid">');
document.write('</form></div>');

//¸ÖÆ¼¹Ìµð¾îÀÚ·á°ü ÆË¾÷Ã¢ ¶ç¿ì±â
function winMulti(poid){

	var frm1 = document.frmMulti;
	frm1.poid.value = poid;

	var width  = 950;
	var height = 600;

    var left = 50; //(screen.Width - width) / 2;
	var top = 40;  //(screen.Height - height) / 2;

	wMulti = window.open("", "MultiMedia", "left=" + left + ",top=" + top + ",width=" + width + ",height=" + height + ",status=1,scrollbars=yes,resizable=yes");

	frm1.target = "MultiMedia";
	frm1.submit();
	wMulti.focus();
}

function CopyUrl(url) {
 window.clipboardData.setData("Text",url);
 alert('ÇØ´ç°Ô½Ã¹°ÀÇ URL ÁÖ¼Ò°¡ º¹»çµÇ¾ú½À´Ï´Ù.\n\nÇÊ¿äÇÏ½Å °÷¿¡ Å°º¸µåÀÇ [ÄÁÆ®·Ñ + V] ¹öÆ°À» ÀÌ¿ëÇÏ½Ã¾î ºÙ¿©³Ö±â ÇÏ¼¼¿ä.');
}

