function printPage (elementId)
{
    if (document.getElementById('contentBody')) {
    	var contentBody = document.getElementById('contentBody').innerHTML;	
    }
    
    if (document.getElementById('contentTitle') ) {
    	var contentTitle = document.getElementById('contentTitle').innerHTML;	
    }
    
    var myWindow = window.open('','','width=500,height=600,scrollbars=1');
    
	myWindow.print();
				
	myWindow.document.write("<html>")
	myWindow.document.write("<head>")
	myWindow.document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"var/css/style_print.css\">");
	myWindow.document.write("</head>")
	myWindow.document.write("<body>")
	myWindow.document.write("<div style=\"font-size: 11px; font-family: tahoma;\">");
	
	if (contentTitle) {
	   myWindow.document.write("<h4>"+contentTitle+"</h4>");
	}
	
	if (contentBody) {
	   myWindow.document.write(contentBody);
	}
	
	myWindow.document.write("</div>")
	myWindow.document.write("</body>")
	myWindow.document.write("</html>")
} 
