function printPage() {
        var docbody = document.getElementById('docbody').cloneNode(1)
        var printWindow = window.open("","printWindow","width=640,height=480")
	var printDoc = printWindow.document
	var newRules = printDoc.getElementsByTagName('head')[0].appendChild(printDoc.createElement('style'))

	if (document.styleSheets[0].rules) {  //IE Probably not working
		printWindow.document.styleSheets[0].cssText=document.styleSheets[0].cssText
	} else if (document.styleSheets[0].cssRules) { //Firefox
		myRules = document.styleSheets[0].cssRules
		for (var x=0; x<myRules.length; x++)
			printDoc.styleSheets[0].insertRule(myRules[x].cssText,0)
	}	
	
	//Could use appendChild for firefox, but the IE broken way works too.
	//IE can't handle appendChild from the parent to the new window, and it also
	//can't handle the DOM 2.0 importNODE that would help too.  Oh well.
	if (document.all) printDoc.body.innerHTML=docbody.innerHTML
	else printDoc.getElementsByTagName("body")[0].appendChild(docbody)

	if (printWindow.print())
		 {printWindow.close();}
}
