
function fixPngTransparency(imgPng) {
	var ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
	if (ver < 5.5 || ver >= 7)
		return;

	var newHtml = "<span style=\"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'" + imgPng.src
		+ "\', sizingMethod='scale'); display:inline-block\; width:" + imgPng.width + "px; height:" + imgPng.height + "\" /></span>";
	imgPng.outerHTML = newHtml;
}

$(document).ready(function() {
	if ($("div.print A:last").size() > 0){
		$("div.print A:last").click(function(){
			printNow();
		});
	}
});	

function printNow(){
//rptWin = window.open("/jsp/ArticlePrint.jsp", "print",
//rptWin = window.open("../../jsp/MessageBoard/ArticlePrint.jsp", "print",
rptWin = window.open("../../jsp/ArticlePrint.jsp", "print",
		"width=800,height=800,status=yes,scrollbars=yes,resizable=yes");

var interval = setInterval(function() {
	if (rptWin && rptWin.document && rptWin.document.getElementById("printContent")) {
		clearInterval(interval);
		//alert(document.getElementById("innerContents").innerHTML);
		rptWin.document.getElementById("printContent").innerHTML = document.getElementById("innerContents").innerHTML;
		rptWin.print();
		rptWin.removeLinks();
	}
}, 200);

}

function downFile(sFileName, sFileDir){
	 sFileName = encodeURIComponent(sFileName);
	 sFileDir = encodeURIComponent(sFileDir);
		document.location='../FileDownload.jsp?filename=' + sFileName + '&filepath='+sFileDir;
}

function downFile2(sFileName, sFileDir){
	 sFileName = encodeURIComponent(sFileName);
	 sFileDir = encodeURIComponent(sFileDir);
		document.location='../../FileDownload.jsp?filename=' + sFileName + '&filepath='+sFileDir;
}

function goThere(){
	if($("#sel").val()!=""){
		location.href=$("#sel").val();
 //       window.open($("#sel").val(),"_self","");}
	}
}

