function news_print(URL) {
	window.open(URL,'_jinbo_commune_print','width=610,height:600,scrollbars=yes');
}
function copy_clip_ie(id) {
	var txt = document.body.createTextRange();
	var obj = document.getElementById(id);
	txt.moveToElementText(obj);
	txt.select();
	txt.execCommand("copy");
	document.selection.empty();
	alert("뉴스의 html 소스를 클립보드로 복사하였습니다.\n원하시는 게시판이나 블로그에서 ctrl+v로 복사하세요.");
}
function copy_clip_mozilla(id) {
	var obj = document.getElementById(id);
	if(obj == null) {
		return;
	}
	var text = obj.value;
	if(text == null || text == "") {
		text = obj.innerHTML;
	}
	if(text == null || text == "") {
		return;
	}

	try {
		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
	} catch(e) {
		alert("뉴스내용을 복사를 할 수 없습니다. 브라우저 설정을 조정해 주세요");
		return;
	}
	var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
	if(str == null) {
		return;
	}
	str.data = text;

	var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
	if(trans == null) {
		return;
	}

	trans.addDataFlavor("text/unicode");
	trans.setTransferData("text/unicode", str, text.length * 2);

	var clipid = Components.interfaces.nsIClipboard;
	var clip = Components.classes["@mozilla.org/widget/clipboard;1"].getService(clipid);
	if(clip == null) {
		return;
	}

	clip.setData(trans, null, clipid.kGlobalClipboard);
	alert("뉴스의 html 소스를 클립보드로 복사하였습니다.\n원하시는 게시판이나 블로그에서 ctrl+v로 복사하세요.");
}

function copy_clip(id) {
	if(!document.body.createTextRange) {
		copy_clip_mozilla(id);
	} else {
		copy_clip_ie(id);
	}
}

