/*********************************************************************************************************************
 *                                                                                                                   *
 *                            Copyright (C) 2005; Action Information Management Ltd                                  *
 *                                                                                                                   *
 *********************************************************************************************************************
 *                                                                                                                   *
 *		   System Name		 :	Mia 5.1 Website                                                                      *
 *		   Task Name		 :	TagLib                                                                   			 *
 *		   Module Name		 :	Print page                                                             				 *
 *		   Module Identity	 :	Print.js                                                            				 *
 *		   Author            :	nsherman                                                                             *
 *		   Date Created 	 :	21-Jul-2005                                                                          *
 *                                                                                                                   *
 *********************************************************************************************************************
 *                                                                                                                   *
 *         Description       :                                                                                       *
 *              This collection of JavaScript functions provide methods for printing the current page                *
 *                                                                                                                   *
 *********************************************************************************************************************
 *
 * @author nsherman
 * @version 1
 *********************************************************************************************************************/

/**
 * Print the page
 *
 *	returns false so it can be used as onclick='return printPage()' to cancel the event.
 */
function printPage()
	{
	try
		{
		if (window.print)
			{
			window.print() ;
			}
		else
			{
			var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
			document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
			WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";
			}
		}
	catch(err)
		{
		// Ignore exceptions
		}

	return false ;
	}