/**
	Insert 'Print Page' link for browsers that support printing and javascript
	
	@author Alfreso Design
	@copyright 2005
*/
addPrintButton = function()
{
	if( window.print )
	{
		node = document.getElementById('print');
		if( node )
		{
			//remove no-js helper text
			/*
			if( node.hasChildNodes )
			{
				i = node.childNodes.length;
				while(--i)
				{
					child = node.childNodes[i];
					node.removeChild( child );	
				}
			}
			*/
			
			//add new link
			link = document.createElement('a');
			link.setAttribute('href', '#');
			link.setAttribute('id', 'print-this-page');
			link.onclick = function()
			{
				window.print();
				return false;
			}
			text = document.createTextNode('Print this Page');
			link.appendChild(text);
			node.appendChild(link);
		}	
	}
}
if (window.addEventListener) 
{
	window.addEventListener("load", addPrintButton, false);
} 
else if (window.attachEvent) 
{
	window.attachEvent("onload", addPrintButton);
}