//<!-- 旧的使用方式form action -->
function formAction(formName, address, type) {
	if (type != "") {
		document.getElementById("submit-type").value = type;
	}
	document.forms[formName].action = address;
	document.forms[formName].submit();
}
//<!-- 存在多个button是需要submit时使用 -->
function submitForm(formName, actionStr) {
	document.forms[formName].action = actionStr;
	document.forms[formName].submit();
}
//<!-- 存在多个imageSubmit是需要submit时使用 -->
function imageSubmitForm(formName, actionStr) {
	document.forms[formName].action = actionStr;
}
//<!-- 文章翻页 -->
function articlePage(page) {
	document.getElementById("cur_page").value = page;
	document.forms["articlefm2"].action = actionStr;
	document.forms["articlefm2"].submit();
}
//<!-- 初始化文章里的时间 -->
function loadDatetime() {
	InitDateTime("approved-year", "approved-month", "approved-day", "approved-hour", "approved-minute", "approved-datatime");
	InitDateTime("expired-year", "expired-month", "expired-day", "expired-hour", "expired-minute", "expired-datatime");
	expiredChange();
}
//<!-- 编辑文章里的过期时间使用 -->
function expiredChange() {
	var experd = document.getElementById("experd");
	var year = document.getElementById("expired-year");
	var month = document.getElementById("expired-month");
	var day = document.getElementById("expired-day");
	var hour = document.getElementById("expired-hour");
	var minute = document.getElementById("expired-minute");
	year.disabled = experd.checked ? false : true;
	month.disabled = experd.checked ? false : true;
	day.disabled = experd.checked ? false : true;
	hour.disabled = experd.checked ? false : true;
	minute.disabled = experd.checked ? false : true;
}
//<!--定义字体大小-->
function doZoom(size) {
	document.getElementById("zoom").style.fontSize = size + "px";
}
//<!-- 定义打印格式-->
function doPrint() {
	var str = "<html>";
	var article;
	var strdoPrint = "doPrint()";
	var strTmp;
	str += "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8 \">";
	str += "<title>" + document.title + "</title>";
	str += "<body bgcolor=#ffffff topmargin=5 leftmargin=5 marginheight=5 marginwidth=5 onLoad='window.print()'>";
	str += "<center>";
	str += "<table width=700 border=0 cellpadding=0 cellspacing=20 bgcolor=#ffffff style='line-height:150%;text-indent:2em;'><tr><td>";
	article = document.getElementById("zoom").innerHTML;
	strTmp = article;
	str += strTmp;
	str += "</td></tr></table></center>";
	str += "</body></html>";
	popWin = window.open("", "_blank", "");
	popWin.document.write(str);
	popWin.document.close();
}
//<!--关闭子窗体，刷新父窗体 -->
function refreshParentWindow() {
	window.opener.location.href = window.opener.location.href;
	window.opener.location.reload();
	window.close();
}

