function window.onbeforeprint()
{
	var collDiv = document.all.tags("div")
	if (collDiv != null) {
		for (var i=0; i < collDiv.length; ++i) {
			if (collDiv[i].style.height != "" && collDiv[i].style.height != "undefined") {
				collDiv[i].prevHeight = collDiv[i].style.height
				collDiv[i].style.height = "auto"
			} else {
				collDiv[i].prevHeight = ""
			}

			if (collDiv[i].id == "divPrnFooter") {
				if (document.frmPrnFooter.txtLoginID != null) {
					var sLoginID, lstTrdAcc, sDisplay;
					sLoginID = document.frmPrnFooter.txtLoginID.value;
					lstTrdAcc = document.frmPrnFooter.lstTrdAcc.value;
					sDisplay = "&nbsp;<b>Printed by "+ sLoginID;
					if (lstTrdAcc != "") {
						sDisplay += " "+ lstTrdAcc;
					}
					sDisplay += " at "+ Date().toString() +"</b>";
					document.all.lblDisplay.innerHTML = sDisplay
				}
			}
		}
	}
}
function window.onafterprint()
{
	var collDiv = document.all.tags("div")
	if (collDiv != null) {
		for (var i=0; i < collDiv.length; ++i) {
			if (collDiv[i].prevHeight != "") {
				collDiv[i].style.height = collDiv[i].prevHeight
			}

			if (collDiv[i].id == "divPrnFooter") {
				if (document.frmPrnFooter.txtLoginID != null) {
					document.all.lblDisplay.innerHTML = ""
				}
			}
		}
	}
}
