function pgprint()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';

	if (document.getElementsByTagName != null)
	{
		var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
			html += headTags[0].innerHTML;
		}
		
	html += '\n<\/HE' + 'AD>\n<BODY>\n';
		
		var print_versionElem = document.getElementById("pg_area");
		
		if (print_versionElem != null)
		{
				html += print_versionElem.innerHTML;
		}
		else
		{
			alert("This page doesn't contain printable objects");
			return;
		}
			
		html += '\n<\/BO' + 'DY>\n<\/HT' + 'ML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		printWin.print();
		
	}
	else
	{
		alert("Sorry, but your broweser doesn't support printing function");
	}
	
}
